:root {
  --bg: #0d0f12;
  --panel: #14171c;
  --line: #23272e;
  --text: #e7e9ec;
  --muted: #9aa1ab;
  --accent: #7cc4ff;
  --radius: 14px;
  --wrap: 1040px;
  --showcase: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}
.brand {
  font-family: "Fraunces", serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.top-nav a {
  margin-left: 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.top-nav a:hover { color: var(--text); }

/* Hero */
.hero {
  padding-top: 64px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.lede {
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--muted);
  max-width: 34ch;
  margin: 0;
}

/* Sections */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 72px 0 28px;
}

/* Work showcase */
.showcase { padding-bottom: 24px; }
.showcase-head {
  max-width: var(--showcase);
  margin: 0 auto;
  padding: 0 24px;
}
.project {
  position: relative;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.project:first-of-type { border-top: none; padding-top: 16px; }
.project-inner {
  max-width: var(--showcase);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.project:nth-of-type(even) .project-inner {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
}
.project:nth-of-type(even) .project-media { order: 2; }

/* Media */
.project-media { position: relative; }
.frame {
  display: block;
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0c0f;
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.9);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transform: scale(1.001);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project:hover .frame {
  border-color: #33404d;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.95);
}
.project:hover .frame img { transform: scale(1.04); }
a.frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Body */
.project-body { max-width: 42ch; }
.project-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-body h3 {
  margin: 0 0 12px;
  font-family: "Fraunces", serif;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.project-copy {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
}
.tags li {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.go {
  display: inline-block;
  margin-top: 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 196, 255, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.go:hover { border-bottom-color: var(--accent); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .frame img, .frame { transition: none; }
  .project:hover .frame img { transform: none; }
}

/* About */
.about { padding-bottom: 24px; }
.eyebrow.sub { margin-top: 56px; }
.experience {
  list-style: none;
  margin: 0;
  padding: 0;
}
.experience li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "role years" "org years";
  gap: 0 16px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.experience li:last-child { border-bottom: 1px solid var(--line); }
.experience .role {
  grid-area: role;
  font-weight: 600;
  font-size: 16px;
}
.experience .org {
  grid-area: org;
  color: var(--muted);
  font-size: 15px;
}
.experience .years {
  grid-area: years;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-grid > p {
  font-size: 19px;
  margin: 0;
}
.about-grid a { color: var(--accent); text-decoration: none; }
.about-grid a:hover { text-decoration: underline; }
.skills { display: grid; gap: 18px; }
.skills h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.skills p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Footer */
.site-footer {
  margin-top: 80px;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  max-width: var(--wrap);
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 24px;
}
.footer-links a:hover { color: var(--text); }

@media (max-width: 900px) {
  .project { padding: 40px 0; }
  .project-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }
  .project:nth-of-type(even) .project-inner { grid-template-columns: 1fr; }
  .project:nth-of-type(even) .project-media { order: 0; }
  .project-body { max-width: none; }
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .top-nav a { margin-left: 16px; }
  .site-footer { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links a { margin: 0 12px; }
}
