/* Design tokens + global components — "Deep Current, Warm"
   Source of truth: design/design-spec-FINAL-deep-current-warm.md
   Do not introduce colors/values outside this palette. */
:root {
  --bg: #10222e;
  --surface: #173040;
  --surface-2: #1d3b4e;
  --ink: #f4f1e8;
  --muted: #a3b8c2;
  --teal: #3fe0c5;
  --coral: #ff8e7a;
  --sun: #ffd08a;
  --radius: 20px;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Lato', system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(244, 241, 232, .35) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 8%, rgba(244, 241, 232, .3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 30%, rgba(255, 208, 138, .35) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 60%, rgba(244, 241, 232, .22) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 45%, rgba(63, 224, 197, .3) 50%, transparent 51%);
  background-attachment: fixed;
}

h1, h2, h3, .brand { font-family: 'Sora', system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(16, 34, 46, .8);
  border-bottom: 1px solid rgba(63, 224, 197, .14);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; max-width: 1080px; margin: 0 auto; }
.brand { font-weight: 700; font-size: 1.05rem; }
.brand em { font-style: normal; color: var(--teal); }
.links { display: flex; gap: 28px; font-size: .92rem; color: var(--muted); }
.links a:hover { color: var(--teal); }
.links a.active { color: var(--ink); border-bottom: 2px solid var(--teal); padding-bottom: 3px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: none; padding: 0; cursor: pointer; z-index: 11;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(16, 34, 46, .96); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(63, 224, 197, .14);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .links.open { max-height: 300px; }
  .links a { padding: 16px 24px; border-bottom: 1px solid rgba(63, 224, 197, .08); }
  .links a.active { border-bottom: 1px solid rgba(63, 224, 197, .08); padding-bottom: 16px; }
}

/* AMBIENT GLOW CELLS */
.cell { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .cell { animation: none !important; } }

/* GRADIENT TEXT (one hero phrase + one word per page h1 — see spec Section 2) */
h1 .glow {
  background: linear-gradient(92deg, var(--teal), var(--sun));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* BUTTONS */
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .95rem; transition: transform .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--teal); color: #0b2b25; }
.btn.warm { background: transparent; border: 1.5px solid var(--coral); color: var(--coral); }

.back {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 44px; padding: 12px 24px; border-radius: 999px;
  border: 1.5px solid var(--teal); color: var(--teal); font-weight: 700; font-size: .92rem;
  transition: transform .15s ease; cursor: pointer; background: none; font-family: 'Lato', sans-serif;
}
.back:hover { transform: translateX(-3px); }

/* PAGE HEAD (portfolio, contact, blog — centred title + intro over ambient cells) */
.page-head { padding: 76px 0 20px; text-align: center; position: relative; }
.page-head .cell.a { width: 380px; height: 380px; background: radial-gradient(circle at 30% 30%, #3fe0c5 0%, transparent 65%); top: -120px; right: 6%; }
.page-head .cell.b { width: 300px; height: 300px; background: radial-gradient(circle at 60% 60%, #ffd08a 0%, transparent 65%); top: -40px; left: 10%; }
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); font-weight: 700; margin-bottom: 16px; }
.page-head .intro { max-width: 62ch; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }

section { padding: 72px 0; border-top: 1px solid rgba(63, 224, 197, .1); }
h2 { font-size: 1.6rem; margin-bottom: 8px; }
.sub { color: var(--muted); max-width: 62ch; margin-bottom: 36px; }

/* FOOTER (all pages) */
footer { border-top: 1px solid rgba(63, 224, 197, .12); padding: 52px 0 34px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; text-align: center; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid .col:first-child { text-align: left; }
.foot-grid .col:last-child { text-align: right; }
@media (max-width: 640px) { .foot-grid .col:first-child, .foot-grid .col:last-child { text-align: center; } }
.foot-grid b { font-family: 'Sora'; display: block; margin-bottom: 6px; color: var(--ink); }
.foot-grid span { color: var(--muted); font-size: .92rem; }
.foot-grid a { color: var(--teal); }
.copyright { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 36px; }
