* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

  .reveal-on-scroll,
  .reveal-on-scroll.reveal-pending {
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
  }

  .sidebar-star {
    animation: none;
  }
}

:root {
  --main-color: #02114C;
  --overlay-color: #9fc5ff4d;
  --sidebar-width: 250px;

  --border-strong: color-mix(in srgb, var(--main-color) 50%, transparent);
  --border-medium: color-mix(in srgb, var(--main-color) 40%, transparent);
  --border-soft: color-mix(in srgb, var(--main-color) 30%, transparent);
  --surface: color-mix(in srgb, var(--main-color) 12%, transparent);
  --surface-hover: color-mix(in srgb, var(--main-color) 10%, transparent);
  --surface-hover-soft: color-mix(in srgb, var(--main-color) 7%, transparent);
  --interactive-duration: 0.18s;
  --interactive-ease: ease;
  --focus-ring: color-mix(in srgb, var(--main-color) 45%, transparent);

  --sidebar-bg: color-mix(in srgb, #EFEFEF 20%, transparent);
  --page-bg: linear-gradient(to bottom, #6898de 0%, #fafafa 100%);

  --title-stack-gap: 0.45rem;
  --project-main-col: 280px;
  /* Two pill links + gap; 240px was too tight for longer labels (e.g. repository + read post) */
  --project-links-col: 340px;
  --project-tags-col: 300px;
}

body.dark {
  --main-color: #EFEFEF;
  --overlay-color: #071a33b3;
  --border-strong: color-mix(in srgb, var(--main-color) 58%, transparent);
  --border-medium: color-mix(in srgb, var(--main-color) 48%, transparent);
  --border-soft: color-mix(in srgb, var(--main-color) 38%, transparent);
  --surface: color-mix(in srgb, var(--main-color) 12%, transparent);
  --surface-hover: color-mix(in srgb, var(--main-color) 10%, transparent);
  --surface-hover-soft: color-mix(in srgb, var(--main-color) 7%, transparent);
  --sidebar-bg: color-mix(in srgb, #02114C 20%, transparent);
  --page-bg: linear-gradient(to bottom, #285596 0%, #000103 100%);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--page-bg) fixed;
  color: var(--main-color);
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
}

body.sidebar-open {
  overflow: hidden;
}

a,
button {
  transition:
    color var(--interactive-duration) var(--interactive-ease),
    border-color var(--interactive-duration) var(--interactive-ease),
    background-color var(--interactive-duration) var(--interactive-ease),
    opacity var(--interactive-duration) var(--interactive-ease),
    text-decoration-color var(--interactive-duration) var(--interactive-ease);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

h1 {
  font-family: Arial, sans-serif;
  text-align: center;
}

.intro {
  width: min(550px, 100%);
  margin: 0.85rem auto 0;
  line-height: 1.6;
  text-align: center;
  opacity: 0.78;
  font-size: clamp(0.95rem, 1.6vw, 1.03rem);
}

.page {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0 40px;
  --page-padding-block-start: 2rem;
  --section-gap: 16rem;
  padding: var(--page-padding-block-start) 0 var(--section-gap);
}

/* Shared width: sizes to the hero layout. */
.home-column {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.home-column .fold-hero {
  width: 100%;
}

/* First screen: home fills the viewport so #featured starts below the fold. */
.fold-hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--page-padding-block-start) - 20px);
  min-height: calc(100svh - var(--page-padding-block-start) - 20px);
}

/* ─── Home hero (first fold) ───────────────────────────────── */
.home-hero {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-bottom: 20px;
}

.home-hero-layout {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  transform: translateY(-20px);
}

.home-hero-image-wrap {
  flex: 0 0 auto;
  width: min(360px, 42vw);
  line-height: 0;
}

.home-hero-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* Fade the photo into the page background (body gradient shows through). */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 6.5rem),
    rgba(0, 0, 0, 0.7) calc(100% - 2.5rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 6.5rem),
    rgba(0, 0, 0, 0.7) calc(100% - 2.5rem),
    transparent 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.home-hero-copy {
  flex: 0 1 auto;
  min-width: 0;
}

.home-hero-name {
  margin: 0;
  text-align: left;
  font-family: Arial, sans-serif;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.home-hero-name span {
  display: block;
}

.home-hero-name span:first-child {
  font-size: clamp(4rem, 12vw, 108px);
  font-weight: 700;
}

.home-hero-name span:last-child {
  font-size: clamp(3.5rem, 10.8vw, 97px);
  font-weight: 400;
}

.home-hero-title {
  margin: 0.85rem 0 0;
  font-size: clamp(1.1rem, 2vw + 0.4rem, 30px);
  font-weight: 400;
  line-height: 1.4;
}

@media (max-width: 1220px) {
  .home-hero-layout {
    flex-direction: column;
    text-align: center;
  }

  .home-hero-image-wrap {
    width: min(280px, 72vw);
  }

  .home-hero-name {
    text-align: center;
  }
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 60px 1.25rem 1.5rem;
  background: var(--sidebar-bg);
  border-right: 0.5px solid var(--main-color);
  z-index: 100;
}

.sidebar > .theme-toggle {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.sidebar-brand {
  margin-bottom: 40px;
}

.sidebar-name {
  position: relative;
  display: block;
  margin: 0;
  line-height: 1.05;
  color: inherit;
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

.sidebar-star {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  color: var(--main-color);
  opacity: 0.3;
  font-size: 70px;
  line-height: 1;
  pointer-events: none;
  transform: translate(calc(-50% + 83px), calc(-50% - 13px));
  animation: sidebar-star-spin 24s linear infinite;
}

@keyframes sidebar-star-spin {
  to {
    transform: translate(calc(-50% + 83px), calc(-50% - 13px)) rotate(-360deg);
  }
}

.sidebar-name-first,
.sidebar-name-last {
  position: relative;
  z-index: 1;
  display: block;
}

.sidebar-name-first {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sidebar-name-last {
  font-size: 35px;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-top: 5px;
}

.sidebar-tagline {
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 1.45;
  opacity: 0.85;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  border: 0.5px solid var(--main-color);
  margin: 0;
  padding: 20px 0;
  gap: 10px;
}

.sidebar-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  color: inherit;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-nav a:hover {
  background: color-mix(in srgb, var(--main-color) 8%, transparent);
}

.sidebar-nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--main-color) 12%, transparent);
}

.sidebar-nav-num {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.sidebar-utilities {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding-top: 2rem;
}

.sidebar-socials {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.sidebar-socials a,
.project-links a {
  color: inherit;
  text-decoration: none;
  font-size: 0.8125rem;
  opacity: 0.75;
}

.sidebar-socials a:hover {
  opacity: 1;
  text-decoration: underline;
}

.menu-toggle {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.theme-toggle,
.menu-toggle {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  padding: 0.25rem;
  margin: 0;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Makes taps feel immediate and prevents unwanted "sticky hover" styling. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Keep hamburger hidden on desktop; shared rule above sets inline-flex for both toggles. */
.menu-toggle {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover,
  .menu-toggle:hover {
    opacity: 1;
    border-color: var(--border-soft);
  }

  .theme-toggle:hover {
    background-color: var(--surface-hover-soft);
  }
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.utility-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
  stroke-width: 2;
  vertical-align: middle;
}

.icon-moon {
  display: none;
}

body.dark .icon-sun {
  display: none;
}

body.dark .icon-moon {
  display: inline;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
}

.featured {
  margin-top: 6rem;
  margin-bottom: var(--section-gap);
}

.reveal-on-scroll {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s var(--interactive-ease),
    transform 0.6s var(--interactive-ease);
}

/* Applied by JS only when motion is allowed — keeps content visible without JS. */
.reveal-on-scroll.reveal-pending {
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.archive {
  margin-top: var(--section-gap);
}

.archive-filters {
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.archive-filters-label {
  margin: 0;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

.archive-filters-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.archive-filter-btn {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: clamp(0.8125rem, 1.1vw, 0.875rem);
  cursor: pointer;
  opacity: 0.85;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}

.archive-filter-btn:hover {
  opacity: 1;
  background-color: var(--surface-hover-soft);
}

.archive-filter-btn:focus-visible {
  outline: 2px solid var(--border-medium);
  outline-offset: 2px;
}

.archive-filter-btn.is-active {
  opacity: 1;
  border-color: var(--border-medium);
  background-color: var(--surface-hover);
}

/* Filtered-out archive rows (belt-and-suspenders with the `hidden` attribute). */
#archive-projects .project.is-archive-hidden {
  display: none !important;
}

/* Anchor navigation: keep section headings comfortably visible. */
#about,
#featured,
#archive,
#experience {
  scroll-margin-top: 1rem;
}

/* ─── Experience / Contact ───────────────────────────────────── */
.experience {
  margin-top: var(--section-gap);
}

.experience-items {
  border-top: 1px solid var(--border-soft);
}

.experience-role {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.experience-role-content {
  flex: 1 1 auto;
  min-width: 0;
}

.experience-role-logo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.experience-role-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.experience-role-media {
  flex: 0 0 144px;
  width: 144px;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
}

.experience-role-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.experience-role-media--169 {
  aspect-ratio: 3 / 2;
}

.experience-role-media--43 {
  aspect-ratio: 3 / 2;
}

.experience-role-head {
  display: flex;
  /* Keep the role header content (title/org/dates) stacked vertically */
  flex-direction: column;
  flex-wrap: nowrap;
  gap: var(--title-stack-gap);
  align-items: flex-start;
}

.experience-dates {
  opacity: 0.65;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.experience-bullets {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.7;
}

.experience-bullets li {
  margin: 0.35rem 0;
}

.experience-tags {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.experience-tags span {
  border: 1px solid var(--border-soft);
  padding: 0.35rem 0.6rem;
  opacity: 0.8;
  font-size: clamp(0.813rem, 1.2vw, 0.875rem);
}

.contact {
  margin-top: 4rem;
  padding-top: 0.75rem;
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-lead {
  width: min(640px, 100%);
  margin: 0 0 1.25rem;
  line-height: 1.7;
  opacity: 0.85;
}

.contact-cta {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

.contact-cta:hover {
  background-color: var(--surface-hover);
  transform: scale(1.01);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  order: 1;
}

.section-header .section-label {
  order: 2;
  margin-left: auto;
}

.section-label {
  margin: 0;
  opacity: 0.6;
  font-size: 0.875rem;
}

.section-header h2 {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 400;
}

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

.featured-project {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--border-soft);
}

.featured-thumbnail {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  background: var(--surface);
  object-fit: cover;
  display: block;
}

.featured-thumbnail::-webkit-media-controls {
  display: none !important;
}

.featured-thumbnail::-webkit-media-controls-start-playback-button {
  display: none !important;
}

.featured-content {
  display: grid;
  gap: 0.875rem;
}

.featured-meta {
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-start;
  gap: 0.75rem;
}

.featured-project .project-links {
  grid-area: auto;
  min-width: 0;
  align-self: start;
  margin-top: 0;
  margin-bottom: 0;
  justify-content: flex-start;
  justify-self: start;
}

.featured-copy {
  display: grid;
  gap: var(--title-stack-gap);
}

.featured-project h3,
.experience-title,
.project-main h3 {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  font-weight: 600;
  line-height: 1.25;
}

.projects {
  border-top: 1px solid var(--border-soft);
  overflow: visible;
}

.project {
  display: grid;
  grid-template-columns:
    124px minmax(0, var(--project-main-col)) minmax(0, var(--project-links-col))
    minmax(0, 1fr);
  grid-template-areas: "thumb main links tags";
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-soft);
  overflow: visible;
}

.thumbnail {
  grid-area: thumb;
  width: 124px;
  height: 70px;
  background: var(--surface);
  object-fit: cover;
  display: block;
}

.project-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  align-self: stretch;
  gap: var(--title-stack-gap);
  min-width: 0;
  margin: 0;
}

.project h2 {
  margin: 0 0 1rem;
  font-size: clamp(0.95rem, 1.2vw, 1rem);
}

.subtitle,
.experience-org {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(0.85rem, 1vw, 0.938rem);
  font-weight: 400;
  line-height: 1.35;
  opacity: 0.7;
}

.project-links {
  grid-area: links;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: start;
  justify-self: stretch;
  min-width: 0;
  margin-top: auto;
  margin-bottom: auto;
}

.project-links a {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  font-size: clamp(0.875rem, 0.8vw, 0.9375rem);
}

.project-links a:hover {
  background-color: var(--surface-hover);
  transform: scale(1.01);
}

.link-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
  stroke-width: 2;
  vertical-align: middle;
}

.project-tags {
  grid-area: tags;
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  justify-content: end;
  justify-self: end;
  min-width: 0;
  margin-top: auto;
  margin-bottom: auto;
}

.project-tags span {
  border: 1px solid var(--border-soft);
  padding: 0.35rem 0.6rem;
  color: color-mix(in srgb, var(--main-color) 65%, transparent);
  font-size: clamp(0.813rem, 1.2vw, 0.875rem);
}

/* ─── Tablet ────────────────────────────────────────────
   Two-column layout:
     Left  — thumbnail + project text, side by side, spanning both rows
     Right — project links (top) and project tags (bottom), both right-aligned
   ─────────────────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .project {
    grid-template-columns: 124px 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "thumb main links"
      "thumb main tags";
    gap: 0.5rem 1rem;
  }

  .project-main {
    align-self: stretch;
  }

  .project-links {
    justify-self: end;
    justify-content: flex-end;
    align-self: end;
  }

  .project-tags {
    justify-self: end;
    justify-content: flex-end;
    align-self: start;
  }
}

/* ─── Mobile / narrow: sidebar overlay ─────────────────────── */
@media (max-width: 880px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    flex: none;
    height: 100vh;
    height: 100svh;
    transform: translateX(-100%);
    transition: transform 0.28s var(--interactive-ease);
    box-shadow: none;
    /* Match the page gradient (fixed) so the overlay is opaque, not the 20% wash. */
    background: var(--page-bg) fixed;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px color-mix(in srgb, var(--main-color) 15%, transparent);
  }

  .menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 110;
    width: 42px;
    height: 42px;
    opacity: 1;
    background: var(--surface);
  }

  body.sidebar-open .menu-toggle {
    display: none;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--overlay-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--interactive-ease);
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .page {
    --page-padding-block-start: 3.75rem;
    width: min(1100px, 92%);
    margin: 0 20px;
  }

  #about,
  #featured,
  #archive,
  #experience {
    scroll-margin-top: 4rem;
  }

  .experience-dates {
    font-size: 0.78rem;
    letter-spacing: 0;
  }

  .sidebar-name {
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* ─── Mobile stacked layout ───────────────────────────────────
   Single-column stack per project.  All four pieces read top-to-bottom:
   thumbnail → text → links → tags.  Projects keep the same divider lines
   as desktop.
   ─────────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page {
    --section-gap: 8rem;
    padding: var(--page-padding-block-start) 0 var(--section-gap);
  }

  .experience-role {
    /* Keep logo + title/org side-by-side; GIF sits as a faint watermark behind text. */
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .experience-role-logo {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .experience-role-content {
    position: relative;
    z-index: 1;
    flex: 1 1 200px;
  }

  .experience-role-head {
    /* Title, org, and dates always stack on separate lines. */
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--title-stack-gap);
  }

  .experience-dates {
    font-size: 0.7rem;
    letter-spacing: 0;
  }

  .experience-role-media {
    position: absolute;
    top: 1rem;
    right: 0;
    z-index: 0;
    width: 6.5rem;
    flex: none;
    opacity: 0.2;
    background: transparent;
    pointer-events: none;
  }

  .projects {
    border-top: 1px solid var(--border-medium);
  }

  .intro {
    margin-top: 0.7rem;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .section-header {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .section-label,
  .section-header h2 {
    min-width: 0;
  }

  .featured-project {
    gap: 0.875rem;
    padding: 1.1rem 0 1.5rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .project {
    border-bottom: 1px solid var(--border-medium);
  }

  .project {
    grid-template-columns: 1fr;
    grid-template-areas:
      "thumb"
      "main"
      "links"
      "tags";
    gap: 0.625rem;
    padding: 1.25rem 0;
    padding-bottom: 3rem;
  }

  .thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .project h2 {
    margin: 0 0 0.35rem;
  }

  .project-links {
    justify-content: flex-start;
    justify-self: start;
    gap: 0.5rem;
  }

  .project-tags {
    justify-content: flex-start;
    justify-self: start;
  }
}
