:root {
  --ink: #101114;
  --paper: #f7f3ea;
  --surface: #fffaf0;
  --signal: #d84f38;
  --archive: #2e6f95;
  --warm: #e7b84b;
  --rule: #e6ded1;
  --muted: #706b63;
  --shadow: 0 18px 50px rgba(16, 17, 20, 0.12);
  --radius: 8px;
  --display: Georgia, 'Times New Roman', 'Noto Serif SC', serif;
  --body: Inter, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.65;
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(247, 243, 234, 0.92);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px);
}

.brand {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: lowercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

main {
  overflow: hidden;
}

.hero,
.section,
.company-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: end;
  padding: 88px 0 72px;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--archive);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
}

h1 {
  max-width: 920px;
  font-size: 4.7rem;
}

h2 {
  font-size: 2.7rem;
}

h3 {
  margin: 0;
  font-size: 1.26rem;
  line-height: 1.3;
}

.hero-copy {
  max-width: 720px;
  margin: 28px 0 0;
  color: #3e3a35;
  font-size: 1.16rem;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button,
.media-trigger,
.modal-close {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font: 700 0.92rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.media-trigger:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.button.secondary,
.button.ghost {
  background: transparent;
  color: var(--ink);
}

.button.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.hero-rail {
  border-left: 2px solid var(--ink);
  padding-left: 22px;
  font-family: var(--mono);
}

.hero-rail span,
.hero-rail strong {
  display: block;
}

.hero-rail span {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.hero-rail span:first-child {
  margin-top: 0;
}

.hero-rail strong {
  margin-top: 4px;
  font-size: 1rem;
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.6fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

.featured-list {
  display: grid;
  gap: 28px;
}

.featured-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
}

.timeline-mark {
  position: relative;
  padding-top: 8px;
  font-family: var(--mono);
}

.timeline-mark::before {
  content: '';
  position: absolute;
  top: 48px;
  bottom: -34px;
  left: 23px;
  width: 1px;
  background: var(--rule);
}

.featured-card:last-child .timeline-mark::before {
  display: none;
}

.timeline-mark span {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--warm);
  font-weight: 800;
}

.timeline-mark small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.featured-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: stretch;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px 32px 0;
}

.featured-body p:not(.kicker),
.work-card-body p:not(.kicker),
.ability-card p,
.about-copy p,
.company-inner p {
  color: #4b4640;
}

.work-media {
  position: relative;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.work-media img,
.work-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-trigger {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 38px;
  border-color: rgba(247, 243, 234, 0.8);
  background: rgba(16, 17, 20, 0.82);
  color: var(--paper);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 250, 240, 0.65);
  color: #554f47;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.ability-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.ability-card,
.work-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.72);
}

.ability-card {
  padding: 22px;
}

.work-card {
  overflow: hidden;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-card-body {
  padding: 18px;
}

.compact-card .work-card-body {
  padding: 16px;
}

.compact-media {
  aspect-ratio: 16 / 10;
}

.subsection-title {
  margin: 52px 0 18px;
  font-family: var(--display);
  font-size: 1.8rem;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: 42px;
  padding-bottom: 96px;
}

.about-copy p:first-child {
  margin-top: 0;
}

.company-intro {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 4px solid var(--signal);
}

.company-inner {
  padding: 42px 0;
}

.company-inner h2 {
  max-width: 880px;
  font-size: 2.6rem;
}

.company-inner p {
  max-width: 920px;
  color: #eee6d8;
}

.company-intro .eyebrow {
  color: var(--warm);
}

.company-block {
  margin-top: 22px;
}

.company-block strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.company-intro .tag-list li {
  border-color: rgba(247, 243, 234, 0.24);
  background: rgba(247, 243, 234, 0.08);
  color: var(--paper);
}

.company-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.company-proof p {
  margin: 0;
  border: 1px solid rgba(247, 243, 234, 0.18);
  border-radius: var(--radius);
  padding: 14px;
}

.company-proof strong {
  display: block;
  color: var(--warm);
}

.company-intro .button.secondary {
  border-color: var(--paper);
  color: var(--paper);
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 17, 20, 0.72);
}

.media-modal[hidden],
.company-intro[hidden] {
  display: none;
}

.media-panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 18px;
}

.media-panel h2 {
  margin: 0 64px 16px 0;
  font-family: var(--body);
  font-size: 1.1rem;
}

.media-panel video,
.media-panel img {
  width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--ink);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 34px;
  padding: 8px 10px;
}

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

  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-rail {
    border-left: 0;
    border-top: 2px solid var(--ink);
    padding: 18px 0 0;
  }

  .timeline-mark::before {
    display: none;
  }

  .featured-body {
    padding: 24px;
  }

  .ability-grid,
  .card-grid,
  .card-grid.compact,
  .company-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  .hero,
  .section,
  .company-inner {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    padding: 48px 0 54px;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2,
  .company-inner h2 {
    font-size: 2rem;
  }

  .hero-copy {
    font-size: 1.02rem;
  }

  .section {
    padding: 56px 0;
  }

  .ability-grid,
  .card-grid,
  .card-grid.compact,
  .company-proof {
    grid-template-columns: 1fr;
  }

  .featured-content {
    gap: 0;
  }

  .work-media {
    aspect-ratio: 4 / 3;
  }

  .button,
  .media-trigger,
  .modal-close {
    width: 100%;
  }

  .modal-close {
    position: static;
    margin-bottom: 12px;
  }

  .media-panel h2 {
    margin-right: 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}