/* ============================================
   TECHIN 600 Process Book — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,400&family=DM+Mono:wght@400;500&display=swap');
@import url('annotations.css');

/* --- Design Tokens --- */
:root {
  --bg:           #FFFFFF;
  --bg-soft:      #FAFAF8;
  --bg-note:      #F4EEE0;
  --bg-card:      #FFFFFF;
  --bg-callout:   #F5EDE0;
  --text:         #0E0D0B;
  --text-muted:   #6E6A63;
  --text-light:   #AAA69F;
  --accent:       #B85C2C;
  --accent-light: #FAEDE4;
  --border:       #E8E4DC;
  --border-light: #F0EDE7;
  --white:        #FFFFFF;

  --font-display: 'Hanken Grotesk', 'Inter', sans-serif;
  --font-sans:   'Inter', -apple-system, sans-serif;
  --font-mono:   'DM Mono', 'Courier New', monospace;

  --radius-sm:   8px;
  --radius:      16px;
  --radius-md:   20px;
  --radius-lg:   28px;
  --radius-xl:   36px;

  --shadow-sm:   0 2px 8px rgba(14,13,11,0.05);
  --shadow-md:   0 6px 24px rgba(14,13,11,0.08);
  --shadow-lg:   0 16px 48px rgba(14,13,11,0.12);
  --shadow-card: 0 2px 12px rgba(14,13,11,0.06), 0 0 0 1px rgba(14,13,11,0.04);

  --ease-snappy: cubic-bezier(0.12, 0.23, 0.50, 1.00);
  --ease-out:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition:  0.28s var(--ease-snappy);
  --transition-slow: 0.5s var(--ease-out);
}

/* --- Language toggle visibility ---
   Use body:not(.zh) for higher specificity so element-level display rules
   (e.g. .overview-goals li { display: flex }) can't override the hide. */
body:not(.zh) .lang-zh { display: none; }
body.zh .lang-en { display: none; }
body.zh .lang-zh { display: revert; }

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h4, h5, h6 { font-family: var(--font-sans); font-weight: 600; line-height: 1.3; }
p { max-width: 68ch; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--accent-light);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 36px;
}

/* ============================================
   ENTRANCE ANIMATIONS
   ============================================ */
@keyframes enterUp {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(var(--enter-rotate, 0deg));
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

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

.reveal { opacity: 0; }
.reveal.visible {
  animation: enterUp 0.45s var(--ease-snappy) forwards;
}

.reveal-children > * { opacity: 0; }
.reveal-children.visible > * { animation: enterFade 0.4s var(--ease-snappy) forwards; }
.reveal-children.visible > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-children.visible > *:nth-child(2) { animation-delay: 0.12s; }
.reveal-children.visible > *:nth-child(3) { animation-delay: 0.19s; }
.reveal-children.visible > *:nth-child(4) { animation-delay: 0.26s; }
.reveal-children.visible > *:nth-child(5) { animation-delay: 0.33s; }


.step {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.step.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   SITE HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo { display: flex; flex-direction: column; }
.nav-logo-main {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.nav-logo-sub { font-size: 0.68rem; color: var(--text-light); }

.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 4px 0;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 4px 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
  line-height: 1.5;
}
.lang-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   HOME HERO
   ============================================ */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border-light);
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-kicker::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-soft);
  transition: background var(--transition), border-color var(--transition);
}
.meta-tag:hover { background: var(--bg-note); }
.meta-tag span { color: var(--accent); font-weight: 500; }

/* ============================================
   COURSE OVERVIEW
   ============================================ */
.course-overview {
  padding: 72px 0;
  border-bottom: 1px solid var(--border-light);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
  max-width: 40px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.overview-text { font-size: 0.97rem; line-height: 1.85; color: var(--text-muted); }
.overview-text strong { color: var(--text); }
.overview-text + .overview-text { margin-top: 14px; }
.overview-grid .section-label { margin-bottom: 12px; }

.overview-goals { list-style: none; }
.overview-goals li {
  display: flex;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.overview-goals li::before { content: '→'; color: var(--accent); flex-shrink: 0; }

/* ============================================
   PROJECT CARDS
   ============================================ */
.projects-section { padding: 72px 0 104px; }

.projects-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 44px;
}
.projects-header h2 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.projects-header p { font-size: 0.85rem; color: var(--text-muted); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Cards animate in with slight tilt — JS sets --enter-rotate */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  cursor: pointer;
  transition:
    transform 0.32s var(--ease-snappy),
    box-shadow 0.32s var(--ease-snappy);
  will-change: transform;
}
.project-card.visible {
  animation: enterUp 0.48s var(--ease-snappy) forwards;
}
.project-card:hover {
  transform: translateY(-6px) rotate(0.4deg);
  box-shadow: var(--shadow-md);
}

.card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-note);
  overflow: hidden;
  position: relative;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.project-card:hover .card-thumb img { transform: scale(1.04); }

