:root {
  color-scheme: light;
  --ink: oklch(18% 0.018 255);
  --muted: oklch(42% 0.018 255);
  --paper: oklch(98.5% 0.003 255);
  --surface: oklch(94% 0.006 255);
  --surface-strong: oklch(88% 0.012 255);
  --line: oklch(78% 0.012 255);
  --accent: oklch(55% 0.2 25);
  --page-pad: clamp(20px, 4vw, 58px);
  --max-width: 1540px;
  --radius: 8px;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

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

button {
  font: inherit;
  cursor: pointer;
}

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

:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--accent), var(--paper) 20%);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--page-pad);
  border-bottom: 1px solid color-mix(in oklch, var(--ink), transparent 88%);
  background: color-mix(in oklch, var(--paper), transparent 4%);
}

.brand-mark {
  min-height: 44px;
  display: inline-grid;
  align-content: center;
  gap: 0;
  font-weight: 790;
  line-height: 1;
}

.brand-mark small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-nav a,
.action-link,
.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 730;
}

.top-nav a {
  padding: 8px 12px;
  color: var(--muted);
}

.top-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

main {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 var(--page-pad) clamp(44px, 7vw, 96px);
}

.hero {
  min-height: calc(100vh - 73px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.82fr);
  gap: clamp(28px, 5vw, 90px);
  align-items: center;
  padding: clamp(38px, 6vw, 76px) 0;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 920px;
}

.eyebrow,
.project-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 940px;
  margin: 10px 0 22px;
  font-size: clamp(3rem, 6.7vw, 7.4rem);
  line-height: 0.88;
  font-weight: 830;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  margin: 0 0 28px;
  color: oklch(34% 0.018 255);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
}

.hero-preview {
  position: relative;
  margin: 0;
  min-height: 62vh;
  border: 1px solid color-mix(in oklch, var(--ink), transparent 78%);
  border-radius: var(--radius);
  overflow: clip;
  background: var(--ink);
}

.hero-preview img:first-child {
  width: 100%;
  height: 100%;
  min-height: 62vh;
  object-fit: cover;
  object-position: top center;
  opacity: 0.92;
}

.hero-preview img:last-child {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(32%, 168px);
  min-width: 104px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  border: 1px solid oklch(95% 0.004 255);
  border-radius: 6px;
  background: var(--paper);
}

.action-link,
.text-button {
  border: 1px solid color-mix(in oklch, var(--ink), transparent 78%);
  padding: 10px 14px;
  background: transparent;
  color: var(--ink);
}

.action-link:hover,
.text-button:hover {
  border-color: var(--ink);
}

.action-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: oklch(98% 0.004 255);
}

.action-primary:hover {
  border-color: color-mix(in oklch, var(--accent), var(--ink) 24%);
  background: color-mix(in oklch, var(--accent), var(--ink) 14%);
}

.work-section,
.detail-section,
.contact-section {
  padding-top: clamp(48px, 7vw, 104px);
}

.section-head {
  max-width: 740px;
  margin-bottom: 24px;
}

.section-head h2,
.contact-section h2 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.98;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 34px);
}

.project-card {
  display: grid;
  min-width: 0;
  border: 1px solid color-mix(in oklch, var(--ink), transparent 84%);
  border-radius: var(--radius);
  background: oklch(99% 0.002 255);
  overflow: clip;
}

.project-card.is-selected {
  border-color: color-mix(in oklch, var(--accent), var(--ink) 20%);
}

.project-cover-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--surface);
  overflow: hidden;
}

.project-cover-button img,
.detail-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 260ms ease-out;
}

.project-card:hover .project-cover-button img {
  transform: scale(1.025);
}

.project-card-body {
  display: grid;
  gap: 15px;
  padding: clamp(18px, 2vw, 26px);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-card h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.3vw, 2.35rem);
  line-height: 1;
}

.project-card p {
  margin: 0;
  max-width: 66ch;
  color: oklch(34% 0.018 255);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid color-mix(in oklch, var(--ink), transparent 84%);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 4px;
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 62px);
  padding-top: 20px;
  border-top: 3px solid color-mix(in oklch, var(--accent), var(--paper) 25%);
}

.detail-media {
  border: 1px solid color-mix(in oklch, var(--ink), transparent 84%);
  border-radius: var(--radius);
  overflow: clip;
  background: var(--surface);
}

.detail-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.detail-summary {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.22rem, 2vw, 1.7rem);
  line-height: 1.32;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.detail-columns h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.detail-columns p,
.contact-section p {
  margin: 0;
  color: oklch(34% 0.018 255);
}

.detail-actions {
  padding-top: 8px;
}

.contact-section {
  max-width: 820px;
}

.contact-section p {
  max-width: 660px;
  margin: 18px 0 24px;
  font-size: 1.12rem;
}

.site-footer {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--page-pad) 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero,
  .project-detail {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-preview,
  .hero-preview img:first-child {
    min-height: 420px;
  }

  .project-grid,
  .detail-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    position: static;
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: 2.8rem;
    line-height: 0.94;
  }

  .hero-preview,
  .hero-preview img:first-child {
    min-height: 360px;
  }

  .project-actions,
  .detail-actions {
    align-items: stretch;
  }

  .action-link,
  .text-button {
    width: 100%;
  }

  .site-footer {
    display: grid;
  }
}
