/* =============================================
   TOKENS — "Chalkboard"
   Classic green board, chalk-white type, real
   grain texture, mounted in a wood frame. The
   most literal, hand-drawn identity on the site —
   earlier reps, a classroom mood.
============================================= */
:root {
  --wood:        #3D2817;
  --wood-dark:   #2B1B0F;
  --wood-light:  #5A3D24;

  --board:       #1E3A2D;
  --board-dark:  #16302A;
  --board-2:     #234334;

  --chalk:       #F2EFE3;
  --chalk-dim:   #C9D4CC;
  --chalk-quiet: #8FA396;

  --line:        rgba(242,239,227,0.18);
  --line-strong: rgba(242,239,227,0.3);

  --serif:     'Special Elite', 'Courier New', monospace;
  --sans:      'Cabin', -apple-system, BlinkMacSystemFont, sans-serif;
  --hand:      'Permanent Marker', cursive;

  --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);

  /* Chalk grain — layered subtle noise via radial gradients */
  --grain:
    radial-gradient(circle at 8% 14%, rgba(242,239,227,0.045) 0%, transparent 1.4%),
    radial-gradient(circle at 22% 68%, rgba(242,239,227,0.035) 0%, transparent 1.1%),
    radial-gradient(circle at 38% 30%, rgba(242,239,227,0.04) 0%, transparent 1.3%),
    radial-gradient(circle at 51% 82%, rgba(242,239,227,0.03) 0%, transparent 1%),
    radial-gradient(circle at 67% 12%, rgba(242,239,227,0.045) 0%, transparent 1.5%),
    radial-gradient(circle at 79% 55%, rgba(242,239,227,0.03) 0%, transparent 1.1%),
    radial-gradient(circle at 91% 88%, rgba(242,239,227,0.04) 0%, transparent 1.3%),
    radial-gradient(circle at 14% 92%, rgba(242,239,227,0.035) 0%, transparent 1.2%),
    radial-gradient(circle at 95% 22%, rgba(242,239,227,0.03) 0%, transparent 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 {
  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);
}

/* =============================================
   WOOD FRAME — body is the wood, .page is the
   board itself, inset like it's mounted
============================================= */
body {
  background: var(--wood);
  background-image:
    repeating-linear-gradient(100deg, rgba(0,0,0,0.06) 0px, transparent 2px, transparent 9px, rgba(0,0,0,0.05) 11px),
    repeating-linear-gradient(95deg, rgba(255,255,255,0.025) 0px, transparent 1px, transparent 14px, rgba(255,255,255,0.02) 15px);
  color: var(--chalk-dim);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

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

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

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

::selection {
  background: var(--chalk);
  color: var(--board-dark);
}

.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(--chalk);
  color: var(--board-dark);
  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 (chalk dust haze instead of glow)
============================================= */
.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(242,239,227,0.07), transparent 70%);
}

/* =============================================
   BOARD SURFACE — wraps nav + main + footer in
   a frame so the whole viewport reads as a
   chalkboard mounted in wood trim
============================================= */
.chalkboard-frame {
  background-color: var(--board);
  background-image: var(--grain);
  margin: 1.25rem;
  border-radius: 4px;
  border: 10px solid var(--wood-dark);
  outline: 3px solid var(--wood-light);
  outline-offset: -14px;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.35),
    0 12px 32px rgba(0,0,0,0.45);
  position: relative;
  overflow: hidden;
}

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

.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(--chalk-dim);
  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(--chalk);
  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(--chalk) !important; font-weight: 400 !important; font-family: var(--hand); font-size: 1.15rem !important; }

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

.nav-toggle:hover { background: rgba(242,239,227,0.08); }

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

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

.nav-links-mobile li { border-top: 1px dashed 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(--chalk-dim);
}

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

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

/* =============================================
   SUB-PAGE HEADER
============================================= */
.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--hand);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--chalk-quiet);
  margin: 2rem 0 1rem;
  transition: color 0.2s ease;
}

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

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

.subpage-eyebrow {
  font-family: var(--hand);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--chalk-dim);
  margin-bottom: 0.75rem;
}

.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(--chalk);
  max-width: 24ch;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 1px rgba(242,239,227,0.25);
}

