:root {
  --bg: #050505;
  --panel: #080808;
  --panel-2: #101114;
  --paper: #f6f3ea;
  --ink: #f7f7f2;
  --ink-dark: #090a0c;
  --muted: #9b9ca3;
  --muted-dark: #5a5d66;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --cyan: #22d3ee;
  --cyan-dark: #0e7490;
  --amber: #f1c75b;
  --coral: #ff7d5a;
  --green: #89d185;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::selection {
  background: rgba(34, 211, 238, 0.24);
  color: var(--ink);
}

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

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

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

h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: 5.75rem;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 22px;
  font-size: 3.35rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  line-height: 1.25;
}

p {
  margin-bottom: 0;
}

.nowrap {
  white-space: nowrap;
}

.copy-line {
  display: inline;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  width: 100%;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 24px 32px;
  color: var(--ink);
  transition: background 180ms ease, border-color 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled,
.site-header.header-light {
  border-bottom-color: var(--line);
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 2px;
  background: var(--ink);
  color: var(--ink-dark);
  font-weight: 820;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 44px;
  color: rgba(247, 247, 242, 0.45);
  font-size: 0.94rem;
  font-weight: 720;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: var(--cyan);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav .nav-action {
  border: 1px solid var(--line-strong);
  padding: 9px 15px;
}

.site-nav .nav-action:hover,
.site-nav .nav-action:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.site-nav .nav-action::after {
  display: none;
}

.header-contact {
  justify-self: end;
  border: 1px solid var(--line-strong);
  padding: 12px 26px;
  color: rgba(247, 247, 242, 0.85);
  font-size: 0.9rem;
  font-weight: 760;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.header-contact:hover,
.header-contact:focus-visible {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: currentColor;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.section {
  padding: 128px 0;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 22px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-home {
  display: grid;
  align-items: center;
  padding: 128px 0 88px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20% 48%, rgba(255, 255, 255, 0.045), transparent 18%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 86px 86px;
}

.hero-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0, rgba(255, 255, 255, 0.035) 50%, transparent 100%);
  background-size: 100% 8px;
  opacity: 0.1;
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.72fr);
  gap: 72px;
  align-items: center;
}

.hero-layout-minimal {
  display: block;
  width: min(100% - 272px, 1776px);
}

.hero-content {
  position: relative;
  max-width: 860px;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 48px;
  color: rgba(156, 163, 175, 0.86);
  font-size: 1.18rem;
  line-height: 1.75;
}

.hero-home h1 span {
  display: block;
}

.hero-home h1 {
  max-width: 900px;
  margin-bottom: 30px;
  font-size: 5.8rem;
  line-height: 1.08;
}

.hero-dim {
  color: rgba(247, 247, 242, 0.56);
}

.hero-actions,
.project-links,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 13px 22px;
  font-weight: 760;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  outline: none;
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: var(--ink-dark);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--cyan);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.hero-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.panel-image {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #111;
}

.panel-image img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  opacity: 0.8;
  filter: saturate(0.78) contrast(1.05);
}

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

.hero-metrics span {
  min-height: 104px;
  border-right: 1px solid var(--line);
  padding: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-metrics span:last-child {
  border-right: 0;
}

.hero-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1.1;
}

.scroll-cue {
  position: absolute;
  bottom: 52px;
  left: 50%;
  color: rgba(247, 247, 242, 0.48);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  transform: translateX(-50%);
  writing-mode: vertical-rl;
}

.scroll-cue::after {
  display: block;
  width: 1px;
  height: 70px;
  margin: 22px auto 0;
  background: rgba(247, 247, 242, 0.22);
  content: "";
}

.about-section,
.skills-section {
  background: var(--panel);
}

.intro-band {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.intro-grid,
.detail-grid,
.about-layout,
.contact-layout,
.case-grid,
.project-hero-grid,
.skills-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 72px;
  align-items: start;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 60px;
}

