/* =============================================
   TOKENS — "Editorial" (midnight, periwinkle glow)
   Asymmetric magazine-style layout on a dark,
   glowing canvas. Text always sits on a flat,
   verified-contrast surface — glows are purely
   decorative atmosphere behind content, never
   underneath text itself.
============================================= */
:root {
  --midnight:   #0A0C12;
  --midnight-2: #10121A;
  --surface:    #151823;
  --paper:      #EDEFF5;
  --ink-soft:   #C7CBDA;
  --ink-quiet:  #8B91A3;
  --line:       #232838;
  --line-strong:#2E3548;

  --periwinkle: #7A9CFF;
  --periwinkle-soft: #A8C0FF;
  --lime:      #00FF00;

  --serif:  'Unbounded', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans:   'Sora', -apple-system, BlinkMacSystemFont, sans-serif;

  --measure: 640px;
  --measure-wide: 1120px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================
   ENTRANCE ANIMATIONS
   .load-in  — hero, animates on page load (staggered via --d)
   .reveal   — scroll-triggered via IntersectionObserver,
               toggled to .is-visible by script
   Energetic but purposeful: noticeable movement on
   entrance, but interaction hovers elsewhere stay
   color/opacity-only per design direction.
============================================= */
.load-in {
  opacity: 0;
  transform: translateY(28px);
  animation: load-in-rise 0.85s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes load-in-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger work spreads slightly as they reveal */
.work-spread.reveal { transition-delay: 0.05s; }

body {
  background: var(--midnight);
  color: var(--ink-soft);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* =============================================
   MATRIX BACKGROUND
   Full-page, fixed, always running. Sits behind
   every section (they're transparent over body)
   and behind the decorative .glow blobs too.
   Deliberately not paused for prefers-reduced-motion
   per design direction — kept slow instead.
============================================= */
#matrix-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
}

a { color: var(--periwinkle); text-decoration: none; }

img { max-width: 100%; display: block; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--periwinkle);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--periwinkle);
  color: var(--midnight);
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--periwinkle);
  color: var(--midnight);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  z-index: 200;
  font-size: 0.9rem;
  font-weight: 600;
}

.skip-link:focus { left: 1rem; top: 1rem; }

/* =============================================
   AMBIENT GLOW LAYER
   Fixed, decorative, behind all content — never
   positioned where text sits directly on top.
============================================= */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.glow-hero {
  top: -120px;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(122,156,255,0.30), transparent 70%);
}

.glow-work {
  top: 30%;
  left: -15%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,148,114,0.16), transparent 70%);
}

.glow-about {
  bottom: -10%;
  right: -10%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(122,156,255,0.18), transparent 70%);
}

/* =============================================
   NAV
============================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3rem;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-logo img {
  height: 30px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 2px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 10px;
  width: 0%;
  height: 2px;
  background: var(--periwinkle);
  border-radius: 2px;
  transition: width 0.25s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after { width: 100%; }

.nav-cta { color: var(--periwinkle) !important; font-weight: 600 !important; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--paper);
  cursor: pointer;
  border-radius: 8px;
}

.nav-toggle:hover { background: var(--surface); }

.nav-links-mobile {
  display: none;
  list-style: none;
  flex-direction: column;
  background: var(--midnight-2);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 100;
}

.nav-links-mobile.is-open { display: flex; }

.nav-links-mobile li { border-top: 1px solid var(--line); }
.nav-links-mobile li:first-child { border-top: none; }

.nav-links-mobile a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links-mobile a.nav-cta { color: var(--periwinkle); font-weight: 600; }

/* =============================================
   PAGE FRAME
============================================= */
.page {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 3rem;
  position: relative;
}

/* =============================================
   HERO — editorial, asymmetric, moderate scale
============================================= */
.hero {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  align-items: end;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--paper);
}

.hero h1 em {
  font-style: italic;
  color: var(--periwinkle);
  animation: pulse-fade-dyn 6s ease-in-out infinite !important;
}

