/* ============================================
   Nate Williams — Portfolio
   Aesthetic: Brutalist-Editorial / Dark
   ============================================ */

:root {
  --bg:        #0a0a0a;
  --bg-raised: #111111;
  --bg-card:   #161616;
  --text:      #e8e4df;
  --text-dim:  #7a756e;
  --text-muted:#4a4640;
  --accent:    #e85d26;
  --accent-dim:#c44d1e;
  --border:    #2a2724;
  --border-lt: #1e1c1a;

  --font-display: 'Inter', sans-serif;
  --font-serif:   'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  font-weight: 500;
  color: var(--accent);
}

/* ---- Grain Overlay ---- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-lt);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: fadeDown 0.8s ease both;
}

.nav__logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-transform: none;
}

.nav__links {
  display: flex;
  gap: var(--space-md);
}

.nav__links a {
  color: var(--text-dim);
  transition: color 0.3s;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-dim);
  font-size: 0.7rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ---- Hero (Video-First) ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  padding-top: calc(var(--space-lg) + 60px);
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.accent {
  color: var(--accent);
}

/* Hero Cinema — video with overlay */
.hero__cinema {
  position: relative;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  animation: fadeUp 0.8s ease 0.3s both;
}

.hero__cinema video {
  width: 100%;
  display: block;
}

.hero__cinema.is-playing video {
  cursor: default;
}

/* Overlay on top of video */
.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-lg);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.65) 100%
  );
  transition: opacity 0.4s ease;
  z-index: 2;
}

.hero__cinema.is-playing .hero__overlay {
  opacity: 0;
  pointer-events: none;
}

.hero__overlay-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.hero__overlay-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero__name-sm {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero__divider {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.hero__role {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__overlay-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__overlay-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.hero__overlay-right {
  text-align: right;
}

.hero__overlay-org {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.hero__overlay-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Play button — centered in overlay */
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.play-btn:hover {
  background: rgba(232, 93, 38, 0.3);
  border-color: var(--accent);
}

.play-btn svg {
  width: 28px;
  height: 28px;
  color: #fff;
  margin-left: 3px;
  transition: transform 0.2s ease;
}

.play-btn:hover svg {
  transform: scale(1.15);
}

.hero__cinema.is-playing .play-btn {
  opacity: 0;
  pointer-events: none;
}

/* Inline play buttons on all other videos */
.video-wrap {
  position: relative;
  cursor: pointer;
}

.play-btn--inline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  z-index: 3;
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.play-btn--inline svg {
  width: 22px;
  height: 22px;
}

.video-wrap.is-playing .play-btn--inline {
  opacity: 0;
  pointer-events: none;
}

/* Hero Proof (two-column: story | stats+quote) */
.hero__proof {
  margin-top: var(--space-md);
  animation: fadeUp 0.8s ease 0.6s both;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
}

.hero__proof-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__proof-problem {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.hero__proof-problem strong {
  color: var(--text);
  font-weight: 500;
}

.hero__proof-fix {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.hero__proof-fix code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(232, 93, 38, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}

.hero__stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.hero__stat-before {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  line-height: 1;
}

.hero__stat-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.hero__stat-after {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.8rem;
  color: var(--accent);
  line-height: 1;
}

.hero__stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
  white-space: nowrap;
}

.hero__quote {
  border-left: 2px solid var(--accent);
  padding: var(--space-sm) var(--space-md);
  background: rgba(232, 93, 38, 0.04);
  flex: 1;
  max-width: 400px;
}

.hero__quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.5;
}

.hero__quote cite {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.hero__quote cite strong {
  color: var(--text-dim);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  animation: fadeUp 0.8s ease 1s both;
}

.hero__scroll-line {
  width: 40px;
  height: 1px;
  background: var(--text-muted);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ---- Second Contribution ---- */
.contribution-section {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-lt);
}

.contribution-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
}

.contribution-section__label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.25rem;
}

.contribution-section__content {
  max-width: 100%;
}

.contribution-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.contribution-section__video {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: #000;
  margin-bottom: var(--space-md);
}

.contribution-section__video video {
  width: 100%;
  display: block;
}

.contribution-section__stat {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: var(--space-sm);
}

.contribution-section__desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
  max-width: 580px;
}

.contribution-section__stack {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ---- Section Grid ---- */
.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.25rem;
  position: sticky;
  top: 80px;
  align-self: start;
}

.label-number {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.label-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* ---- Experience ---- */
.experience {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-lt);
}

.experience__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.experience__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: var(--space-md) var(--space-lg);
  position: relative;
}

.experience__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
}

.experience__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.experience__logo {
  height: 28px;
  width: auto;
  display: block;
  margin-bottom: 0.4rem;
}

.experience__logo--round {
  border-radius: 50%;
}

.experience__logos {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.experience__logos .experience__logo {
  margin-bottom: 0;
}

.experience__company {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.experience__role {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--accent);
  display: block;
  margin-top: 0.2rem;
}

.experience__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  padding-top: 0.3rem;
}