.split-heading {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.centered-heading {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading p,
.about-copy p,
.detail-copy p,
.case-grid p {
  color: var(--muted);
  font-size: 1.04rem;
}

.section-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.focus-list li,
.next-list span {
  border-left: 3px solid var(--cyan);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 16px;
  font-weight: 680;
}

.about-copy p + p {
  margin-top: 20px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 42px;
  border-top: 1px solid var(--line);
}

.about-stats span {
  min-height: 112px;
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  color: var(--muted);
}

.about-stats span:last-child {
  border-right: 0;
}

.about-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1.2;
}

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

.staggered-grid .project-card:nth-child(3) {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  max-width: none;
}

.staggered-grid .project-card:nth-child(3) .project-card-body {
  padding-top: 0;
}

.project-card {
  background: transparent;
}

.project-card-offset {
  margin-top: 96px;
}

.project-image-link {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0d0f;
}

.project-image-link::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.78));
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-image-link img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  filter: saturate(0.82);
  transition: filter 220ms ease, transform 500ms ease;
}

.screenshot-shot {
  background: #050505;
}

.screenshot-shot img {
  object-fit: contain;
}

.portrait-shot {
  background: #f7f3ea;
}

.portrait-shot img {
  aspect-ratio: 9 / 16;
  max-height: 620px;
  object-fit: contain;
}

.project-card:hover .project-image-link,
.project-card:focus-within .project-image-link {
  border-color: rgba(34, 211, 238, 0.45);
}

.project-card:hover .project-image-link::after,
.project-card:focus-within .project-image-link::after {
  opacity: 1;
}

.project-card:hover img,
.project-card:focus-within img {
  filter: saturate(1.08);
  transform: scale(1.035);
}

.view-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 2;
  background: var(--cyan);
  color: var(--ink-dark);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 820;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.project-card:hover .view-badge,
.project-card:focus-within .view-badge {
  opacity: 1;
  transform: translateY(0);
}

.project-card-body {
  padding: 24px 0 0;
}

.project-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.project-card h3 {
  word-break: keep-all;
  transition: color 180ms ease;
}

.project-card:hover h3,
.project-card:focus-within h3 {
  color: var(--cyan);
}

.project-card p {
  max-width: 560px;
  color: var(--muted);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 168px;
}

.project-meta span {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(247, 247, 242, 0.62);
  font-size: 0.72rem;
  font-weight: 720;
}

.project-links {
  margin-top: 18px;
}

.text-link {
  color: var(--ink);
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.35);
  text-underline-offset: 5px;
  transition: color 180ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--cyan);
  outline: none;
}

.muted-link {
  color: var(--muted);
  text-decoration: none;
}

.skills-layout {
  grid-template-columns: 0.72fr 1.28fr;
}

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

.skill-column h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.skill-column h3 span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--cyan);
}

.skill-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.skill-row strong {
  font-weight: 560;
}

.skill-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.timeline-section {
  background: var(--bg);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan), rgba(255, 255, 255, 0.12), transparent);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 70px;
}

.timeline-item::before {
  position: absolute;
  top: 8px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink);
  content: "";
}

.timeline-item:nth-child(even) .timeline-date {
  grid-column: 2;
  text-align: left;
}

.timeline-item:nth-child(even) div {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}

.timeline-date {
  color: var(--cyan);
  font-size: 1.08rem;
  font-weight: 780;
  text-align: right;
}

.timeline-item p {
  color: var(--muted);
}

.detail-strip {
  background: var(--panel);
  color: var(--ink);
}

.method-list {
  display: grid;
  gap: 0;
}

.method-list div {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.method-list strong {
  color: var(--cyan);
}

.contact-section {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink-dark);
  text-align: center;
}

.contact-section .section-kicker {
  color: var(--muted-dark);
}

.contact-layout {
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
  justify-items: center;
  max-width: 900px;
}

.contact-actions {
  justify-content: center;
}

.contact-section .button-primary {
  background: var(--ink-dark);
  color: var(--paper);
}

.contact-section .button-primary:hover,
.contact-section .button-primary:focus-visible {
  background: var(--cyan-dark);
}

