:root {
  --paper:    #F1E7D2;
  --paper-2:  #EBDFC4;
  --ink:      #1F1A14;
  --muted:    rgba(31, 26, 20, 0.55);
  --soft:     rgba(31, 26, 20, 0.32);
  --hairline: rgba(31, 26, 20, 0.18);
  --accent:   #C0521C;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  animation: rise 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

.sans {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 500;
}

/* ════════════════════════════
   ░░  LANDING — two bare boxes
   ════════════════════════════ */
.landing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
}
.box {
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: background 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
  position: relative;
}
.box-l { animation: fadeIn 0.9s 0.10s ease both; }
.box-r { animation: fadeIn 0.9s 0.22s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.box:hover { background: var(--paper-2); border-color: var(--ink); }
.box-title {
  position: relative;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 104px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  display: inline-block;
}
.box-title::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0.15em;
  height: 2px;
  background: var(--accent);
  transition: right 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.box:hover .box-title::after { right: 0; }

/* ════════════════════════════
   ░░  DETAIL PAGES
   ════════════════════════════ */
.detail-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 40px 96px;
}
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}
.topnav a { transition: color 0.2s ease; }
.topnav a:hover { color: var(--accent); }
.topnav .resume::after { content: " ↗"; }

/* Section switcher */
.switcher {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 32px;
  padding: 40px 0 28px;
  margin: 24px 0 32px;
  border-bottom: 1px solid var(--hairline);
}
.switcher a {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--muted);
  position: relative;
  padding-bottom: 10px;
  transition: color 0.25s ease;
}
.switcher a.active { color: var(--ink); }
.switcher a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}
.switcher a:not(.active):hover { color: var(--ink); }
.switcher .sep {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-size: clamp(28px, 4.4vw, 44px);
  color: var(--soft);
}

