/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:           #080b10;
  --bg-card:      #0e1219;
  --bg-card-h:    #111720;
  --border:       rgba(255,255,255,0.07);
  --border-h:     rgba(255,255,255,0.14);

  --text:         #e8eaf0;
  --text-muted:   #6b7280;
  --text-dim:     #374151;

  /* Violet accent — primary */
  --violet:       #6366f1;
  --violet-dim:   rgba(99,102,241,0.12);
  --violet-glow:  rgba(99,102,241,0.25);

  /* Amber accent — secondary */
  --amber:        #f59e0b;
  --amber-dim:    rgba(245,158,11,0.12);
  --amber-glow:   rgba(245,158,11,0.20);

  --radius-card:  16px;
  --transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   LAYOUT UTILITY
   ============================================================ */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   AMBIENT BACKGROUND
   Aurora: two slow radial gradients that drift. Pure CSS,
   composited layer — no paint cost on scroll.
   ============================================================ */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Two gradient orbs */
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%,  rgba(99,102,241,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 80% 20%,  rgba(99,102,241,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 60% 80%,  rgba(245,158,11,0.06) 0%, transparent 60%);
  animation: aurora-drift 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes aurora-drift {
  0%   { transform: translateY(0px) scale(1); }
  50%  { transform: translateY(-12px) scale(1.02); }
  100% { transform: translateY(6px) scale(0.99); }
}

/* Noise grain overlay — SVG-based, no image file needed */
.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Everything above bg layers */
nav, main, footer { position: relative; z-index: 2; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px;
}

.nav-logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity var(--transition);
}

.nav-logo:hover { opacity: 0.75; }

/* Language toggle pill */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: border-color var(--transition), background var(--transition);
}

.lang-toggle:hover {
  border-color: var(--border-h);
  background: rgba(255,255,255,0.07);
}

.lang-opt {
  transition: color var(--transition);
}

.lang-opt.active {
  color: var(--text);
}

.lang-sep {
  opacity: 0.3;
  font-size: 0.7rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 80px 0 72px;
  animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-up 0.6s 0.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-headline {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 24px;
  opacity: 0;
  animation: fade-up 0.7s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.headline-accent {
  color: var(--violet);
  /* Cursor blink handled by JS class */
}

.headline-accent.typing::after {
  content: '|';
  color: var(--violet);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  opacity: 0;
  animation: fade-up 0.7s 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 0 0 72px;
  opacity: 0;
  animation: fade-up 0.7s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-inner {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.about-text {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.75;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
  padding-bottom: 96px;
  opacity: 0;
  animation: fade-up 0.7s 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.projects > .section-label {
  margin-bottom: 20px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================================
   PROJECT CARD
   The card is an <a> tag for full keyboard/click area.
   card-glow is a blurred color blob behind the border.
   Shine effect via JS-driven --mouse-x/--mouse-y on the card.
   ============================================================ */
.project-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
  cursor: pointer;
  /* Shine mask — reveals gradient at cursor position */
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.project-card:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-3px);
}

/* Shine pseudo-element: a soft radial gradient following the cursor */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    320px circle at var(--mouse-x) var(--mouse-y),
    rgba(255,255,255,0.04),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: inherit;
}

.project-card:hover::before {
  opacity: 1;
}

/* Ambient glow blob behind card (outside border) */
.card-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  top: -60px;
  right: -60px;
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card-glow--violet { background: var(--violet-glow); }
.card-glow--amber  { background: var(--amber-glow); }

.project-card:hover .card-glow { opacity: 1; }

.card-body {
  position: relative;
  padding: 28px;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 100px;
}

.card-tag--violet {
  background: var(--violet-dim);
  color: var(--violet);
}

.card-tag--amber {
  background: var(--amber-dim);
  color: var(--amber);
}

.card-arrow {
  font-size: 1rem;
  color: var(--text-dim);
  transition: color var(--transition), transform var(--transition);
}

.project-card:hover .card-arrow {
  color: var(--text-muted);
  transform: translate(2px, -2px);
}

.card-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.card-url {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  transition: color var(--transition);
}

.project-card:hover .card-url {
  color: var(--text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 880px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.83rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ============================================================
   ENTRANCE ANIMATION
   ============================================================ */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   PRIVACY PAGE
   ============================================================ */
.page-nav {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.back-link:hover { color: var(--text); }

.page-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-content h1 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.page-content .updated {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.page-content h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.page-content p,
.page-content li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 6px;
}

.page-content ul {
  padding-left: 18px;
  margin-bottom: 8px;
}

.page-content a {
  color: var(--violet);
  text-underline-offset: 3px;
}

.page-content a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .hero { padding: 56px 0 56px; }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 24px 24px 36px;
  }

  .footer-links { justify-content: center; }
}

@media (max-width: 400px) {
  .hero-headline { font-size: 2rem; }
  .card-body { padding: 22px; }
}