.experience__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.experience__bullets li {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  padding-left: 1rem;
  position: relative;
}

.experience__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

.experience__bullets li strong {
  color: var(--text);
  font-weight: 500;
}

.experience__stack {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .experience__item {
    padding: var(--space-sm);
  }

  .experience__header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .experience__company {
    font-size: 1.1rem;
  }
}

/* ---- Projects ---- */
.projects {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-lt);
}

.projects__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: var(--space-md) var(--space-lg);
  transition: all 0.4s ease;
  position: relative;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.project-card:hover {
  border-color: var(--border);
  background: #1a1917;
  transform: translateX(8px);
}

.project-card:hover::after {
  width: 100%;
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.project-card__number {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.project-card__links {
  display: flex;
  gap: var(--space-sm);
}

.project-link {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.3s;
}

.project-link:hover {
  color: var(--accent);
}

.project-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.project-card__desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
  max-width: 580px;
}

.project-card__stack {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.project-card__video {
  width: 100%;
  margin: var(--space-sm) 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: #000;
}

.project-card__video video {
  width: 100%;
  display: block;
}

/* ---- Incident Screenshots ---- */
.incident__screenshots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.incident__screenshot {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-card);
}

.incident__screenshot:first-child {
  grid-column: 1 / -1;
}

.incident__screenshot:not(:first-child) {
  min-height: 80px;
}

.incident__screenshot:not(:first-child) img {
  object-fit: contain;
  padding: var(--space-xs);
  background: #1a1816;
}

.incident__screenshot img {
  width: 100%;
  display: block;
}

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

  .incident__screenshot:first-child {
    grid-column: auto;
  }
}

/* ---- Tags ---- */
.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: all 0.3s ease;
  background: var(--bg-raised);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.tag--small {
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
}

/* ---- Blog (listing on homepage) ---- */
.blog {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-lt);
}

.blog__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.blog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: var(--space-md) var(--space-lg);
  transition: all 0.4s ease;
  position: relative;
  color: inherit;
}

.blog-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.blog-card:hover {
  background: #1a1917;
  transform: translateX(8px);
}

.blog-card:hover::after {
  width: 100%;
}

.blog-card:hover .blog-card__title {
  color: var(--accent);
}

.blog-card:hover .blog-card__arrow {
  color: var(--accent);
}

.blog-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.blog-card__number {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  transition: color 0.3s;
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: var(--space-md);
  max-width: 640px;
}

.blog-card__excerpt em {
  color: var(--text);
  font-style: italic;
}

.blog-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.blog-card__tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.blog-card__arrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.3s;
  white-space: nowrap;
}

/* ---- Blog post page ---- */
.body--post {
  background: var(--bg);
}

.post {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--space-lg) + 60px) var(--space-md) var(--space-xl);
}

.post__back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  transition: color 0.3s;
}

.post__back:hover {
  color: var(--accent);
}

.post__header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-lt);
  animation: fadeUp 0.8s ease both;
}

.post__meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.post__meta-divider {
  color: var(--border);
}

.post__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.post__tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.post__body {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-dim);
  animation: fadeUp 0.8s ease 0.15s both;
}

.post__body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  padding-top: var(--space-sm);
  position: relative;
}

.post__body h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--space-sm);
}

.post__body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: var(--space-md);
  margin-bottom: 0.6rem;
}

.post__body p {
  margin-bottom: var(--space-sm);
}

.post__body p strong {
  color: var(--text);
  font-weight: 600;
}

.post__body em {
  color: var(--text);
  font-style: italic;
}

.post__body a {
  color: var(--accent);
  border-bottom: 1px solid rgba(232, 93, 38, 0.3);
  transition: border-color 0.3s, color 0.3s;
}

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

.post__body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent);
  background: rgba(232, 93, 38, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}

.post__list {
  list-style: none;
  margin: var(--space-sm) 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post__list li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-dim);
}

.post__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.post__list li strong {
  color: var(--text);
  font-weight: 600;
}

.post__callout {
  border-left: 3px solid var(--accent);
  background: rgba(232, 93, 38, 0.05);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}

.post__equation {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.65rem;
  color: var(--text);
  padding: var(--space-md) var(--space-sm);
  margin: var(--space-md) auto;
  max-width: 480px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.post__equation + .post__equation {
  margin-top: calc(-1 * var(--space-md) - 1px);
  border-top: none;
}

.post__equation sup {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.05em;
  font-style: normal;
}

.post__equation .op {
  font-style: normal;
  color: var(--accent);
  padding: 0 0.3em;
}

@media (max-width: 768px) {
  .post__equation {
    font-size: 1.3rem;
  }
}

.post__figure {
  margin: var(--space-md) 0;
  border: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
}

.post__figure img {
  width: 100%;
  display: block;
}

.post__figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  letter-spacing: 0.01em;
  text-transform: none;
}

.post__figure figcaption code {
  font-size: 0.85em;
}

.post__figure--placeholder.is-missing {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  padding: var(--space-xl) var(--space-md);
  position: relative;
  text-align: center;
}

