/* MIT Media Lab–inspired: light, editorial, generous whitespace */

:root {
  --bg: #fafafa;
  --bg-page: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --line: #e8e8e8;
  --line-strong: #d0d0d0;
  --accent: #b30000;
  --accent-hover: #8a0000;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --max: 1120px;
  --narrow: 38rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.narrow {
  max-width: var(--narrow);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.5rem;
  padding-block: 0.65rem;
}

.brand {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: flex-end;
}

.nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: clamp(3.5rem, 10vw, 6rem) 0 clamp(3rem, 8vw, 4.5rem);
  background: var(--bg-page);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 42rem;
}

.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5.5vw, 3.35rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
}

.hero-lede {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.hero-meta {
  margin: 0 0 1.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-cta {
  margin: 0;
}

.link-arrow {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.link-arrow:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

/* Sections */
.section {
  padding: clamp(2.75rem, 6vw, 4rem) 0;
  background: var(--bg-page);
}

.section--border {
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-label--inline {
  margin-bottom: 0;
}

.prose {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
}

.prose.small {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Skills list */
.skill-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.skill-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.skill-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.skill-detail {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Highlights */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
}

.highlight {
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  margin: 0;
}

.highlight:nth-child(2n) {
  border-right: none;
}

.highlight:nth-last-child(-n + 2) {
  border-bottom: none;
}

@media (max-width: 720px) {
  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .highlight {
    border-right: none;
  }

  .highlight:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .highlight:last-child {
    border-bottom: none;
  }
}

.highlight-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Projects bar */
.projects-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
}

.tab-btn {
  padding: 0.35rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--bg);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 800px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Project cards (JS-generated) */
.project-card {
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.project-card:hover {
  border-color: var(--line-strong);
}

.project-content {
  padding: 1.1rem 1.15rem 1.25rem;
}

.project-content h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

.project-content p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--bg);
}

.project-links {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--bg-page);
}

.btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-page);
}

.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.project-media {
  width: 100%;
  border: 0;
  display: block;
  aspect-ratio: 16 / 9;
  background: #eee;
}

video.project-media--native {
  object-fit: contain;
  background: #111;
}

.media-stack {
  border-bottom: 1px solid var(--line);
}

.play-video-btn {
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #f0f0f0;
  position: relative;
  display: block;
}

.project-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.fallback-poster {
  color: var(--text-muted);
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #ececec, #e2e2e2);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.play-chip {
  position: absolute;
  inset: auto auto 10px 10px;
  padding: 0.25rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
}

.media-open-link {
  margin: 0.75rem 1rem;
}

.image-scroller-wrap {
  padding: 0.65rem 0.65rem 0.85rem;
  background: var(--bg);
}

.image-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 38%);
  gap: 0.45rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}

.scroller-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  scroll-snap-align: start;
  background: #eee;
}

/* Contact */
.section--footer-cta {
  border-top: 1px solid var(--line);
  padding-bottom: clamp(3rem, 8vw, 4.5rem);
}

.contact-lede {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.contact-list a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.contact-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Footer */
.site-footer {
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg-page);
}

.footer-inner p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
