/* ═══════════════════════════════════════════════
   GOLDEN HOUR — Aakash Damani
   Summer beach × autumn dusk. Dark + light.
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --maxw: 1100px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* DARK — Deep Ocean Night */
  --bg:        #0b1820;   /* midnight sea */
  --bg-alt:    #101f2c;   /* dark harbour */
  --bg-card:   #162838;   /* deep navy */
  --line:      #1e3a50;   /* ocean ridge */
  --text:      #e8d8b8;   /* warm sand */
  --muted:     #6a96b0;   /* sea haze */
  --accent:    #e86840;   /* coral */
  --accent-2:  #e8b840;   /* golden sun */
  --ocean:     #28b4a4;   /* bright sea glass */
  --glow-1:    #e86840;
  --glow-2:    #903020;
  --glow-3:    #081018;
  --grain-op:  0.045;
  --shadow:    0 30px 60px -30px rgba(0,0,0,0.8);
}

body.light {
  /* LIGHT — Bright Beach Day */
  --bg:        #eaf6f8;   /* pale sea */
  --bg-alt:    #f4fbfc;   /* seafoam */
  --bg-card:   #ffffff;
  --line:      #bcd8e0;   /* shoreline */
  --text:      #0c2030;   /* deep ocean */
  --muted:     #4a7890;   /* tide pool */
  --accent:    #d04820;   /* coral reef */
  --accent-2:  #c09020;   /* golden sand */
  --ocean:     #168898;   /* open water */
  --glow-1:    #f0d060;
  --glow-2:    #e08040;
  --glow-3:    #c8eff4;
  --grain-op:  0.035;
  --shadow:    0 30px 60px -34px rgba(10,50,80,0.22);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

::selection { background: var(--accent); color: #fff; }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 2.5rem; }

/* ── Grain overlay ── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 2.5rem;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav-sun {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ── Theme toggle ── */
.theme-toggle {
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.toggle-track {
  display: block;
  width: 46px; height: 26px;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.4s var(--ease);
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px var(--accent);
  transition: transform 0.4s var(--ease);
}
body.light .toggle-thumb { transform: translateX(20px); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem 2.5rem 6rem;
  overflow: hidden;
  background: var(--bg);
}

/* 3D layer (Spline) — sits behind text, above CSS sun */
.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;        /* parallax is window-driven; don't block UI */
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero-3d.loaded { opacity: 1; }
.hero-3d spline-viewer { width: 100%; height: 100%; display: block; }
/* When 3D is active, fade the CSS sun fallback down (kept as ambient glow) */
.hero.has-3d .hero-sun { opacity: 0.25; }

.hero-sun {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 130vmax; height: 130vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at center,
    var(--glow-1) 0%,
    var(--glow-2) 16%,
    transparent 42%);
  opacity: 0.55;
  filter: blur(8px);
  animation: breathe 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { transform: translateX(-50%) scale(1);   opacity: 0.5;  }
  50%      { transform: translateX(-50%) scale(1.06); opacity: 0.62; }
}

.hero-horizon {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(to top, var(--glow-3), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 12vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > * { display: inline-block; }
.hero-title .line--accent {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.hero-sub {
  margin-top: 2rem;
  max-width: 480px;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
}

.hero-meta {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent);
}
.hero-meta-text { display: flex; flex-direction: column; line-height: 1.4; }
.hero-meta-text strong { font-weight: 600; font-size: 0.95rem; }
.hero-meta-text span { font-size: 0.85rem; color: var(--muted); }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 2.2rem;
  transform: translateX(-50%);
  z-index: 2;
}
.hero-scroll span {
  display: block;
  width: 26px; height: 42px;
  border: 2px solid var(--muted);
  border-radius: 99px;
  position: relative;
}
.hero-scroll span::after {
  content: '';
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  border-radius: 99px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: scrolldot 1.8s ease-in-out infinite;
}
@keyframes scrolldot {
  0%   { opacity: 0; transform: translate(-50%, 0); }
  40%  { opacity: 1; }
  80%  { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; }
}

/* ── Ticker ── */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 1.1rem 0;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  width: max-content;
  animation: scroll-x 32s linear infinite;
}
.ticker-track span {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text);
}
.ticker-track i {
  color: var(--accent);
  font-style: normal;
  font-size: 0.9rem;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* ── Sections ── */
.section { padding: 7rem 0; position: relative; }
.section .container { position: relative; }

.section-index {
  position: absolute;
  top: -1.2rem; right: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 900;
  color: var(--text);
  opacity: 0.05;
  line-height: 1;
  pointer-events: none;
}

.section-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1.5px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.8rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: 2.5rem;
}

.prose { max-width: 620px; }
.prose p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.3rem;
}
.prose p:last-child { margin-bottom: 0; }

