/* Minimal, academic-style theme: white page, one narrow column,
   wide-tracked uppercase title and navigation. */
:root {
  --bg: #ffffff;
  --text: #424242;
  --heading: #212121;
  --title: #222222;
  --muted: #8a8a8a;
  --nav: #a8a8a8;
  --rule: #d9d9d9;
  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ───── Header ───── */
.site-header {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 16px 0;
  text-align: center;
}
.site-title {
  margin: 0;
  font-size: clamp(18px, 6vw, 48px);
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--title);
}
.site-title a { text-decoration: none; }
.site-subtitle {
  margin: 18px 0 0;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 30px;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--nav);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--heading); }
.menu-btn { display: none; }

/* ───── Page ───── */
.page {
  max-width: 700px;
  margin: 56px auto 0;
  padding: 0 16px;
  border-top: 1px solid var(--rule);
}
.section { padding: 56px 0 8px; }
.section h2 {
  margin: 0 0 28px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
}
.section p { margin: 0 0 18px; }
.lead { font-weight: 600; color: var(--heading); }

.about-photo {
  width: 180px; margin: 0 auto 28px;
}
.about-photo img { width: 180px; height: 180px; object-fit: cover; }

/* ───── Projects ───── */
.project { margin-bottom: 48px; }
.project:last-child { margin-bottom: 0; }
.project h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--heading); }
.meta { margin: 2px 0 14px !important; font-size: 14px; color: var(--muted); }
.highlight { font-weight: 600; color: var(--heading); }
.project figure { margin: 0 0 18px; cursor: zoom-in; }
.project figure img { width: 100%; }
.reel { position: relative; aspect-ratio: 1600 / 893; overflow: hidden; background: #e9e9eb; }
.reel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.1s ease; transform: scale(1.07);
}
.reel img.on { opacity: 1; animation: drift 4.6s ease-out both; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .reel img.on { animation: none; } }
.video { margin: 0 0 18px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.gallery { display: grid; gap: 12px; margin-bottom: 18px; }
.gallery.multi { grid-template-columns: repeat(2, 1fr); }
.gallery { align-items: start; row-gap: 20px; }
.gallery figure { margin: 0; }
.gallery.multi figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gallery figcaption { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
@media (max-width: 600px) { .gallery.multi { grid-template-columns: 1fr; } }
.tags { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.more { font-weight: 600; text-decoration: none; color: var(--heading); margin-right: 20px; }
.more:hover { text-decoration: underline; }

/* ───── Lists (achievements, experience) ───── */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.list li:first-child { padding-top: 0; }
.list li:last-child { border-bottom: 0; }
.list h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--heading); }
.list .org { font-weight: 400; color: var(--text); }
.list p { margin: 4px 0 0; }
.date { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* ───── Skills ───── */
.skills { margin: 0; }
.skills dt { font-weight: 700; color: var(--heading); }
.skills dd { margin: 0 0 14px; }

/* ───── Contact ───── */
#contact { text-align: center; }
.contact-links a { font-weight: 600; text-decoration: none; color: var(--heading); margin: 0 12px; white-space: nowrap; }
.contact-links a:hover { text-decoration: underline; }

/* ───── Footer ───── */
.footer {
  max-width: 700px;
  margin: 64px auto 0;
  padding: 28px 16px 48px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nav);
}
.footer p { margin: 0; }

/* ───── Lightbox ───── */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  display: grid; place-items: center; padding: 24px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; }

/* ───── Phones ───── */
@media (max-width: 600px) {
  .site-header { padding-top: 48px; }
  .site-title { letter-spacing: 0.1em; }
  .menu-btn {
    display: inline-block; margin-top: 28px; padding: 6px 0;
    background: none; border: 0; border-bottom: 1px solid var(--rule);
    font: 500 12px var(--font); letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text); cursor: pointer;
  }
  .nav-links { display: none; flex-direction: column; margin-top: 16px; gap: 10px; }
  .nav-links.open { display: flex; }
  .page { margin-top: 36px; }
  .section { padding-top: 44px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
