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

:root {
  --navy: #0B1929; --navy-mid: #112340; --navy-light: #1a3352;
  --teal: #00B4D8; --teal-dim: #0090ac;
  --amber: #F4A22D; --gold: #C9A84C; --gold-light: #e8c97a;
  --off-white: #EDF2F7; --muted: #8FA3B8; --body-text: #CBD5E0;
  --border: rgba(0,180,216,0.15); --card-bg: rgba(17,35,64,0.7);
  --focus-ring: 0 0 0 3px rgba(0,180,216,0.5);
  --maxw: 1100px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif; background: var(--navy); color: var(--body-text);
  line-height: 1.7; overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 4rem; background: rgba(11,25,41,0.92);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; flex-direction: column; text-decoration: none; }
.nav-brand-name {
  font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 600;
  color: var(--off-white); letter-spacing: 0.02em; line-height: 1.1;
}
.nav-brand-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; color: var(--gold);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  transition: color 0.2s; letter-spacing: 0.02em;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--off-white); }
.nav-links .nav-cta {
  background: var(--teal); color: var(--navy) !important; padding: 0.45rem 1.1rem;
  border-radius: 3px; font-weight: 600; font-size: 0.82rem; transition: background 0.2s;
}
.nav-links .nav-cta:hover { background: var(--teal-dim); }

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  cursor: pointer; padding: 6px; background: none; border: none;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--off-white); border-radius: 2px; transition: all 0.25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; top: 62px; left: 0; right: 0;
  background: rgba(11,25,41,0.98); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 1.5rem 2rem 2rem;
  z-index: 99; flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--body-text); text-decoration: none; font-size: 1rem; font-weight: 500;
  padding: 0.9rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); transition: color 0.2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--teal); }

/* ── HERO ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 8rem 4rem 5rem; position: relative; overflow: hidden;
}
.hero--short { min-height: 0; padding: 9rem 4rem 4rem; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 40%, rgba(0,180,216,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 70% at 85% 60%, rgba(201,168,76,0.06) 0%, transparent 70%),
    linear-gradient(160deg, #0B1929 0%, #0d2035 50%, #0B1929 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(0,180,216,0.12) 1px, transparent 1px);
  background-size: 36px 36px; opacity: 0.4;
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--gold);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.7s ease forwards;
}
.hero-eyebrow::before { content: ''; display: block; width: 28px; height: 1px; background: var(--gold); }
.hero h1 {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 500; line-height: 1.15; color: var(--off-white); margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.7s ease 0.15s forwards;
}
.hero h1 em { font-style: italic; color: var(--teal); }
.hero-lead {
  font-size: 1.1rem; color: var(--body-text); max-width: 620px; line-height: 1.8;
  margin-bottom: 2.5rem; opacity: 0; animation: fadeUp 0.7s ease 0.3s forwards;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.7s ease 0.45s forwards; }
.btn-primary, .btn-outline, .btn-gold {
  padding: 0.85rem 2rem; border-radius: 3px; font-size: 0.9rem; text-decoration: none;
  display: inline-block; transition: all 0.2s;
}
.btn-primary { background: var(--teal); color: var(--navy); font-weight: 600; }
.btn-primary:hover { background: var(--teal-dim); }
.btn-outline { border: 1px solid rgba(0,180,216,0.4); color: var(--teal); font-weight: 500; }
.btn-outline:hover { border-color: var(--teal); background: rgba(0,180,216,0.06); }
.btn-gold { background: var(--gold); color: var(--navy); font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── SECTIONS ── */
section { padding: 5.5rem 4rem; }
section.band { background: var(--navy-mid); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section-label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--gold);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.8rem;
}
h2 {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 500; color: var(--off-white); line-height: 1.2; margin-bottom: 1.2rem;
}
h2 em { font-style: italic; color: var(--teal); }
.section-lead { font-size: 1rem; max-width: 680px; line-height: 1.8; margin-bottom: 3rem; }
.section-inner > p { margin-bottom: 1.1rem; max-width: 68ch; }
.section-inner > p.section-lead { margin-bottom: 2rem; }
.section-inner > p:last-child { margin-bottom: 0; }

/* ── CARDS ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 2rem; backdrop-filter: blur(10px); transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(0,180,216,0.4); transform: translateY(-2px); }
.card-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 1rem;
}
.card h3 {
  font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 600;
  color: var(--off-white); margin-bottom: 0.5rem;
}
.card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.6rem; }
.card p:last-child { margin-bottom: 0; }
.card-link { color: var(--teal); text-decoration: none; font-weight: 600; font-size: 0.88rem; }
.card-link:hover { text-decoration: underline; }
.placeholder { font-style: italic; opacity: 0.8; }

/* ── FOOTER ── */
footer { background: var(--navy-mid); border-top: 1px solid var(--border); padding: 3.5rem 4rem 2rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap; }
.footer-brand-name { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 600; color: var(--off-white); }
.footer-brand-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.8rem; }
.footer-brand p { color: var(--muted); font-size: 0.85rem; max-width: 300px; }
.footer-col h5 { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.8rem; font-weight: 500; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: 0.85rem; padding: 0.2rem 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--off-white); }
.footer-bottom { max-width: var(--maxw); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.78rem; }