.subpage-hero h1 em {
  font-style: italic;
  color: var(--chalk);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

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

/* =============================================
   PLACEHOLDER NOTE — like a taped-up index card
============================================= */
.edu-placeholder-note {
  background: var(--board-2);
  border: 1.5px dashed var(--line-strong);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0 3rem;
  position: relative;
}

.edu-placeholder-note .note-label {
  font-family: var(--hand);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--chalk);
  display: block;
  margin-bottom: 0.3rem;
}

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

/* =============================================
   BOOTCAMP PROJECTS — stacked, alternating rows
   Same boxed .edu-card identity (background, border,
   padding, hover lift) as before, but each card's
   internal layout is now image-beside-text, like the
   index.html work-spread pattern, alternating which
   side the image sits on per row instead of a tile grid.
============================================= */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.edu-card {
  background: var(--board-2);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.edu-card:nth-of-type(even) .edu-card-image { order: 2; }
.edu-card:nth-of-type(even) .edu-card-text { order: 1; }

.edu-card:hover,
.edu-card:focus-visible {
  border-color: var(--chalk);
  transform: translateY(-2px);
}

/* ---------- Image placeholder — like a taped-up snapshot,
   matches the dashed shot-frame language used in case studies ---------- */
.edu-card-image {
  aspect-ratio: 16 / 10;
  border: 1.5px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--board-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--chalk-quiet);
  transition: border-color 0.2s ease;
}

.edu-card:hover .edu-card-image,
.edu-card:focus-visible .edu-card-image {
  border-color: var(--chalk);
}

.edu-card-image.has-image {
  border-style: solid;
  border-color: var(--line);
  padding: 0;
  overflow: hidden;
}

.edu-card:hover .edu-card-image.has-image,
.edu-card:focus-visible .edu-card-image.has-image {
  border-color: var(--chalk);
}

.edu-card-image.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 5px;
  display: block;
}

.edu-card-image .edu-image-icon {
  width: 26px;
  height: 26px;
  opacity: 0.75;
}

.edu-card-image span.edu-image-label {
  font-family: var(--hand);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  padding: 0 1rem;
}

.edu-card-text {
  display: flex;
  flex-direction: column;
}

.edu-card .edu-program {
  font-family: var(--hand);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--chalk-quiet);
  margin-bottom: 0.6rem;
}

.edu-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--chalk);
  margin-bottom: 0.6rem;
  transition: color 0.2s ease;
}

.edu-card p {
  font-size: 0.95rem;
  color: var(--chalk-quiet);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 48ch;
}

.edu-card .work-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--chalk);
  padding: 0.4rem 0.9rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: 20px;
  align-self: flex-start;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.edu-card:hover .work-link {
  border-color: var(--chalk);
  background: rgba(242,239,227,0.06);
}

.edu-card .work-link svg { transition: opacity 0.2s ease; }
.edu-card:hover .work-link svg,
.edu-card:focus-visible .work-link svg { opacity: 0.85; }

/* =============================================
   FOOTER
============================================= */
footer {
  border-top: 1px dashed var(--line-strong);
  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(--chalk-quiet);
}

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

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

/* =============================================
   RESPONSIVE — TABLET (1024px)
============================================= */
@media (max-width: 1024px) {
  .page { padding: 0 2.25rem; }
}

/* =============================================
   RESPONSIVE — NARROW TABLET (900px)
============================================= */
@media (max-width: 900px) {
  .nav { padding: 1.1rem 1.75rem; }
  .nav-links { gap: 1.5rem; }
  .page { padding: 0 1.75rem; }
  footer { padding: 1.75rem; }
}

/* =============================================
   RESPONSIVE — MOBILE (640px)
============================================= */
@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; }

  .chalkboard-frame {
    margin: 0.6rem;
    border-width: 6px;
    outline-offset: -10px;
  }

  .edu-grid { gap: 1.25rem; }

  .edu-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .edu-card:nth-of-type(even) {
    grid-template-columns: 1fr;
  }

  .edu-card:nth-of-type(even) .edu-card-image { order: 0; }
  .edu-card:nth-of-type(even) .edu-card-text { order: 1; }

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

  .glow { display: none; }
}

/* =============================================
   RESPONSIVE — 400px
============================================= */
@media (max-width: 400px) {
  .subpage-hero h1 { font-size: clamp(1.8rem, 9vw, 2.3rem); }
  .edu-card h3 { font-size: 1.15rem; }
}
