@font-face {
  font-family: "Hanken Grotesk";
  src: url("./assets/hanken-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("./assets/hanken-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("./assets/hanken-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10141a;
  --panel: #141a22;
  --panel-2: #0d1117;
  --panel-3: #171f29;
  --line: #27313e;
  --line-soft: rgba(88, 166, 255, 0.18);
  --grid-line: rgba(255, 255, 255, 0.025);
  --hero-glow: rgba(88, 166, 255, 0.12);
  --header-bg: rgba(16, 20, 26, 0.86);
  --hover-bg: rgba(255, 255, 255, 0.03);
  --button-hover-bg: #182433;
  --primary-border: #2f81f7;
  --primary-text: #07111d;
  --card-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  --tab-bg: #1b2634;
  --tag-bg: rgba(88, 166, 255, 0.07);
  --tag-text: #c9e2ff;
  --content-bg: rgba(20, 26, 34, 0.72);
  --portrait-meta-bg: rgba(13, 17, 23, 0.82);
  --placeholder: #7f8b9a;
  --focus-ring: rgba(88, 166, 255, 0.16);
  --text: #eef4fb;
  --muted: #9aa7b6;
  --quiet: #6f7c8c;
  --accent: #58a6ff;
  --accent-strong: #8bc1ff;
  --good: #63d297;
  --warn: #e7be5f;
  --radius: 4px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f8fd;
  --panel: #ffffff;
  --panel-2: #f8fbff;
  --panel-3: #edf4fb;
  --line: #d3deeb;
  --line-soft: rgba(9, 105, 218, 0.18);
  --grid-line: rgba(16, 32, 51, 0.055);
  --hero-glow: rgba(9, 105, 218, 0.12);
  --header-bg: rgba(244, 248, 253, 0.88);
  --hover-bg: rgba(9, 105, 218, 0.06);
  --button-hover-bg: #e9f2ff;
  --primary-border: #0969da;
  --primary-text: #ffffff;
  --card-gradient: linear-gradient(180deg, rgba(9, 105, 218, 0.045), rgba(9, 105, 218, 0.012));
  --tab-bg: #e4effb;
  --tag-bg: rgba(9, 105, 218, 0.09);
  --tag-text: #074b9f;
  --content-bg: rgba(255, 255, 255, 0.82);
  --portrait-meta-bg: rgba(255, 255, 255, 0.9);
  --placeholder: #708197;
  --focus-ring: rgba(9, 105, 218, 0.18);
  --text: #102033;
  --muted: #536273;
  --quiet: #748397;
  --accent: #0969da;
  --accent-strong: #0759bd;
  --good: #16794c;
  --warn: #8a6400;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 75% 8%, var(--hero-glow), transparent 28rem),
    var(--bg);
  background-size: 72px 72px, 72px 72px, auto, auto;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 68px;
  gap: 24px;
}

.brand {
  display: inline-grid;
  grid-template-columns: 36px auto;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel), var(--panel-2));
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 8px 10px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.footer-links a:hover,
.nav-links a.active,
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--hover-bg);
}

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

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  border-color: var(--accent);
  background: var(--button-hover-bg);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--primary-border);
  background: var(--accent);
  color: var(--primary-text);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.ghost {
  background: transparent;
}

.theme-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.theme-toggle:active {
  transform: translateY(1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.82fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: start;
  min-height: calc(100dvh - 68px);
  padding: 82px 0 62px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.hero h1,
.page-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero .role {
  display: block;
  color: var(--muted);
  font-weight: 600;
}

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

.hero-profile {
  display: grid;
  max-width: 720px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-gradient), var(--panel);
}

.profile-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 11px 14px;
}

.profile-row + .profile-row {
  border-top: 1px solid var(--line);
}

.profile-row span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.profile-row strong {
  color: var(--text);
  font-size: 18px;
}

.profile-row p {
  margin: 0;
  color: var(--muted);
}

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

.focus-strip span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 9px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-family: var(--mono);
  font-size: 12px;
}

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

.hero-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(88, 166, 255, 0.28);
  pointer-events: none;
}

.portrait-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: var(--portrait-meta-bg);
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--quiet);
}

.metric-line {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

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

.section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 0;
}

.section-copy {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--muted);
}

.stack-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr 0.9fr;
  gap: 12px;
  margin-top: 30px;
}

.tech-conveyor {
  display: grid;
  gap: 12px;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card-gradient), var(--panel);
  overflow: hidden;
}

.rail-label {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.logo-rail {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.logo-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding: 12px 18px;
  animation: conveyor-left 34s linear infinite;
}

.logo-rail.reverse .logo-track {
  animation-name: conveyor-right;
  animation-duration: 42s;
}

.tech-logo {
  display: inline-flex;
  min-width: 148px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--content-bg);
  color: var(--text);
}

.tech-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.logo-fallback {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tag-bg);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.tech-logo strong {
  font-size: 14px;
  white-space: nowrap;
}

