:root {
  color-scheme: light;
  --bg: #fcfcfc;
  --fg: #18181b;
  --muted: #64646f;
  --line: #e4e4e7;
  --card: #ffffff;
  --card2: #f4f4f5;
  --accent: #18181b;
  --accent-fg: #ffffff;
  --focus: #2563eb;
  --radius: 16px;
  --wrap: 1080px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.055);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --line: #29292f;
  --card: #111114;
  --card2: #19191e;
  --accent: #fafafa;
  --accent-fg: #09090b;
  --focus: #93c5fd;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    "Geist",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

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

a {
  color: inherit;
}

button,
a {
  touch-action: manipulation;
}

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

button {
  font: inherit;
}

img,
svg {
  max-width: 100%;
}

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.mono {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}

.brand {
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="location"] {
  color: var(--fg);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--muted);
}

.wrap-main {
  overflow: clip;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(270px, 0.8fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(54px, 9vw, 100px) 64px;
}

.hero-main {
  min-width: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.025em;
}

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

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

h1 {
  margin: 25px 0 18px;
  font-size: clamp(42px, 7vw, 70px);
  line-height: 0.99;
  letter-spacing: -0.075em;
  font-weight: 700;
}

h1 .thin {
  display: block;
  margin-top: 17px;
  color: var(--muted);
  font-size: clamp(17px, 2.3vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  opacity: 0.91;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--card);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--muted);
  background: var(--card2);
  transform: translateY(-2px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.stat {
  min-width: 0;
  padding: 17px 14px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.side-card h2 {
  margin: 0 0 17px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card2);
  font-size: 12px;
  font-weight: 500;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.pill:hover {
  transform: translateY(-2px);
  border-color: var(--muted);
}

.details {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.details li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

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

.details a {
  text-align: right;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

section {
  padding-block: 66px;
  border-top: 1px solid var(--line);
}

.sec-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sec-head h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.sec-head p {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.proj {
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.proj:hover {
  transform: translateY(-4px);
  border-color: var(--muted);
  box-shadow: var(--shadow);
}

.proj-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card2);
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.project-number {
  color: var(--muted);
  font-size: 11px;
}

.proj h3 {
  margin: 0 0 9px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.proj p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.project-tech span {
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--card2);
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.link {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card2);
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.link:hover {
  transform: translateY(-2px);
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.process-card {
  min-height: 0;
}

.process-index {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card2);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.contact-copy {
  max-width: 56ch;
}

.contact-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.contact-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  flex-shrink: 0;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 27px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
}

.foot p {
  margin: 0;
}

.js-motion .hero-main > *,
.js-motion .side-card {
  animation: rise-in 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.js-motion .hero-main > :nth-child(2) {
  animation-delay: 0.06s;
}

.js-motion .hero-main > :nth-child(3) {
  animation-delay: 0.12s;
}

.js-motion .hero-main > :nth-child(4) {
  animation-delay: 0.18s;
}

.js-motion .hero-main > :nth-child(5) {
  animation-delay: 0.24s;
}

.js-motion .side-card {
  animation-delay: 0.15s;
}

.js-motion .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 52px;
  }

  .side-card {
    position: static;
  }

  .projects {
    grid-template-columns: 1fr 1fr;
  }

  .contact-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 28px, var(--wrap));
  }

  .topbar-inner {
    min-height: 62px;
    gap: 10px;
  }

  .brand {
    font-size: 15px;
  }

  .nav {
    gap: 12px;
  }

  .nav a {
    font-size: 12px;
  }

  .nav a:nth-child(2) {
    display: none;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .hero {
    padding-block: 42px 48px;
  }

  h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .lead {
    font-size: 15px;
  }

  .stats {
    margin-top: 27px;
  }

  .stat {
    padding: 13px 9px;
  }

  .stat strong {
    font-size: 18px;
  }

  .stat span {
    font-size: 9px;
  }

  section {
    padding-block: 48px;
  }

  .sec-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 20px;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .proj {
    padding: 20px;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-actions .btn {
    flex: 1 1 auto;
  }

  .foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

  .js-motion .reveal {
    opacity: 1;
    transform: none;
  }
}