.about { background: var(--bg); }
.work  { background: var(--bg-alt); }
.values{ background: var(--bg); }
.loves { background: var(--bg-alt); }
.blog  { background: var(--bg); }
.connect { background: var(--bg-alt); }

/* ── Tags ── */
.tags { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 2rem; }
.tag {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ocean);
  border: 1px solid color-mix(in srgb, var(--ocean) 45%, transparent);
  border-radius: 99px;
  padding: 0.4rem 1rem;
  transition: background 0.25s, color 0.25s;
}
.tag:hover { background: var(--ocean); color: var(--bg); }

/* ── Value cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }
.card-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  position: relative;
}
.card p { font-size: 0.95rem; color: var(--muted); line-height: 1.7; position: relative; }

/* ── Loves ── */
.loves-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.love {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.4rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.love:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.love-emoji {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  font-size: 1.7rem;
  margin-bottom: 1.4rem;
}
.love h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.love p { font-size: 0.95rem; color: var(--muted); line-height: 1.75; }

/* ── Blog ── */
.blog-empty {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.8rem 2rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  max-width: 480px;
}
.blog-empty-icon {
  font-size: 1.6rem;
  color: var(--accent);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.blog-empty p { color: var(--muted); font-style: italic; }

/* ── Connect ── */
.connect-lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.big-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  transition: color 0.3s, gap 0.3s var(--ease);
}
.big-cta svg { width: 0.9em; height: 0.9em; color: var(--accent); transition: transform 0.3s var(--ease); }
.big-cta:hover { color: var(--accent); gap: 1.4rem; }
.big-cta:hover svg { transform: translateX(6px); }

.social-links {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.social-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 0.25s;
}
.social-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.social-links a:hover { color: var(--text); }
.social-links a:hover::after { width: 100%; }

/* ── Wave dividers ── */
.wave-divider { line-height: 0; }
.wave-divider svg { width: 100%; height: 60px; display: block; }
.wave-divider svg path { fill: var(--bg-alt); }
.wave-divider--flip svg { transform: scaleY(-1); }
.wave-divider--flip svg path { fill: var(--bg); }

/* ── Footer ── */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.footer-tag { color: var(--accent); }

/* ── Reveal animation ── */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile
   ══════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
  z-index: 301;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer overlay ── */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.nav-drawer.open {
  opacity: 1;
  pointer-events: all;
}
.nav-drawer a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  transition: color 0.25s;
  text-decoration: none;
}
.nav-drawer a:hover { color: var(--accent); }

/* ── Tablet (≤ 960px) ── */
@media (max-width: 960px) {
  .container { padding: 0 2rem; }

  .hero { padding: 8rem 2rem 5rem; }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .loves-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section { padding: 6rem 0; }

  .section-title {
    max-width: 100%;
  }
}

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .container { padding: 0 1.25rem; }

  /* Nav */
  .nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .hero { padding: 6rem 1.25rem 4rem; min-height: 100svh; }
  .hero-title { font-size: clamp(2.6rem, 13vw, 4.5rem); }
  .hero-sub { font-size: 1rem; max-width: 100%; margin-top: 1.5rem; }
  .hero-meta { margin-top: 2rem; gap: 0.85rem; }
  .hero-photo { width: 80px; height: 80px; border-width: 2px; }
  .hero-meta-text strong { font-size: 0.88rem; }
  .hero-meta-text span { font-size: 0.78rem; }

  /* Hero 3D: reduce height on mobile for perf */
  .hero-3d { height: 100%; }

  /* Ticker */
  .ticker-track span { font-size: 1.2rem; }

  /* Sections */
  .section { padding: 4.5rem 0; }
  .section-title { font-size: clamp(1.65rem, 7vw, 2.2rem); margin-bottom: 1.8rem; }
  .prose p { font-size: 1rem; }

  /* Cards — single column */
  .card-grid { grid-template-columns: 1fr; gap: 1rem; }
  .card { padding: 1.8rem; }

  /* Loves — single column */
  .loves-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .love { padding: 1.8rem; }

  /* Blog */
  .blog-empty { flex-direction: column; align-items: flex-start; gap: 0.8rem; padding: 1.4rem; }

  /* Connect */
  .connect-lead { font-size: 1.05rem; }
  .big-cta { font-size: clamp(1.5rem, 7vw, 2.2rem); }
  .social-links { gap: 1.4rem; margin-top: 2rem; }

  /* Tags */
  .tags { gap: 0.45rem; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; }

  /* Section index ghost number — pull in on narrow screens */
  .section-index { font-size: clamp(3rem, 18vw, 6rem); right: 0.5rem; }
}

/* ── Very small phones (≤ 380px) ── */
@media (max-width: 380px) {
  .hero-title { font-size: clamp(2.2rem, 14vw, 3rem); }
  .card { padding: 1.4rem; }
  .love { padding: 1.4rem; }
}
