/* ============================================================
   The English Desk — Design System
   Concept: "The Desk at Night" — a dark editorial journal lit
   by a single warm brass desk-lamp gradient.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color */
  --bg-base: #0a0d14;
  --bg-surface: #10131d;
  --bg-elevated: #161a26;
  --line: #262c3d;
  --line-soft: #1c202e;
  --paper: #f2ede1;
  --paper-dim: #b9b3a6;
  --ink-muted: #8b93a7;
  --gold-1: #e8c27a;
  --gold-2: #d4a24c;
  --gold-3: #a8762c;
  --gold-glow: rgba(212, 162, 76, 0.16);

  /* Type */
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;

  /* Rhythm */
  --max-w: 1180px;
  --measure: 680px;
  --radius-s: 6px;
  --radius-m: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold-2); color: #14110a; }

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

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 3px;
}

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

/* ---------- Ambient lamp glow (single, top-left, page-wide) ---------- */
.lamp-glow {
  position: fixed;
  top: -20vh;
  left: -10vw;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, var(--gold-glow) 0%, rgba(212,162,76,0.05) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(10px);
}

/* ---------- Reading progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-1));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

.nav-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--paper-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold-2);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--paper); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--gold-3);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gold-1) !important;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-cta:hover { background: var(--gold-2); color: #16130b !important; }
.nav-cta::after { display: none; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer;
  position: relative;
  z-index: 200;
}
.menu-toggle span {
  position: absolute;
  left: 9px;
  width: 22px; height: 1.5px;
  background: var(--paper);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 29px; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Breadcrumb ---------- */
.crumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 13px;
  color: var(--ink-muted);
  position: relative; z-index: 1;
}
.crumb a { color: var(--ink-muted); border-bottom: 1px solid transparent; }
.crumb a:hover { color: var(--gold-1); border-color: var(--gold-3); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 40px;
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--gold-1);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
  opacity: 0;
}
.eyebrow .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 8px 1px var(--gold-2);
}
.eyebrow .sep { color: var(--line); }

h1.headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  max-width: 920px;
  opacity: 0;
}
h1.headline em {
  font-style: italic;
  color: var(--gold-1);
}

.pron {
  font-size: 13.5px;
  color: var(--ink-muted);
  font-family: var(--sans);
  margin: 0 0 24px;
  opacity: 0;
}
.pron .tagset {
  color: var(--gold-2);
  margin-left: 6px;
}

.dek {
  font-size: 18px;
  line-height: 1.7;
  color: var(--paper-dim);
  max-width: var(--measure);
  margin: 0 0 30px;
  opacity: 0;
}
.dek strong { color: var(--paper); font-weight: 600; }

.hero-cta { opacity: 0; }
.hero-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  color: #16130b;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--radius-s);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 8px 24px -8px rgba(212,162,76,0.5);
}
.hero-cta a:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(212,162,76,0.65); }

/* Hero load sequence (single orchestrated moment) */
.hero.is-ready .eyebrow { animation: rise 0.7s var(--ease) 0.05s forwards; }
.hero.is-ready h1.headline { animation: rise 0.8s var(--ease) 0.15s forwards; }
.hero.is-ready .pron { animation: rise 0.7s var(--ease) 0.32s forwards; }
.hero.is-ready .dek { animation: rise 0.7s var(--ease) 0.42s forwards; }
.hero.is-ready .hero-cta { animation: rise 0.7s var(--ease) 0.52s forwards; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Layout: article + toc ---------- */
.layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 24px 100px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  position: relative;
  z-index: 1;
}
.layout.no-toc { grid-template-columns: 1fr; }

article.entry { max-width: var(--measure); }

article.entry h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 27px;
  margin: 52px 0 18px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 90px;
}
article.entry > h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }

article.entry p {
  color: var(--paper-dim);
  font-size: 16.5px;
  line-height: 1.85;
  margin: 0 0 20px;
}
article.entry p strong { color: var(--paper); font-weight: 600; }
article.entry ul, article.entry ol {
  color: var(--paper-dim);
  font-size: 16.5px;
  line-height: 1.8;
  padding-left: 22px;
  margin: 0 0 22px;
}
article.entry li { margin-bottom: 10px; }
article.entry li strong { color: var(--paper); }
article.entry li::marker { color: var(--gold-2); }

