:root {
  --bg: #090a0c;
  --fg: #eceae4;
  --card: #111318;
  --muted: #8f918c;
  --faint: #6a6d68;
  --primary: #c5cdd6;
  --primary-fg: #090a0c;
  --secondary: #181b22;
  --border: rgb(236 234 228 / 12%);
  --font-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; border-color: var(--border); }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01" on, "cv11" on;
}

button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--primary); color: var(--primary-fg); }

.page-wrap {
  margin-inline: auto;
  width: 100%;
  max-width: 72rem;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) {
  .page-wrap { padding-inline: 2rem; }
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid-bg {
  background-image:
    linear-gradient(to right, rgb(236 234 228 / 4.5%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(236 234 228 / 4.5%) 1px, transparent 1px);
  background-size: 72px 72px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid transparent;
  background: rgb(9 10 12 / 40%);
}
header.site.scrolled {
  border-bottom-color: var(--border);
  background: rgb(9 10 12 / 85%);
}
.progress {
  position: absolute;
  inset: 0 auto auto 0;
  height: 1px;
  width: 100%;
  background: var(--primary);
  transform-origin: left;
  pointer-events: none;
}
.header-inner {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { display: flex; align-items: baseline; gap: 0.5rem; }
.logo-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}
.logo-handle {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (min-width: 640px) { .logo-handle { display: inline; } }

nav.desktop { display: none; align-items: center; gap: 1.75rem; }
nav.desktop a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 150ms ease;
}
nav.desktop a:hover { color: var(--fg); }
@media (min-width: 768px) { nav.desktop { display: flex; } }

.header-actions { display: flex; align-items: center; gap: 0.25rem; }
.lang {
  display: flex;
  margin-right: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
}
.lang button {
  height: 2rem;
  min-width: 2.5rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.lang button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-fg);
}
.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--fg);
}
.icon-btn svg { width: 1rem; height: 1rem; }
@media (min-width: 640px) { .gh-btn { display: inline-flex; } }
.menu-btn { display: inline-flex; }
@media (min-width: 768px) { .menu-btn { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: flex;
  height: 3rem;
  align-items: center;
  font-size: 1rem;
}

section {
  scroll-margin-top: 5rem;
  padding-block: 5rem;
}
@media (min-width: 768px) {
  section { padding-block: 7rem; }
}
.border-t { border-top: 1px solid var(--border); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .num { color: var(--faint); }
.kicker .slash { margin-inline: 0.75rem; color: var(--border); }

h1.display {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 16vw, 9rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.03em;
}
h2.display {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}
.lead {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  line-height: 1.6;
}
.handle {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: end;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 20rem; }
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 150ms ease, background 150ms ease;
}
.btn:active { transform: scale(0.96); }
.btn svg { width: 1rem; height: 1rem; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--secondary); }

.available {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
}
.dot span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--primary);
}
.dot span.ping {
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.4;
}
@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.portrait {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 0.5rem;
}
.portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--border);
}
.stat { background: var(--card); padding: 0.75rem 1rem; }
.stat dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.bio-line {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.about-grid {
  display: grid;
  gap: 3rem;
  margin-top: 3rem;
}
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); }
}
.prose { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.prose p + p { margin-top: 1.25rem; }
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.facts li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.facts li:last-child { border-bottom: 0; }
.facts .lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts .val { font-size: 0.875rem; line-height: 1.5; }

.share-label {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.share-bar {
  display: flex;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--secondary);
}
.share-bar i { display: block; height: 100%; background: var(--primary); }
.share-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.share-legend span { margin-left: 0.5rem; color: var(--faint); }

.skill-grid {
  display: grid;
  gap: 1px;
  margin-top: 3rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--border);
}
@media (min-width: 640px) { .skill-grid { grid-template-columns: 1fr 1fr; } }
.skill { background: var(--card); padding: 1.5rem; }
.skill .n {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--faint);
}
.skill h3 { margin: 0.75rem 0 0; font-size: 1.125rem; font-weight: 500; }
.skill p { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted); line-height: 1.55; }

.work-head {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .work-head { flex-direction: row; align-items: end; justify-content: space-between; }
}
.sync {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.filters button {
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
}
.filters button[aria-selected="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-fg);
}

.rows {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.rows > li { border-bottom: 1px solid var(--border); }
.rows > li:last-child { border-bottom: 0; }
.row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
}
.row:hover { background: rgb(24 27 34 / 40%); }
.row-main { min-width: 0; flex: 1; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.row-title strong { font-size: 1.05rem; font-weight: 500; }
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.row-desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-meta {
  display: none;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
@media (min-width: 640px) { .row-meta { display: flex; } }
.row-meta .year { color: var(--faint); font-variant-numeric: tabular-nums; }
.arrow { width: 1rem; height: 1rem; color: var(--faint); flex-shrink: 0; }
.row:hover .arrow { color: var(--fg); }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}
.sheet.open { display: block; }
.sheet-bg {
  position: absolute;
  inset: 0;
  background: rgb(9 10 12 / 70%);
}
.sheet-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-left: 1px solid var(--border);
  background: var(--card);
}
.sheet h3 {
  margin: 0 2.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
}
.sheet p { margin: 0; color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.sheet-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
}
.sheet-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sheet .btn { margin-top: auto; width: 100%; }

.contact-icon { width: 1.25rem; height: 1.25rem; color: var(--muted); flex-shrink: 0; }
.row-stack { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-stack strong { font-weight: 500; }
.row-stack span { font-size: 0.875rem; color: var(--muted); }

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-by {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-gh {
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--faint);
}

.reveal {
  animation: reveal-up 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.d1 { animation-delay: 80ms; }
.d2 { animation-delay: 160ms; }
.d3 { animation-delay: 240ms; }
.d4 { animation-delay: 320ms; }
.d5 { animation-delay: 400ms; }
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .dot span.ping { animation: none; }
}