/* Card with subject-safe crop — keeps phone case fully visible */
.card-thumb--natural {
  aspect-ratio: 4/3;
}
.card-thumb--natural img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.card-thumb--shift-up img { object-position: center 35%; }

.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.placeholder-num {
  font-family: var(--font-display);
  font-size: 4.5rem;
  color: var(--border);
  line-height: 1;
}
.placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}
.status-badge--complete { background: #E8F5EC; color: #2A7A3A; }
.status-badge--progress { background: var(--accent-light); color: var(--accent); }
.status-badge--upcoming { background: var(--bg-soft); color: var(--text-light); }

.card-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; line-height: 1.2; }
.card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; flex: 1; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.card-weeks { font-family: var(--font-mono); font-size: 0.70rem; color: var(--text-light); }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 16px;
  transition: gap var(--transition);
}
.card-link .arrow { transition: transform var(--transition); }
.project-card:hover .card-link { gap: 10px; }
.project-card:hover .card-link .arrow { transform: translateX(3px); }

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 0;
  background: var(--bg-soft);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-left {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: var(--text-light);
  line-height: 1.8;
}
.footer-right a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.footer-right a:hover { color: var(--accent); }

/* ============================================
   PROJECT DETAIL PAGE
   ============================================ */
.project-page { min-height: 100vh; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 18px 36px;
  width: 100%;
  transition: color var(--transition);
  border-bottom: 1px solid var(--border-light);
}
.back-link:hover { color: var(--accent); }
.back-link .arrow { transition: transform var(--transition); }
.back-link:hover .arrow { transform: translateX(-3px); }
.back-link--bottom { border-top: 1px solid var(--border-light); border-bottom: none; margin-top: 20px; padding: 20px 0; }

/* Project Hero */
.project-hero {
  padding: 60px 0 52px;
  border-bottom: 1px solid var(--border-light);
}

.project-hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.project-hero-kicker::before {
  content: '';
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--accent);
}

.project-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.project-hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 30px;
}

.project-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }

/* Main layout */
.project-layout {
  display: grid;
  grid-template-columns: 196px 1fr;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 36px;
  align-items: start;
}

/* Sidebar */
.project-sidebar {
  position: sticky;
  top: 80px;
  padding: 52px 0;
}

.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.sidebar-nav a:hover { background: var(--bg-soft); color: var(--text); }
.sidebar-nav a.active { background: var(--accent-light); color: var(--accent); }

.sidebar-nav-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-light);
  min-width: 18px;
}
.sidebar-nav a.active .sidebar-nav-num { color: var(--accent); opacity: 0.7; }

/* Sidebar sub-nav (Part A / Part B links) */
.sidebar-subnav {
  list-style: none;
  padding: 0;
  margin: 2px 0 4px 26px;
}
.sidebar-subnav a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text-light);
  text-decoration: none;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.sidebar-subnav a:hover { color: var(--text); background: var(--bg-soft); }
.sidebar-subnav a.active { color: var(--accent); background: var(--accent-light); }

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 60px; left: 0; right: 0;
  height: 2px;
  background: var(--border-light);
  z-index: 99;
}
.reading-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* Content */
.project-content {
  padding: 0 0 96px 52px;
  border-left: 1px solid var(--border-light);
}

.content-section { padding: 60px 0; border-bottom: 1px solid var(--border-light); }
.content-section:last-of-type { border-bottom: none; }

a.content-section-label { text-decoration: none; }
.content-section-label {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.content-section-num { color: var(--accent); font-weight: 500; }

/* Part A / Part B sub-section headings inside process */
.process-part-heading {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 44px 0 22px;
  border-top: 1px solid var(--border);
}
.process-part-heading:first-child { padding-top: 0; border-top: none; }
.process-part-heading + .step { border-top: none; padding-top: 16px; }
.process-part-heading-letter {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  text-align: center;
  padding-top: 3px;
}
.process-part-heading p { margin: 0; line-height: 1.65; }
.process-part-heading .part-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 5px;
}
.process-part-heading h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 9px;
}
.process-part-heading .part-desc { font-size: 0.87rem; color: var(--text-muted); }

/* Invisible step number (used for intro paragraphs without a number) */
.step-num--ghost { visibility: hidden; }

.content-section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  line-height: 1.15;
}

.content-section p {
  font-size: 0.94rem;
  line-height: 1.88;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.content-section p strong { color: var(--text); }

/* Materials */
.overview-materials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.material-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: background var(--transition);
}
.material-chip:hover { background: var(--bg-note); }

/* Blockquote */
blockquote a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 22px;
  margin: 28px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

/* Process steps */
.process-steps { margin-top: 8px; }

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px dashed var(--border);
  align-items: start;
}
.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--border);
  line-height: 1;
  font-style: italic;
  text-align: center;
  padding-top: 2px;
}

.step-body h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.step-body p { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 14px; }
.step-body ol { padding-left: 1.4em; margin: 10px 0 14px; line-height: 1.9; font-size: 0.87rem; color: var(--text-muted); }
.step-body .photo-grid + p,
.step-body ol + p { margin-top: 14px; }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.photo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.photo-grid--1 { grid-template-columns: 1fr; }