.callout {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold-2);
  border-radius: var(--radius-s);
  padding: 18px 22px;
  margin: 0 0 24px;
  font-size: 15.5px;
  color: var(--paper-dim);
  line-height: 1.75;
}
.callout .label {
  display: block;
  color: var(--gold-1);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

table.spec {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 26px;
  font-size: 14.5px;
}
table.spec th, table.spec td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--paper-dim);
}
table.spec th {
  color: var(--gold-1);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
}
table.spec tr:hover td { background: var(--bg-surface); }
.spec-note { font-size: 13.5px; color: var(--ink-muted); margin-top: -14px; margin-bottom: 26px; }

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 40px;
}
.related a {
  font-size: 13px;
  color: var(--gold-1);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.related a:hover { border-color: var(--gold-3); background: var(--bg-surface); }

/* Table of contents (sticky rail) */
.toc {
  position: sticky;
  top: 90px;
  align-self: start;
  font-size: 13.5px;
}
.toc-label {
  color: var(--ink-muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  margin: 0; padding: 0;
  border-left: 1px solid var(--line);
}
.toc li { margin-bottom: 4px; }
.toc a {
  display: block;
  padding: 6px 0 6px 16px;
  color: var(--ink-muted);
  border-left: 1.5px solid transparent;
  margin-left: -1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.toc a:hover { color: var(--paper-dim); }
.toc a.active { color: var(--gold-1); border-left-color: var(--gold-2); }

/* ---------- Cards (feature / track / campus) ---------- */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px;
  position: relative; z-index: 1;
}
.section-head { max-width: var(--measure); margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3.2vw, 32px);
  margin: 0 0 14px;
}
.section-head p { color: var(--paper-dim); font-size: 16px; line-height: 1.7; margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px 24px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--gold-3); transform: translateY(-3px); }
.card .kicker {
  font-size: 12px;
  color: var(--gold-2);
  font-weight: 600;
  margin-bottom: 10px;
}
.card h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
}
.card p { color: var(--paper-dim); font-size: 14.5px; line-height: 1.7; margin: 0 0 6px; }
.card a.more { font-size: 13px; color: var(--gold-1); }
.card a.more:hover { text-decoration: underline; }

.campus-card { text-align: left; }
.campus-card .name { font-family: var(--serif); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.campus-card .meta { font-size: 13.5px; color: var(--ink-muted); }

/* Entry list (index page journal grid) */
.entry-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line-soft); }
.entry-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.25s var(--ease);
}
.entry-row:hover { padding-left: 8px; }
.entry-num { font-family: var(--serif); font-size: 15px; color: var(--gold-2); padding-top: 2px; }
.entry-body h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
}
.entry-body h3 a:hover { color: var(--gold-1); }
.entry-body p { color: var(--paper-dim); font-size: 14.5px; line-height: 1.65; margin: 0 0 10px; max-width: 620px; }
.entry-body .read { font-size: 13px; color: var(--gold-1); }

/* Roadmap list (numbered ops list) */
.ops-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.ops-item { display: flex; gap: 18px; }
.ops-num { font-family: var(--serif); font-size: 26px; color: var(--gold-3); line-height: 1; }
.ops-item h3 { font-size: 16.5px; font-weight: 600; margin: 2px 0 8px; }
.ops-item p { color: var(--paper-dim); font-size: 14.5px; line-height: 1.7; margin: 0; }

/* Testimonials */
.quote-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px;
}
.quote-card p.q {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--paper);
  margin: 0 0 16px;
}
.quote-card .who { font-size: 13px; color: var(--gold-2); }

/* ---------- Final CTA band ---------- */
.cta-band {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding: 60px 24px;
  border-top: 1px solid var(--line-soft);
  position: relative; z-index: 1;
}
.cta-band-inner {
  background: radial-gradient(120% 160% at 0% 0%, var(--gold-glow), transparent 60%), var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 29px);
  font-weight: 600;
  margin: 0 0 8px;
  max-width: 480px;
}
.cta-band p { color: var(--paper-dim); font-size: 15px; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-shrink: 0; }
.btn-primary {
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  color: #16130b;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--radius-s);
  transition: transform 0.25s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  padding: 13px 22px;
  border: 1px solid var(--line);
  color: var(--paper);
  font-weight: 500;
  font-size: 14.5px;
  border-radius: var(--radius-s);
  transition: border-color 0.25s var(--ease);
}
.btn-ghost:hover { border-color: var(--gold-3); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 48px 24px 28px;
  position: relative; z-index: 1;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand .brand-name { font-size: 17px; }
.footer-addr {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.9;
  margin-top: 14px;
}
.footer-links h4 {
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.footer-links a {
  display: block;
  font-size: 13.5px;
  color: var(--paper-dim);
  margin-bottom: 10px;
}
.footer-links a:hover { color: var(--gold-1); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Floating contact rail (mobile) */
.quick-contact {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-contact a {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  font-size: 18px;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.5);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.quick-contact a:hover { transform: translateY(-3px) scale(1.04); border-color: var(--gold-3); }

/* ---------- Scroll reveal (single-purpose, sparing) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ops-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 30%;
    top: 68px;
    background: var(--bg-base);
    border-left: 1px solid var(--line-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 16px; }
  .menu-toggle { display: block; }
  .nav-cta { order: 99; margin-top: 8px; }

  .hero { padding: 40px 20px 28px; }
  .layout { padding: 10px 20px 70px; gap: 0; }
  .section { padding: 48px 20px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 20px; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; padding: 34px 24px; }
  .entry-row { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  h1.headline { font-size: 30px; }
  article.entry h2 { font-size: 22px; }
}