.contact-section .button-secondary {
  border-color: rgba(9, 10, 12, 0.14);
  color: var(--ink-dark);
}

.contact-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(9, 10, 12, 0.035);
  font-size: 10rem;
  font-weight: 820;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 30px 32px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--cyan);
  outline: none;
}

.project-hero {
  padding: 156px 0 96px;
  background: var(--bg);
}

.project-hero-copy h1 {
  color: var(--ink);
}

.project-hero-copy p {
  color: var(--muted);
  font-size: 1.1rem;
}

.project-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.project-figure img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
}

.screenshot-figure {
  background: #050505;
}

.screenshot-figure img {
  object-fit: contain;
}

.portrait-figure {
  background: #f7f3ea;
}

.portrait-figure img {
  aspect-ratio: 9 / 16;
  max-height: 760px;
  object-fit: contain;
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--cyan);
  font-weight: 760;
}

.project-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.project-facts div,
.feature-grid article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 24px;
}

.project-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.project-facts dd {
  margin: 4px 0 0;
  font-weight: 740;
}

.feature-section {
  background: var(--panel);
}

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

.feature-grid p {
  color: var(--muted);
}

.next-list {
  display: grid;
  gap: 12px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

@media (max-width: 1040px) {
  h1 {
    font-size: 4.4rem;
  }

  h2 {
    font-size: 2.55rem;
  }

  .hero-layout,
  .intro-grid,
  .detail-grid,
  .about-layout,
  .contact-layout,
  .case-grid,
  .project-hero-grid,
  .skills-layout,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 560px;
  }

  .project-card-offset {
    margin-top: 0;
  }

  .staggered-grid .project-card:nth-child(3) {
    display: block;
    grid-column: auto;
    max-width: none;
  }

  .staggered-grid .project-card:nth-child(3) .project-card-body {
    padding-top: 24px;
  }

  .skill-columns {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 14px 18px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-self: end;
    border-color: rgba(255, 255, 255, 0.28);
  }

  .header-contact {
    display: none;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 18px;
    display: none;
    min-width: 220px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.94);
    padding: 8px 12px;
    box-shadow: var(--shadow);
  }

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

  .site-nav a,
  .site-nav .nav-action {
    width: 100%;
    padding: 11px 0;
  }

  .site-nav .nav-action {
    border: 0;
  }

  .hero-home {
    min-height: auto;
    padding: 128px 0 92px;
  }

  .section,
  .project-hero {
    padding: 78px 0;
  }

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

  h1 {
    font-size: 2.9rem;
  }

  .hero-home h1 {
    font-size: 3.35rem;
    line-height: 1.12;
  }

  h2 {
    font-size: 1.86rem;
    line-break: anywhere;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .hero-copy {
    max-width: 100%;
    font-size: 1.02rem;
    line-break: anywhere;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .about-copy p,
  .section-heading p,
  .project-card p {
    line-break: anywhere;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .nowrap {
    white-space: normal;
  }

  .copy-line {
    display: block;
  }

  .hero-metrics,
  .about-stats,
  .focus-list,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics span,
  .about-stats span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-metrics span:last-child,
  .about-stats span:last-child {
    border-bottom: 0;
  }

  .split-heading {
    display: block;
  }

  .section-count {
    display: inline-block;
    margin-top: 12px;
  }

  .project-title-row {
    grid-template-columns: 1fr;
  }

  .project-meta {
    justify-content: flex-start;
  }

  .timeline::before {
    left: 4px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) .timeline-date,
  .timeline-item:nth-child(even) div {
    display: block;
    text-align: left;
  }

  .timeline-item {
    padding-left: 28px;
  }

  .timeline-item::before {
    left: 0;
  }

  .timeline-date {
    display: block;
    margin-bottom: 10px;
    text-align: left;
  }

  .contact-watermark {
    font-size: 4.7rem;
  }

  .site-footer {
    flex-direction: column;
    padding: 24px 18px;
  }
}