@keyframes pulse-fade-dyn{
  0%{ opacity: 1;}
  45%{ opacity: 0;}
  55%{ opacity: 0;}
  100%{ opacity: 1;}
}

/* Pull-quote — breaks the grid, set apart in the narrow column */
.hero-pullquote {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--periwinkle);
  align-self: end;
}

.hero-pullquote p {
  font-family: var(--sans);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--paper);
}

.hero-pullquote cite {
  display: block;
  margin-top: 0.85rem;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ink-quiet);
  font-weight: 500;
}

.hero-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--midnight);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--periwinkle);
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover { background: var(--periwinkle-soft); }

.btn-primary svg { transition: opacity 0.2s ease; }
.btn-primary:hover svg { opacity: 0.85; }

.btn-ghost {
  font-size: 0.92rem;
  color: var(--ink-quiet);
  font-weight: 500;
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-ghost svg { transition: transform 0.2s ease; }

.btn-ghost:hover { color: var(--paper); border-color: var(--ink-quiet); }
.btn-ghost:hover svg { transform: translateX(3px); }

/* =============================================
   SECTION SHARED
============================================= */
.section {
  position: relative;
  padding: 5.5rem 0;
  border-top: 1px solid var(--line);
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.2;
  color: var(--paper);
  max-width: 30ch;
  margin-bottom: 3.5rem;
}

.section-title em {
  font-style: italic;
  color: var(--periwinkle);
}

/* =============================================
   WORK — asymmetric alternating spreads
============================================= */
.work-spread {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.work-spread:first-of-type { border-top: none; padding-top: 0; }

.work-spread:nth-of-type(even) {
  grid-template-columns: 1fr 280px;
}

.work-spread:nth-of-type(even) .work-visual { order: 2; }
.work-spread:nth-of-type(even) .work-text { order: 1; }

.work-visual {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.work-visual--counseling {
  aspect-ratio: 16 / 9;
}

.work-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Logo marks (not photos) get contain + padding so the full mark
   shows without cropping, instead of object-fit: cover */
.work-visual--angels .work-thumb {
  object-fit: contain;
  padding: 6%;
}

.work-visual .work-glow {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.work-visual .work-num {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--line-strong);
  position: relative;
  z-index: 1;
}

.work-text h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  color: var(--paper);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.work-spread:hover .work-text h3,
.work-spread:focus-visible .work-text h3 { color: var(--periwinkle); }

.work-text p {
  font-size: 0.96rem;
  color: var(--ink-quiet);
  max-width: 48ch;
  margin-bottom: 1.1rem;
}

.work-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-quiet);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 1.25rem;
}

.work-status .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--periwinkle);
}

.work-status.in-progress .live-dot { background: var(--line-strong); }

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--periwinkle);
}

.work-spread:hover .work-link svg,
.work-spread:focus-visible .work-link svg { opacity: 0.8; }

.work-link svg { transition: opacity 0.2s ease; }

/* =============================================
   ABOUT — multi-column, varied widths
============================================= */
.about-columns {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3.5rem;
}

.about-columns > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-philosophy h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 1.25rem;
}

.about-philosophy p {
  font-family: var(--sans);
  font-style: italic;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  color: var(--paper);
}

.about-context h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 1.1rem;
}

.about-context p {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.about-context p em {
  font-style: italic;
  color: var(--paper);
}

.about-facts h3,
.skills-block h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 1.25rem;
}

.about-facts ul {
  list-style: none;
  margin-bottom: 2.5rem;
}

.about-facts li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.about-facts li:first-child { border-top: none; padding-top: 0; }

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.skill-pill {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
}

.about-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.about-footer .avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--periwinkle);
  flex-shrink: 0;
}