.tech-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.tech-summary span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 9px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-family: var(--mono);
  font-size: 12px;
}

@keyframes conveyor-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes conveyor-right {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

.tech-card,
.project-card,
.info-card,
.contact-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-gradient), var(--panel);
}

.tech-card {
  min-height: 156px;
  padding: 18px;
}

.tech-card:nth-child(2) {
  margin-top: 28px;
}

.tech-card:nth-child(3) {
  min-height: 210px;
}

.tech-card img {
  width: 34px;
  height: 34px;
  margin-bottom: 28px;
}

.tech-card h3,
.project-card h3,
.info-card h3,
.contact-card h3 {
  margin: 0;
  font-size: 20px;
}

.tech-card p,
.project-card p,
.info-card p,
.contact-card p {
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 14px;
  margin-top: 30px;
}

.project-card {
  position: relative;
  min-height: 0;
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.folder-tab {
  width: 86px;
  height: 26px;
  margin: -20px 0 24px -20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius) 0;
  background: var(--tab-bg);
}

.project-preview,
.code-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
}

.project-preview {
  margin-top: 0;
}

.project-preview.compact {
  margin: -2px 0 18px;
}

.project-preview img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.project-preview.compact img {
  aspect-ratio: 16 / 8;
}

.code-preview {
  display: grid;
  gap: 6px;
  margin: -2px 0 18px;
  padding: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.code-preview span:first-child {
  color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 9px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-family: var(--mono);
  font-size: 12px;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.card-links a,
.inline-link {
  color: var(--accent);
  font-weight: 700;
}

.split-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding: 44px 0 72px;
}

.page-head {
  padding: 58px 0 30px;
}

.page-head .lead {
  max-width: 68ch;
}

.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--content-bg);
  padding: clamp(20px, 4vw, 34px);
}

.content-panel + .content-panel {
  margin-top: 18px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-panel p {
  color: var(--muted);
}

.mockup-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
}

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

.mockup-frame img.fit-contain {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--panel-2);
}

.screen-gallery {
  display: grid;
  gap: 16px;
}

.screen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.screen-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
}

.screen-card.featured-screen {
  grid-column: 1 / -1;
}

.screen-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

.screen-card.featured-screen img {
  aspect-ratio: 16 / 9;
}

.screen-caption {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  background: var(--portrait-meta-bg);
}

.screen-caption strong {
  font-size: 16px;
}

.screen-caption span {
  color: var(--muted);
  font-size: 14px;
}

.architecture {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.arch-node {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel-2);
}

.arch-node strong {
  display: block;
  margin-bottom: 8px;
}

.arch-node span {
  color: var(--muted);
  font-size: 14px;
}

.side-rail {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.metric-list {
  display: grid;
  gap: 10px;
}

.metric-card {
  padding: 14px;
}

.metric-card strong {
  display: block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 22px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.stack-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.info-card {
  padding: 22px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.cert-card {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--card-gradient), var(--panel);
}

.cert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cert-icon {
  display: inline-grid;
  min-width: 42px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tag-bg);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.cert-card h3 {
  margin: 0;
  font-size: 20px;
}

.cert-card p {
  margin: 0;
  color: var(--muted);
}

.cert-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.cert-meta span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 12px;
}

.cert-meta strong {
  color: var(--text);
  font-size: 13px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 16px;
  margin-top: 30px;
}

.quick-links {
  display: grid;
  gap: 14px;
}

.contact-card {
  padding: 22px;
}

.contact-card img {
  width: 28px;
  height: 28px;
  margin-bottom: 22px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text);
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--placeholder);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-status {
  min-height: 22px;
  color: var(--good);
  font-family: var(--mono);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-up 520ms ease both;
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .site-shell {
    width: min(100% - 28px, 720px);
  }

  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .hero,
  .split-page,
  .project-grid,
  .contact-layout,
  .stack-columns,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 32px 0 52px;
  }

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

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

  .logo-track,
  .logo-rail.reverse .logo-track {
    width: auto;
    flex-wrap: wrap;
    animation: none;
  }

  .tech-logo {
    flex: 1 1 140px;
    min-width: 0;
  }

  .tech-card:nth-child(2),
  .tech-card:nth-child(3) {
    margin-top: 0;
    min-height: 156px;
  }

  .side-rail {
    position: static;
  }
}

@media (max-width: 620px) {
  .nav {
    min-height: 64px;
  }

  .brand {
    grid-template-columns: 32px auto;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .button {
    width: 100%;
  }

  .nav > .button {
    width: auto;
  }

  .hero h1,
  .page-title {
    font-size: 42px;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero-panel img {
    aspect-ratio: 4 / 4.15;
    object-position: center top;
  }

  .section {
    padding: 52px 0;
  }

  .stack-grid,
  .architecture,
  .pager,
  .screen-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