.detail-head { padding: 56px 0 56px; }
.detail-head .label { color: var(--muted); margin-bottom: 22px; }
.detail-head h1 {
  font-weight: 400;
  font-size: clamp(54px, 7.5vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 26px;
}
.detail-head h1 em { font-style: italic; color: var(--accent); font-weight: 300; }
.detail-head .deck {
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.45;
  max-width: 52ch;
  margin: 0;
}

.ds { padding: 56px 0; border-top: 1px solid var(--hairline); }
.ds-head {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: baseline;
  margin-bottom: 28px;
}
.ds-head .label { color: var(--muted); padding-top: 8px; }
.ds-head h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.ds-head h2 em { font-style: italic; color: var(--accent); font-weight: 300; }
.ds-body {
  padding-left: 172px;
  max-width: 100%;
}
.ds-body p { margin: 0 0 14px; max-width: 60ch; line-height: 1.6; }
.ds-body p:last-child { margin-bottom: 0; }
.ds-body p em { font-style: italic; }

/* Thesis block */
.thesis { padding: 4px 0 8px; }
.thesis .t-title {
  font-style: italic;
  font-weight: 400;
  font-size: 23px;
  line-height: 1.3;
  margin: 0 0 14px;
  max-width: 44ch;
}
.thesis .t-meta { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.thesis .t-meta a {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.thesis .t-meta a:hover { color: var(--accent); border-color: var(--accent); }
.thesis .t-abs { color: var(--ink); max-width: 60ch; margin: 0 0 12px; }
.thesis .t-abs:last-of-type { margin-bottom: 0; }
.thesis .t-abs em { font-style: italic; color: var(--accent); }

/* Sub-section label (e.g. "By me" / "About me" inside a Publications block) */
.sub-label {
  color: var(--accent);
  margin: 28px 0 14px;
}
.sub-label:first-child { margin-top: 0; }

/* Placeholder note (italic, muted) for sections still in progress */
.placeholder {
  margin: 0;
  font-style: italic;
  color: var(--muted);
  font-size: 16px;
  max-width: 56ch;
}
.placeholder em { font-style: italic; color: var(--accent); }

/* References / publications list */
.refs { list-style: none; padding: 0; margin: 0; }
.refs li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}
.refs li:first-child { border-top: none; padding-top: 4px; }
.refs .year {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 4px;
}
.refs .cite { font-size: 15px; line-height: 1.55; max-width: 62ch; }
.refs .cite em { font-style: italic; }
.refs .cite .venue { font-style: italic; color: var(--muted); }
.refs .cite a {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.refs .cite a:hover { color: var(--accent); border-color: var(--accent); }

/* Vita list */
.vita { list-style: none; padding: 0; margin: 0; }
.vita li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  align-items: baseline;
}
.vita li:first-child { border-top: none; }
.vita .role { font-size: 16px; }
.vita .role em { font-style: italic; color: var(--accent); }
.vita .where {
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Designs (runway pieces) */
.designs { list-style: none; padding: 0; margin: 0; }
.designs li {
  border-top: 1px solid var(--hairline);
}
.designs li:first-child { border-top: none; }
.designs a {
  display: block;
  padding: 32px 0;
  transition: padding 0.25s ease, background 0.25s ease;
}
.designs li:hover a {
  padding-left: 16px;
  padding-right: 16px;
  background: var(--paper-2);
}
.designs .d-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 14px;
}
.designs .d-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.designs .d-title em { font-style: italic; color: var(--accent); font-weight: 300; }
.designs .d-open {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.designs li:hover .d-open { color: var(--accent); transform: translateX(3px); }
.designs .d-desc {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 64ch;
}
.designs .d-mat,
.designs .d-cred {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.55;
}
.designs .d-mat { margin-bottom: 6px; }

/* Atelier capsules */
.capsules { list-style: none; padding: 0; margin: 0; }
.capsules li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
  align-items: baseline;
  transition: padding 0.25s ease;
}
.capsules li:first-child { border-top: none; }
.capsules li:hover { padding-left: 8px; padding-right: 8px; background: var(--paper-2); }
.capsules .year {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.capsules .t { font-size: 17px; line-height: 1.4; }
.capsules .t em { font-style: italic; color: var(--accent); }
.capsules .t .sub { display: block; color: var(--muted); font-size: 14px; font-style: italic; margin-top: 2px; }
.capsules .pt {
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Film list — capsules wrapped in anchors that take the whole row */
.film-list li { padding: 0; display: block; transition: background 0.25s ease; }
.film-list li:hover { background: var(--paper-2); padding-left: 0; padding-right: 0; }
.film-list li > a {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  transition: padding 0.25s ease;
}
.film-list li:hover > a { padding-left: 12px; padding-right: 12px; }
.film-list .t::after {
  content: " \2192";
  color: var(--soft);
  font-family: "Fraunces", Georgia, serif;
  font-style: normal;
  margin-left: 6px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.film-list li:hover .t::after { color: var(--accent); padding-left: 4px; }

/* Lightbox — inline viewer for gallery photos */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(31, 26, 20, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 32px;
  cursor: zoom-out;
}
.lightbox.is-open {
  display: flex;
  animation: lbFade 0.2s ease both;
}
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 64px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}
.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(241, 231, 210, 0.32);
  color: var(--paper);
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox .lb-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 999px;
}
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}
.lightbox .lb-prev { left: 24px; }
.lightbox .lb-next { right: 24px; }
.lightbox .lb-close:hover,
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover {
  background: rgba(241, 231, 210, 0.14);
  border-color: var(--paper);
}
@media (max-width: 600px) {
  .lightbox { padding: 14px; }
  .lightbox .lb-prev { left: 8px; }
  .lightbox .lb-next { right: 8px; }
  .lightbox .lb-close { top: 12px; right: 12px; }
}

/* Film gallery — masonry-style via CSS columns, preserves aspect ratios */
.gallery {
  column-count: 3;
  column-gap: 12px;
  margin: 0 0 32px;
}
.gallery a {
  display: block;
  margin: 0 0 12px;
  break-inside: avoid;
  overflow: hidden;
  background: var(--paper-2);
  transition: opacity 0.25s ease;
}
.gallery a:hover { opacity: 0.88; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 520px) { .gallery { column-count: 1; } }

/* Cross-page footer */
.pair-link {
  margin-top: 64px;
  padding: 28px 0 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.pair-link .label { color: var(--muted); }
.pair-link a {
  font-style: italic;
  font-size: clamp(24px, 3vw, 32px);
  position: relative;
  transition: color 0.25s ease;
}
.pair-link a:hover { color: var(--accent); }
.pair-link a::after { content: " →"; transition: padding-left 0.25s ease; }
.pair-link a:hover::after { padding-left: 6px; }

/* Responsive */
@media (max-width: 760px) {
  .landing { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 14px; padding: 14px; }
  .detail-wrap { padding: 22px 22px 64px; }
  .topnav { font-size: 10px; }
  .switcher { gap: 20px; padding: 28px 0 20px; margin: 16px 0 24px; }
  .ds-head { grid-template-columns: 1fr; gap: 8px; }
  .ds-body { padding-left: 0; }
  .capsules li { grid-template-columns: 56px 1fr; }
  .capsules .pt { grid-column: 2 / -1; }
}