/* ── A11Y ── */
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--teal); color: var(--navy); padding: 0.6rem 1rem; border-radius: 3px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 0.5rem; }
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero, .hero--short { padding: 7rem 1.5rem 3.5rem; }
  .hero { min-height: auto; }
  section { padding: 3.5rem 1.5rem; }
  footer { padding: 2.5rem 1.5rem 1.5rem; }
  .footer-inner { flex-direction: column; gap: 2rem; }
}
.card-grid--pair { grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }

/* ── HERO PHOTO ── */
.hero-grid { position: relative; z-index: 1; max-width: var(--maxw); width: 100%; margin: 0 auto; display: grid; grid-template-columns: 1fr 340px; gap: 4rem; align-items: center; }
.hero-grid .hero-inner { max-width: 720px; }
.hero-photo { opacity: 0; animation: fadeUp 0.7s ease 0.3s forwards; }
.hero-photo img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo { order: -1; max-width: 220px; }
}

/* ── FREE-ACCESS CALLOUT + BADGE ── */
.callout-wrap { padding: 2.5rem 4rem 0; }
.callout {
  max-width: var(--maxw); margin: 0 auto; background: var(--card-bg);
  border: 1px solid rgba(201,168,76,0.35); border-left: 4px solid var(--gold);
  border-radius: 8px; padding: 1.5rem 2rem;
}
.callout-label { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.callout h2 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); margin-bottom: 0.5rem; }
.callout p:last-child { color: var(--body-text); }
.callout a { color: var(--gold-light); font-weight: 600; }
.badge { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-light); border: 1px solid rgba(201,168,76,0.35); padding: 0.2rem 0.55rem; border-radius: 2px; }

/* ── NAV: five sections + Contact need the menu earlier ── */
.nav-links { gap: 1.5rem; }
@media (max-width: 1100px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 900px) { .callout-wrap { padding: 1.5rem 1.5rem 0; } .callout { padding: 1.25rem; } }

/* ── LINK LISTS (Writing page) ── */
.link-list { list-style: none; max-width: var(--maxw); }
.link-item { padding: 1rem 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.25rem; }
.link-item:last-child { border-bottom: none; }
.link-item a { color: var(--off-white); font-size: 1.05rem; font-weight: 500; text-decoration: none; }
.link-item a:hover { color: var(--teal); text-decoration: underline; }
.link-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); }
.link-item.placeholder { font-style: italic; opacity: 0.8; color: var(--muted); }

/* space between a card grid and a following button/paragraph */
.card-grid + p { margin-top: 1.5rem; }

/* ── FEATURE ROW (text beside a logo) ── */
.feature-grid { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; align-items: start; margin-bottom: 2rem; }
.feature-grid p { margin: 0; max-width: 60ch; }
.feature-logo img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; gap: 1.5rem; } .feature-logo { max-width: 220px; order: -1; } }

/* ── ACCESSIBILITY (WCAG 2.1 AA / Section 508) ── */
:root { --link: #4DCFEA; }                                   /* 8.5:1 on cards, 9.6:1 on the page */
html { scroll-padding-top: 6rem; }                           /* focused items never hide behind the fixed nav */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Links in page content are always underlined, so they never rely on color alone (WCAG 1.4.1) */
main a:not([class*="btn-"]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
main a:not([class*="btn-"]):hover { text-decoration-thickness: 2px; }
.card-link, .section-lead a { font-weight: 600; }
.link-item a { color: var(--link); }
.link-item a:hover { color: var(--off-white); }

/* Placeholder text was dimmed below 4.5:1; keep full color, the italics still mark it */
.placeholder, .link-item.placeholder { opacity: 1; }

/* Footer column titles are not headings (they broke heading order) */
.footer-col-title { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.8rem; font-weight: 500; }
.footer-col a:hover, .footer-col a:focus-visible { text-decoration: underline; }

/* Current page: shown by more than color (WCAG 1.4.1) */
.nav-links a:not(.nav-cta) { padding: 0.4rem 0; }
.nav-links a[aria-current="page"]:not(.nav-cta) { color: var(--off-white); border-bottom: 2px solid var(--teal); }
.mobile-menu a[aria-current="page"] { color: var(--teal); border-left: 3px solid var(--teal); padding-left: 0.75rem; }

/* No smooth scrolling for people who ask for reduced motion (WCAG 2.3.3 / best practice) */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── PROJECT PAGE: feature list, inline code, topic tags ── */
.feature-list { padding-left: 1.25rem; max-width: 68ch; }
.feature-list li { margin-bottom: 0.75rem; }
.feature-list strong { color: var(--off-white); }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.9em; background: var(--navy-mid); color: var(--off-white); padding: 0.1rem 0.4rem; border-radius: 3px; }
.band code { background: var(--navy); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; }
.tag-list li { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.04em; color: var(--body-text); border: 1px solid rgba(143,163,184,0.4); padding: 0.25rem 0.6rem; border-radius: 2px; }
