/* ============================================
   Portfolio — Amonrada Tardthong
   Pure black & white. Instrument Serif + DM Sans.
   ============================================ */

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

:root {
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border: #E5E5E5;
  --bg: #FFFFFF;
  --bg-placeholder: #F5F5F5;
  --bg-warm: #F7F5F2;
  --max-width: 960px;
  --font-display: Didot, 'Playfair Display', 'Bodoni MT', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
}

/* Dark mode — applied via [data-theme="dark"] toggle or system preference */
[data-theme="dark"] {
  --text-primary: #F0F0F0;
  --text-secondary: #A0A0A0;
  --text-tertiary: #707070;
  --border: #2A2A2A;
  --bg: #0A0A0A;
  --bg-placeholder: #1A1A1A;
  --bg-warm: #141210;
}

/* System dark mode no longer auto-applied — light is default */

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}


[data-theme="dark"] {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 80px;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Page load animation --- */

.hero__name-block {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 0.8s ease forwards 0.5s;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* --- Skip to content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--text-primary);
  color: var(--bg);
  padding: 8px 16px;
  font-size: 13px;
  z-index: 100;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 640px) {
  .container {
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media (min-width: 960px) {
  .container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

.container--wide {
  max-width: 1280px;
}

/* --- Header --- */
.site-header {
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(0);
  transition: transform 0.3s ease;
}


[data-theme="dark"] .site-header {
  background: rgba(10, 10, 10, 0.95);
}

.site-header--hidden {
  transform: translateY(-100%);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  padding-top: 12px;
}

.site-header__logo img {
  height: 44px;
  width: auto;
  display: block;
}


[data-theme="dark"] .site-header__logo img {
  filter: invert(1);
}

.site-header__logo a:hover {
  text-decoration: none;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
}

.site-header__nav a {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
}

.site-header__nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.site-header__nav .nav-pdf {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-header__nav .nav-pdf svg {
  vertical-align: middle;
}

.site-header__nav .nav-contact {
  border: 1px solid var(--text-primary);
  border-radius: 20px;
  padding: 6px 18px;
  color: var(--text-primary);
  font-weight: 300;
  transition: background 0.2s, color 0.2s;
}

.site-header__nav .nav-contact:hover {
  background: var(--text-primary);
  color: var(--bg);
}

/* --- Hero (Home) — full page --- */
.hero {
  padding: 0;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100vh - 80px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  position: relative;
  will-change: transform, opacity;
}

@media (min-width: 640px) {
  .hero__content {
    padding: 48px 36px;
  }
}

@media (min-width: 960px) {
  .hero__content {
    padding: 56px 48px;
  }
}

.hero__location-value {
  margin-top: 1.5rem;
  font-size: 11px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.hero__name-block {
  padding: 2rem 0;
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero__location {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: 80px;
  }
}

@media (min-width: 960px) {
  .hero__title {
    font-size: 104px;
  }
}

.hero__tagline {
  margin-top: 1.5rem;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.7;
  color: var(--text-primary);
  max-width: 420px;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  transition: opacity 0.3s ease;
}

@media (min-width: 640px) {
  .hero__scroll {
    right: 36px;
  }
}

@media (min-width: 960px) {
  .hero__scroll {
    right: 48px;
  }
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  position: relative;
  overflow: hidden;
  background: var(--border);
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--text-primary));
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 100%; }
  50.01% { top: -100%; }
  100% { top: 100%; }
}

/* Rotating welcome badge */
.hero__badge {
  position: absolute;
  top: 48px;
  right: 24px;
  width: 112px;
  height: 112px;
  display: none;
}

@media (min-width: 640px) {
  .hero__badge {
    display: block;
    right: 36px;
  }
}

@media (min-width: 960px) {
  .hero__badge {
    width: 128px;
    height: 128px;
    right: 48px;
  }
}

.hero__badge svg {
  width: 100%;
  height: 100%;
  animation: spin 20s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Point of View --- */
.pov {
  padding: 8rem 0 9rem;
}

.pov__label {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  margin-bottom: 2.5rem;
}

.pov__text {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 100;
  line-height: 1.6;
  max-width: 680px;
  background: linear-gradient(
    to bottom,
    var(--text-primary) 0%,
    var(--text-primary) calc(var(--pov-reveal, 0%) - 15%),
    var(--border) calc(var(--pov-reveal, 0%) + 15%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pov__text--second {
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .pov__text {
    font-size: 32px;
  }
}

@media (min-width: 960px) {
  .pov__text {
    font-size: 42px;
  }
}

/* --- Profile / Timeline section --- */
.profile {
  padding: 6rem 0;
}

.profile .container {
  max-width: 1280px;
}

.profile__label {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
}

.profile__heading {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 4rem;
}

@media (min-width: 640px) {
  .profile__heading {
    font-size: 64px;
  }
}

@media (min-width: 960px) {
  .profile__heading {
    font-size: 80px;
  }
}

/* Timeline — vertical on mobile, horizontal on desktop */
.timeline {
  padding-top: 0.5rem;
}

.timeline__track {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline__item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2rem;
}

.timeline__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 3px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline__item:last-child::before {
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0,
    var(--border) 4px,
    transparent 4px,
    transparent 8px
  );
}

.timeline--no-dash .timeline__item:last-child::before {
  background: var(--border);
}

.timeline__dot {
  position: absolute;
  top: 2px;
  left: 0;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--text-primary);
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}

.timeline__year {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
  font-style: italic;
  font-family: var(--font-display);
}

.timeline__role {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 0.15rem;
}

.timeline__company {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Horizontal timeline on desktop */
@media (min-width: 768px) {
  .timeline {
    overflow-x: auto;
  }

  .timeline__track {
    flex-direction: row;
    min-width: 600px;
  }

  .timeline__item {
    flex: 1;
    padding-left: 0;
    padding-top: 2rem;
    padding-bottom: 0;
  }

  .timeline__item::before {
    top: 8px;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .timeline__item:last-child::before {
    background: repeating-linear-gradient(
      to right,
      var(--border) 0,
      var(--border) 4px,
      transparent 4px,
      transparent 8px
    );
  }

  .timeline--no-dash .timeline__item:last-child::before {
    background: var(--border);
  }

  .timeline__dot {
    top: 4px;
    left: 0;
    width: 9px;
    height: 9px;
  }

  .timeline__year {
    margin-bottom: 0.75rem;
  }
}

/* --- Section label --- */
.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding-bottom: 1rem;
  margin-bottom: 0;
}

/* --- Section spacing --- */
.section {
  padding-top: 6rem;
}

/* --- Projects grid --- */
.projects__title {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  margin-bottom: 3rem;
}

/* Featured project — minimal border card */
.project-feature {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  box-shadow: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.project-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

@media (min-width: 768px) {
  .project-feature {
    grid-template-columns: 1fr 1fr;
    padding: 2.5rem;
    gap: 2.5rem;
    align-items: center;
  }
}

.project-feature__content {
  display: flex;
  flex-direction: column;
}

.project-feature__left {
  display: flex;
  flex-direction: column;
}

.project-feature__image {
  background: var(--bg-placeholder);
  aspect-ratio: 4 / 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-tertiary);
  border-radius: 8px;
  overflow: hidden;
}

.project-feature__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .project-feature__image {
    aspect-ratio: auto;
    height: 100%;
    min-height: 260px;
  }
}

.project-feature__year {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.project-feature__name {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.project-feature__quote {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.project-feature__desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}


.project-feature__results-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
}

.project-feature__results {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-feature__results li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.project-feature__results li::before {
  content: '✓';
  color: var(--text-tertiary);
  flex-shrink: 0;
  font-size: 14px;
}

/* Other projects — 4-column small cards */
.projects-grid-sm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem;
  margin-top: 6rem;
}

@media (min-width: 768px) {
  .projects-grid-sm {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

.project-card-sm {
  display: block;
  cursor: pointer;
}

.project-card-sm:hover {
  text-decoration: none;
}

.project-card-sm__image img,
.archive-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-sm__image {
  background: var(--bg-placeholder);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card-sm:hover .project-card-sm__image {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.project-card-sm__year {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}

.project-card-sm__name {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.project-card-sm__desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.project-card-sm__impact {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-primary);
}

.projects__see-all {
  display: inline-block;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.projects__see-all:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* --- Archive grid — 5 columns --- */
.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem;
}

@media (min-width: 768px) {
  .archive-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
  }
}

.archive-card {
  cursor: default;
}

.archive-card__image {
  background: var(--bg-placeholder);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  border-radius: 8px;
}

.archive-card:hover .archive-card__image {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.archive-card__name {
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.prologue-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.prologue__note {
  margin-top: 2rem;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.prologue-grid .archive-card__image {
  aspect-ratio: 16 / 10;
}

.archive-card__desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.archive-card__type {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* --- About paragraph (home) --- */
.about-brief {
  padding-top: 6rem;
}

.about-brief p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 460px;
  line-height: 1.7;
}

/* --- Footer --- */
.site-footer {
  padding: 6rem 0 4rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.site-footer.is-visible {
  opacity: 1;
}

body.home .site-footer {
  position: sticky;
  bottom: 0;
  z-index: -1;
}

/* Detail pages */
body:not(.home) main {
  padding-bottom: 0;
  margin-bottom: 0;
}

body:not(.home) .site-footer {
  margin-top: 2rem;
}

/* Back to portfolio link */

.back-link {
  display: block;
  padding: 5rem 0 3rem;
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

main {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* Sticky footer reveal — only on home page */
body.home main {
  margin-bottom: 250px;
  padding-bottom: 4rem;
}

.site-header {
  z-index: 50;
}

.site-footer__top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .site-footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  margin: 0;
}

@media (min-width: 640px) {
  .site-footer__heading {
    font-size: 64px;
  }
}

.site-footer__links {
  display: flex;
  gap: 3rem;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.site-footer__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.site-footer__value {
  font-size: 15px;
  font-weight: 400;
}

.site-footer__value a {
  text-decoration: underline;
}

.site-footer__value a:hover {
  color: var(--text-secondary);
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 2rem;
}

@media (min-width: 640px) {
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.site-footer__updated {
  font-size: 13px;
  color: var(--text-tertiary);
}

.site-footer__copyright {
  font-size: 13px;
  color: var(--text-tertiary);
}

.site-footer__disclaimer {
  margin-top: 0.5rem;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 300;
}

/* ============================================
   Project detail pages
   ============================================ */

/* --- Project hero --- */
.project-hero {
  padding: 5rem 0 2rem;
}

.project-hero__number {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.project-hero__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.project-hero__subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 640px;
}

/* --- Project meta grid --- */
.project-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 2rem 0;
  font-size: 13px;
}

@media (min-width: 640px) {
  .project-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .project-meta {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}

.project-meta dd {
  font-weight: 400;
}

/* --- Content sections --- */
.content-section {
  padding-top: 3rem;
}

.content-section__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.content-section__body {
  max-width: 100%;
  font-size: 14px;
  line-height: 1.8;
}

.content-section__body p {
  margin-bottom: 1.25rem;
}

.content-section__body p:last-child {
  margin-bottom: 0;
}

.content-section__body h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.content-section__body ul,
.content-section__body ol {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.content-section__body li {
  margin-bottom: 0.35rem;
}

/* --- Pull quote --- */
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  max-width: 500px;
  padding: 2rem 0;
  color: var(--text-primary);
}

/* --- Metrics table --- */
.metrics-table {
  width: 100%;
  max-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  margin: 1.5rem 0;
}

.metrics-table th,
.metrics-table td {
  text-align: left;
  padding: 0.6rem 0;
  font-weight: 300;
  vertical-align: top;
}

.metrics-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  font-weight: 400;
}

.metrics-table td:last-child {
  text-align: right;
  font-weight: 400;
}

/* --- Image placeholder --- */
.img-placeholder {
  background: var(--bg-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 2rem 0;
  border-radius: 0;
}

.img-placeholder--hero {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.img-placeholder--ui {
  aspect-ratio: 4 / 3;
  width: 100%;
}

/* --- Project navigation --- */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 3rem 0;
  margin-top: 3rem;
  font-size: 13px;
}

.project-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--text-secondary);
}

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

.project-nav__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.project-nav__name {
  font-weight: 400;
}

.project-nav__next {
  text-align: right;
}

/* ============================================
   About page
   ============================================ */

.about-hero {
  padding: 4rem 0 2rem;
}

.about-hero__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
}

.about-section {
  padding-top: 2rem;
}

.about-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 1.5rem 0;
}

@media (min-width: 640px) {
  .about-row {
    grid-template-columns: 160px 1fr;
    gap: 2rem;
  }
}

.about-row__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding-top: 0.15rem;
}

.about-row__content {
  max-width: 560px;
  line-height: 1.7;
}

.about-row__content p {
  margin-bottom: 0.75rem;
}

.about-row__content p:last-child {
  margin-bottom: 0;
}

.about-activities {
  padding-top: 3rem;
}

.about-activities__list {
  list-style: none;
  padding-top: 1rem;
  font-size: 14px;
}

.about-activities__list li {
  padding: 0.4rem 0;
  color: var(--text-secondary);
}

.about-contact {
  padding: 4rem 0 2rem;
}

.about-contact__status {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 1rem;
}

.about-contact__links {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
}

.about-contact__links a {
  display: inline;
}

/* --- Hamburger menu (mobile) --- */
.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-burger.is-open span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-burger.is-open span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.nav-menu__contact {
  display: none;
}

@media (max-width: 767px) {
  .nav-burger {
    display: flex;
  }

  .nav-contact {
    display: none;
  }

  .nav-menu__contact {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .nav-menu.is-open {
    display: flex;
  }

  [data-theme="dark"] .nav-menu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

/* --- Close button (detail pages) --- */
.close-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  font-weight: 300;
  color: var(--text-secondary);
  transition: transform 0.3s ease, opacity 0.3s ease, color 0.2s, border-color 0.2s;
}

.close-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.close-btn.is-hidden {
  transform: translateY(-80px);
  opacity: 0;
}

/* --- Page transitions --- */
main {
  animation: pageEnter 0.5s ease both;
}

body.page-exit main {
  animation: pageExit 0.4s ease both;
}

body.page-exit .site-header {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* --- Contact modal --- */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.contact-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0s 0s;
}

.contact-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.contact-modal__card {
  position: relative;
  background: var(--bg);
  border-radius: 20px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-modal.is-open .contact-modal__card {
  transform: translateY(0);
}

.contact-modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.contact-modal__close:hover {
  color: var(--text-primary);
}

.contact-modal__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.contact-modal__subtitle {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-modal__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.contact-modal__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.contact-modal__topic input {
  display: none;
}

.contact-modal__topic span {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.contact-modal__topic input:checked + span {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}

.contact-modal__topic span:hover {
  border-color: var(--text-primary);
}

.contact-modal__input,
.contact-modal__textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-primary);
  background: transparent;
  outline: none;
  margin-bottom: 1.5rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.contact-modal__input:focus,
.contact-modal__textarea:focus {
  border-color: var(--text-tertiary);
}

.contact-modal__input::placeholder,
.contact-modal__textarea::placeholder {
  color: var(--text-tertiary);
}

.contact-modal__send {
  width: 100%;
  padding: 16px;
  background: var(--text-primary);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.2s;
}

.contact-modal__send:hover {
  opacity: 0.85;
}

/* --- Image modal --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.is-open {
  display: flex;
  opacity: 1;
}

.modal__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

.modal__caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #999;
  font-size: 13px;
  text-align: center;
}

.modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

.archive-card {
  cursor: pointer;
}

/* --- Theme toggle --- */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* Show sun in dark mode, moon in light mode */
.theme-toggle__moon { display: block; }
.theme-toggle__sun { display: none; }

[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }


/* --- Responsive --- */
@media (max-width: 639px) {
  .hero__title {
    font-size: 36px;
  }

  .project-row__title {
    font-size: 20px;
  }

  .project-row--notable .project-row__title {
    font-size: 18px;
  }

  .project-hero__title {
    font-size: 28px;
  }

  .pull-quote {
    font-size: 18px;
  }

  .site-header__nav {
    gap: 20px;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  .hero__title {
    font-size: 48px;
  }

  .project-hero__title {
    font-size: 32px;
  }
}