.post__figure--placeholder.is-missing img {
  display: none;
}

.post__figure--placeholder.is-missing::before {
  content: 'Figure';
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.post__end {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-lt);
}

.post__end .post__back {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .post {
    padding: calc(var(--space-md) + 60px) var(--space-sm) var(--space-lg);
  }

  .post__header {
    margin-bottom: var(--space-lg);
  }

  .post__body {
    font-size: 0.95rem;
  }

  .post__body h2 {
    font-size: 1.4rem;
  }

  .post__body h3 {
    font-size: 1.1rem;
  }

  .blog-card {
    padding: var(--space-md);
  }

  .blog-card__title {
    font-size: 1.3rem;
  }
}

/* ---- About ---- */
.about {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-lt);
}

.about__content {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.about__photo {
  flex-shrink: 0;
  width: 240px;
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.about__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(232, 93, 38, 0.1));
  pointer-events: none;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.about__photo:hover img {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.03);
}

.about__text {
  flex: 1;
}

.about__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.4;
  color: var(--text);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.about__body {
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.about__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-lt);
}

.about__detail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---- Contact ---- */
.contact {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-lt);
}

.contact__heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-lg);
}

.contact__links {
  display: flex;
  flex-direction: column;
}

.contact__link {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border-lt);
  transition: all 0.3s ease;
}

.contact__link:last-child {
  border-bottom: 1px solid var(--border-lt);
}

.contact__link:hover {
  padding-left: var(--space-sm);
}

.contact__link:hover .contact__link-value {
  color: var(--accent);
}

.contact__link:hover .contact__link-arrow {
  transform: translate(4px, -4px);
  color: var(--accent);
}

.contact__link-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.contact__link-value {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.3s;
}

.contact__link-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

/* ---- Footer ---- */
.footer {
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid var(--border-lt);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes scrollPulse {
  0%, 100% { width: 40px; opacity: 1; }
  50% { width: 60px; opacity: 0.5; }
}

/* Scroll-triggered fade-in */
.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-section:nth-child(2) { transition-delay: 0.1s; }
.fade-section:nth-child(3) { transition-delay: 0.2s; }

/* ---- Responsive ---- */

@media (hover: none) {
  .project-card:hover {
    transform: none;
  }

  .tag:hover {
    transform: none;
  }
}

/* Tablet */
@media (max-width: 768px) {
  .section-grid,
  .contribution-section__inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .section-label,
  .contribution-section__label {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
  }

  .hero {
    padding: var(--space-lg) var(--space-sm);
    padding-top: calc(var(--space-lg) + 60px);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero__overlay {
    padding: var(--space-md);
  }

  .hero__overlay-top {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .hero__overlay-bottom {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }

  .play-btn {
    width: 64px;
    height: 64px;
  }

  .play-btn svg {
    width: 24px;
    height: 24px;
  }

  .hero__proof {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .hero__quote {
    max-width: 100%;
  }

  .hero__video-context {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .about__content {
    flex-direction: column;
  }

  .about__photo {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .nav__status {
    display: none;
  }

  .nav__links {
    gap: var(--space-sm);
  }

  .contact__link {
    grid-template-columns: 60px 1fr auto;
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .project-card {
    padding: var(--space-md);
  }

  .projects,
  .about,
  .contact {
    padding: var(--space-xl) 0;
  }

  .contribution-section {
    padding: var(--space-lg) 0;
  }

  .hero__scroll {
    display: none;
  }

  .experience__item {
    padding: var(--space-md);
  }

  .experience__header {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .hero {
    padding: var(--space-md) var(--space-sm);
    padding-top: calc(var(--space-md) + 50px);
  }

  .hero__overlay {
    padding: var(--space-sm);
  }

  .hero__overlay-title {
    font-size: 1.3rem;
  }

  .play-btn {
    width: 56px;
    height: 56px;
  }

  .play-btn svg {
    width: 20px;
    height: 20px;
  }

  .hero__stat-before {
    font-size: 1.6rem;
  }

  .hero__stat-after {
    font-size: 2rem;
  }

  .section-grid,
  .contribution-section__inner {
    padding: 0 var(--space-sm);
  }

  .nav {
    padding: var(--space-xs) var(--space-sm);
  }

  .nav__links {
    gap: var(--space-xs);
    font-size: 0.7rem;
  }

  .nav__links a {
    padding: 0.25rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .projects,
  .about,
  .contact {
    padding: var(--space-lg) 0;
  }

  .about__photo {
    aspect-ratio: 3 / 4;
  }

  .project-card {
    padding: var(--space-sm);
  }

  .project-card__title {
    font-size: 1.2rem;
  }

  .project-card__desc {
    font-size: 0.8rem;
  }

  .project-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .contact__link {
    grid-template-columns: 1fr auto;
    gap: var(--space-sm);
  }

  .contact__link-label {
    display: none;
  }

  .contact__heading {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .footer__inner {
    text-align: center;
    align-items: center;
  }
}

/* ---- Selection ---- */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
