@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Initial hidden state — prevents flash before animate.js runs */
.site-avatar-wrap, .site-name, .site-bio,
.cv-section-title, .work-card, .cv-row, .contact-row,
.project-nav, .project-title, .project-meta,
.img-block, .img-grid-2, .video-embed, .callout, blockquote, .project-content h2 {
  opacity: 0;
}

/* Revealed state — set by JS after animation; restores hover/transitions */
.is-revealed {
  opacity: 1;
}

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

:root {
  --text:   oklch(0.162 0 0);
  --gray:   oklch(0.549 0 0);
  --muted:  oklch(0.695 0 0);
  --border: oklch(0.879 0 0);
  --bg:     oklch(0.982 0 0);
  --font: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-feature-settings: 'ss01' 1, 'ss02' 1, 'ss03' 1;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.cv-name a:active,
.contact-value:active {
  color: oklch(0.606 0 0);
}

.project-link:active,
.project-link.is-touching {
  color: var(--text);
}

.site-wordmark:active,
.site-wordmark.is-touching {
  color: var(--text);
}

.site-wordmark:active svg,
.site-wordmark.is-touching svg {
  color: var(--text);
  transform: translateY(-0.5px) translateX(-2px);
}

/* ── Page wrapper ── */
.page-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 16px 32px;
}

.project-page .page-wrapper {
  max-width: 960px;
}

/* ── Header ── */
.site-header {
  margin-bottom: 32px;
}

.site-avatar-wrap {
  width: 96px;
  height: 96px;
  overflow: hidden;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.site-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.site-name {
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 450;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.site-bio {
  font-size: clamp(14px, 3.6vw, 16px);
  font-weight: 400;
  letter-spacing: 0;
  color: oklch(0.348 0 0);
  line-height: 1.5;
  max-width: 100%;
  text-wrap: balance;
}

/* ── Sections ── */
.cv-section {
  margin-bottom: 40px;
}

.cv-section-title {
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 450;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 16px;
}

/* ── Selected Work cards ── */
.work-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 769px) {
  .work-grid { gap: 32px; }
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.work-cover,
.work-info {
  transition: opacity 0.15s ease;
}


.work-card {
  transition: transform 150ms ease-out;
}
.work-card:active {
  transform: scale(0.96);
}

.work-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  order: 2;
}

.work-cover {
  order: 1;
}

.work-title {
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: 450;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.5;
}

.work-subtitle {
  font-size: clamp(13px, 3.5vw, 14px);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--gray);
  line-height: 1.8;
}

.work-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: oklch(0.965 0 0);
  overflow: hidden;
  border-radius: 0;
}

.work-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .work-card:hover .work-cover img {
    transform: scale(1.02);
  }
}

/* ── Experience / Education rows ── */
.cv-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cv-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: baseline;
}

.cv-date {
  font-size: clamp(13px, 3.5vw, 14px);
  letter-spacing: 0;
  color: oklch(0.606 0 0);
  line-height: 1.5;
  white-space: nowrap;
}

.cv-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cv-name {
  font-size: clamp(13px, 3.4vw, 15px);
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.5;
  text-wrap: balance;
}

.cv-name a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .cv-name a:hover {
    color: oklch(0.606 0 0);
  }
}

.cv-location {
  font-size: clamp(13px, 3.5vw, 14px);
  letter-spacing: 0;
  color: var(--gray);
  line-height: 25px;
  display: none;
}

@media (min-width: 769px) {
  .page-wrapper { padding: 72px 24px 64px; }
  .site-header { margin-bottom: 48px; }
  .cv-section { margin-bottom: 48px; }
  .cv-row { grid-template-columns: 130px 1fr; gap: 0 24px; }
  .cv-date { line-height: 24px; }
  .cv-name { line-height: 24px; text-wrap: unset; }
  .cv-location { display: block; }
}

/* ── Contact rows ── */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: baseline;
}

@media (min-width: 769px) {
  .contact-row { grid-template-columns: 130px 1fr; gap: 0 24px; }
}

.contact-label {
  font-size: clamp(13px, 3.5vw, 14px);
  letter-spacing: 0;
  color: oklch(0.606 0 0);
  line-height: 1.8;
}

.contact-value {
  font-size: clamp(13px, 3.4vw, 15px);
  letter-spacing: 0;
  color: var(--text);
  line-height: 24px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .contact-value:hover {
    color: oklch(0.606 0 0);
  }
}

/* ══════════════════════════════════════════
   PROJECT PAGE STYLES
══════════════════════════════════════════ */

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
}

@media (min-width: 769px) {
  .project-nav { margin-bottom: 48px; }
}

.site-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(13px, 3.5vw, 14px);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: none;
  touch-action: manipulation;
  transition: color 0.15s ease;
}

.next-project {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: clamp(13px, 3.5vw, 14px);
  font-weight: 450;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: none;
  touch-action: manipulation;
  transition: color 0.15s ease;
}

.next-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  align-self: center;
}

@media (hover: hover) and (pointer: fine) {
  .next-project:hover {
    color: var(--text);
  }
}

.next-project:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 0;
}
.site-wordmark {
  position: relative;
}

.site-wordmark::before {
  content: '';
  position: absolute;
  inset: -10px -8px;
}

.site-wordmark svg {
  color: var(--muted);
  transition: color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
  transform: translateY(-0.5px);
}

@media (hover: hover) and (pointer: fine) {
  .site-wordmark:hover {
    color: var(--text);
  }
  .site-wordmark:hover svg {
    color: var(--text);
    transform: translateX(-2px);
  }
}
.site-wordmark:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 0;
}

.project-title {
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 450;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 8px;
}

@media (min-width: 769px) {
  .project-title { margin-bottom: 16px; }
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 769px) {
  .project-meta { margin-bottom: 32px; }
}

.project-link {
  font-size: clamp(14px, 3.6vw, 16px);
  letter-spacing: 0;
  color: var(--gray);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .project-link:hover { color: var(--text); }
}

.project-desc {
  font-size: clamp(14px, 3.6vw, 16px);
  letter-spacing: 0;
  color: oklch(0.348 0 0);
  line-height: 1.6;
  max-width: 640px;
  text-wrap: balance;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-content h2 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -4px;
}

.img-block {
  margin: 0;
}

.img-block img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.img-grid-2 img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.callout {
  border-left: 1px solid var(--border);
  padding: 0 0 0 14px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  line-height: 1.7;
}

.callout-body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray);
}

blockquote {
  border-left: 2px solid var(--border);
  padding: 2px 0 2px 14px;
  color: var(--gray);
  font-size: 15px;
  letter-spacing: 0;
  margin: 12px 0;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  border: 1px solid var(--border);
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.caption {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Project social links ── */
.project-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding-top: 64px;
}

.social-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  text-decoration: none;
  touch-action: manipulation;
  transition: color 0.15s ease, transform 150ms ease-out;
}

/* 44px hit area for touch */
.social-icon-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
}

.social-icon-btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .social-icon-btn:hover {
    color: oklch(0.606 0 0);
  }
}

.social-icon-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 0;
}

/* Mobile project image spacing — placed last to override base .project-content/.img-block rules */
@media (min-width: 769px) {
  .project-content {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .project-content {
    gap: 16px;
  }
  .img-block,
  .img-grid-2,
  .video-embed {
    margin: 0;
  }
}
