:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --paper: #fbf8f0;
  --ink: #242424;
  --muted: #6f6a60;
  --line: #ded8cc;
  --accent: #d97917;
  --accent-soft: #f0c797;
  --charcoal: #2a2a2a;
  --shadow: 0 24px 80px rgb(42 42 42 / 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.dialog-open {
  overflow: hidden;
}

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

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

button,
.button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 16px clamp(22px, 5vw, 72px);
  background: rgb(244 241 234 / 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-size: 0.78rem;
}

.nav-links {
  gap: clamp(16px, 3vw, 36px);
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.hero {
  position: relative;
  padding: clamp(28px, 4vw, 50px) clamp(22px, 5vw, 72px) clamp(42px, 7vw, 78px);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  grid-column: 1 / 2;
  margin: 0;
  font-size: clamp(3.6rem, 10.6vw, 9.6rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 span {
  display: block;
  color: var(--accent);
}

.hero-portrait {
  grid-column: 2 / 3;
  display: block;
  align-self: end;
  justify-self: end;
  width: min(100%, 340px);
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section {
  padding: clamp(56px, 8vw, 108px) clamp(22px, 5vw, 72px);
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-strip div {
  min-height: 158px;
  padding: clamp(22px, 4vw, 44px);
  border-right: 1px solid var(--line);
  color: var(--muted);
}

.intro-strip div:last-child {
  border-right: 0;
}

.stat {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  font-weight: 900;
  line-height: 0.9;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(300px, 0.45fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(28px, 5vw, 54px);
}

.work-section .section-heading {
  align-items: start;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -10px;
}

.section-heading h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-bar,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-bar {
  margin-bottom: 22px;
}

.button,
.filter,
.icon-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 850;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button.primary,
.filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.button:hover,
.filter:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}

.button.primary:hover,
.filter.is-active:hover {
  color: var(--paper);
  background: #be6412;
}

.filter {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 750;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
  border-top: 1px solid var(--line);
  padding-top: clamp(22px, 4vw, 36px);
  background: transparent;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.project-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.project-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.project-card:hover .project-poster img {
  transform: scale(1.035);
}

.project-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgb(36 36 36 / 0.78);
  color: var(--paper);
  font-size: 0.74rem;
  font-weight: 850;
}

.project-body {
  display: grid;
  align-content: start;
  padding: clamp(18px, 3vw, 28px);
}

.project-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-body h3 {
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 3.1vw, 3.25rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-body p {
  max-width: 560px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.project-role {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-role span:first-child {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-action {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-section,
.resume-section,
.contact-section {
  border-top: 1px solid var(--line);
}

.profile-layout,
.resume-layout {
  display: block;
}

.profile-copy {
  max-width: 980px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.4rem);
  font-weight: 400;
  line-height: 1.36;
}

.contact-section .section-heading p:not(.eyebrow) {
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.4rem);
  font-weight: 400;
  line-height: 1.36;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.timeline article {
  padding: clamp(18px, 3vw, 28px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.timeline span {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline h3 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.credential-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 210px;
  padding: clamp(18px, 3vw, 28px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.credential-card > span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credential-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1;
}

.credential-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 980px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-form label.full {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.contact-form input {
  min-height: 52px;
  padding: 0 14px;
}

.contact-form textarea {
  resize: vertical;
  padding: 14px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.contact-form .button {
  justify-self: start;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(22px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer a {
  color: var(--ink);
}

.project-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgb(36 36 36 / 0.58);
  backdrop-filter: blur(8px);
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.48fr);
  gap: 0;
}

.dialog-grid > * {
  min-width: 0;
}

.video-shell {
  display: grid;
  place-items: center;
  min-height: 360px;
  background: #050505;
}

.video-shell video {
  width: 100%;
  max-height: calc(100svh - 34px);
  background: #050505;
}

.dialog-details {
  min-width: 0;
  padding: clamp(24px, 4vw, 40px);
  border-left: 1px solid var(--line);
}

.dialog-details h2 {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.9;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dialog-details dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.dialog-details dt {
  color: var(--muted);
}

.dialog-details dd {
  margin: 0;
  color: var(--ink);
}

.dialog-details p {
  color: var(--muted);
  line-height: 1.65;
}

.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--charcoal);
  color: var(--paper);
}

.close-dialog svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 980px) {
  .hero-content,
  .section-heading,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  h1,
  .hero-portrait {
    grid-column: auto;
  }

  .hero-portrait {
    justify-self: start;
  }

  .dialog-details {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

}

@media (max-width: 720px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5.6rem);
  }

  .intro-strip,
  .timeline,
  .credential-grid {
    grid-template-columns: 1fr;
  }

  .intro-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .intro-strip div:last-child {
    border-bottom: 0;
  }

  .project-card {
    padding: 0;
  }

  .project-body h3 {
    font-size: clamp(2.1rem, 12vw, 3.4rem);
  }

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

  .footer {
    flex-direction: column;
  }
}