.photo-item {
  aspect-ratio: 4/3;
  background: var(--bg-note);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.photo-item:hover {
  transform: scale(1.02) rotate(-0.5deg);
  box-shadow: var(--shadow-md);
}
.photo-item:hover img { transform: scale(1.04); }
.photo-item::after {
  content: '↗';
  position: absolute;
  top: 10px; right: 10px;
  width: 26px; height: 26px;
  background: rgba(14,13,11,0.45);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.photo-item:hover::after { opacity: 1; }

/* Full image — no crop, natural height */
.photo-item--full {
  aspect-ratio: unset;
  height: auto;
}
.photo-item--full img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Portrait photo — taller than wide (3:4) */
.photo-item--portrait {
  aspect-ratio: 3/4;
}

/* Cover photo — between hero section and main layout */
.project-cover {
  max-width: 1120px;
  margin: 0 auto 0;
  padding: 0 36px;
  line-height: 0;
}
.project-cover img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

/* Photo placeholder */
.photo-placeholder {
  aspect-ratio: 4/3;
  background: var(--bg-note);
  border-radius: var(--radius);
  border: 1.5px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition);
}
.photo-placeholder:hover { background: #EDE7D4; }
.photo-placeholder-icon { font-size: 1.3rem; color: var(--border); }
.photo-placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  color: var(--text-light);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 12px;
}

.photo-caption { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-light); margin-top: 8px; }

.photo-grid figure { margin: 0; }
.photo-grid figcaption {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.45;
  padding: 0 2px;
}

/* Knowledge cards */
.knowledge-list { display: flex; flex-direction: column; gap: 12px; }

.knowledge-card {
  background: var(--bg-callout);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.knowledge-card:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }

.knowledge-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.knowledge-card h4 .card-icon { flex-shrink: 0; opacity: 0.75; }
.knowledge-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.68; margin: 0; }

/* Notes — ruled paper */
.notes-section-inner {
  background: var(--bg-note);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.notes-section-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent, transparent calc(1.84rem - 1px),
    rgba(184, 92, 44, 0.10) calc(1.84rem - 1px),
    rgba(184, 92, 44, 0.10) 1.84rem
  );
  background-position: 0 77px;
  pointer-events: none;
}

.notes-content { position: relative; z-index: 1; }
.notes-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(184, 92, 44, 0.15);
}
.notes-content p { font-size: 0.92rem; line-height: 1.84rem; color: var(--text-muted); margin-bottom: 1.84rem; }
.notes-content .photo-grid { margin-top: 20px; }
.notes-content .photo-grid + .photo-grid { margin-top: 10px; }

.reflection-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.reflection-list li {
  display: flex;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-muted);
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(184, 92, 44, 0.15);
}
.reflection-list li:last-child { border-bottom: none; }
.reflection-icon { flex-shrink: 0; }

/* In-progress banner */
.in-progress-banner {
  background: var(--accent-light);
  border: 1px solid rgba(184, 92, 44, 0.2);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}
.in-progress-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.in-progress-text h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 3px; }
.in-progress-text p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* Safety / info callout box */
.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 14px 0;
}
.callout--safety {
  background: #FAEFD8;
  border: 1px solid rgba(184, 92, 44, 0.25);
  border-left: 3px solid var(--accent);
}
.callout-icon {
  flex-shrink: 0;
  color: var(--accent);
  padding-top: 1px;
}
.callout-body {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.65;
}
.callout-body strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

/* Forward-looking idea card */
.idea-card {
  background: var(--accent-light);
  border: 1.5px dashed rgba(184, 92, 44, 0.3);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.idea-card-icon {
  flex-shrink: 0;
  color: var(--accent);
  padding-top: 2px;
}
.idea-card-body h5 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.idea-card-body p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}
.idea-card-body p + p { margin-top: 8px; }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(14, 13, 11, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: scale(0.94) rotate(-1deg);
  transition: transform 0.35s var(--ease-snappy);
}
.lightbox.open .lightbox-img { transform: scale(1) rotate(0deg); }

.lightbox-close {
  position: absolute;
  top: 24px; right: 28px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); color: white; }

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .project-layout { grid-template-columns: 1fr; padding: 0 20px; }
  .project-sidebar { position: static; padding: 24px 0 0; border-bottom: 1px solid var(--border-light); }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar-nav li { margin: 0; }
  .project-content { padding: 0 0 64px; border-left: none; }
  .overview-grid { grid-template-columns: 1fr; gap: 28px; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 56px 0 44px; }
  .projects-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 40px 1fr; }
  .step-num { font-size: 2rem; }
  .footer-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
  .back-link { padding: 16px 20px; }
  .projects-header { flex-direction: column; gap: 8px; }
  .nav-links { display: flex; }
  .nav-links li:not(:last-child) { display: none; }
  .notes-section-inner { padding: 24px 20px; }
}