.about-footer span.label {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* =============================================
   CONTACT
============================================= */
.contact-section {
  padding: 6rem 0 7rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  line-height: 1.2;
  color: var(--paper);
  margin-bottom: 1.25rem;
}

.contact-section h2 em {
  font-style: italic;
  color: var(--periwinkle);
}

.contact-sub {
  font-size: 1.02rem;
  color: var(--ink-quiet);
  max-width: 40ch;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--midnight);
  background: var(--periwinkle);
  padding: 0.9rem 1.75rem;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.contact-email:hover { background: var(--periwinkle-soft); }

/* =============================================
   FOOTER
============================================= */
footer {
  border-top: 1px solid var(--line);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--measure-wide);
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: var(--ink-quiet);
}

.footer-logo span { color: var(--periwinkle); }

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

/* =============================================
   RESPONSIVE — TABLET (1024px down to 769px)
   Editorial asymmetry softens but doesn't fully
   collapse — narrower columns, smaller gutters,
   work spreads stay side-by-side.
============================================= */
@media (max-width: 1024px) {
  .page { padding: 0 2.25rem; }

  .hero {
    grid-template-columns: 1.3fr 1fr;
    gap: 2.25rem;
  }

  .work-spread,
  .work-spread:nth-of-type(even) {
    grid-template-columns: 220px 1fr;
    gap: 1.75rem;
  }

  .about-columns {
    grid-template-columns: 1fr 1.2fr;
    gap: 2.25rem;
  }
}

/* =============================================
   RESPONSIVE — NARROW TABLET / LARGE PHONE (900px)
   Asymmetric grids collapse to a single column;
   nav still shows full links (room permits it
   down to 640px).
============================================= */
@media (max-width: 900px) {
  .nav { padding: 1.1rem 1.75rem; }
  .nav-links { gap: 1.5rem; }

  .page { padding: 0 1.75rem; }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-pullquote {
    border-left: none;
    border-top: 2px solid var(--periwinkle);
    padding-left: 0;
    padding-top: 1.25rem;
  }

  .work-spread,
  .work-spread:nth-of-type(even) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .work-spread .work-visual { order: 0 !important; }
  .work-spread .work-text { order: 1 !important; }

  .work-visual { aspect-ratio: 16 / 9; }

  .about-columns { grid-template-columns: 1fr; gap: 2.5rem; }

  footer { padding: 1.75rem; }
}

/* =============================================
   SUB-PAGE HEADER (education.html and similar
   pages that aren't full case studies)
============================================= */
.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-quiet);
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}

.subpage-back:hover { color: var(--periwinkle); }

.subpage-hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}

.subpage-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 1.25rem;
}

.subpage-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  line-height: 1.15;
  color: var(--paper);
  max-width: 24ch;
  margin-bottom: 1.5rem;
}

.subpage-hero h1 em { font-style: italic; color: var(--periwinkle); }

.subpage-lede {
  font-size: 1.02rem;
  color: var(--ink-quiet);
  max-width: 56ch;
  line-height: 1.7;
}

.edu-placeholder-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}


@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; order: -1; }
  .nav-logo { order: 1; }
  .nav { z-index: 101; }

  /* Pinned mobile dropdown — stays fixed directly under the sticky
     nav as the page scrolls, instead of scrolling away with content. */
  .nav-links-mobile.is-open {
    position: fixed;
    top: var(--mobile-nav-offset, 64px);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--mobile-nav-offset, 64px));
    overflow-y: auto;
    z-index: 99;
  }
  .nav { padding: 1rem 1.25rem; }

  .page { padding: 0 1.25rem; }

  .hero { padding: 2.5rem 0 2.5rem; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.7rem); }

  .hero-actions { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .btn-primary { width: 100%; justify-content: center; }

  .section { padding: 3.5rem 0; }

  .work-status { display: block; margin-bottom: 0.5rem; margin-right: 0; }

  .contact-section { padding: 4rem 0 5rem; }
  .contact-email { width: 100%; justify-content: center; }

  footer {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1.25rem;
    gap: 0.5rem;
  }

  .glow { display: none; }
}

/* =============================================
   RESPONSIVE — 400px
============================================= */
@media (max-width: 400px) {
  .hero h1 { font-size: clamp(1.9rem, 10vw, 2.4rem); }
  .work-text h3 { font-size: 1.15rem; }
}
