/* Harryson Montesdeoca — portfolio
   Fonts: Instrument Serif, Outfit, IBM Plex Mono (SIL OFL). See /fonts. */

:root {
  --bg: #090a0c;
  --bg-elev: #121318;
  --bg-code: #0c0d11;
  --line: rgba(244, 240, 230, 0.12);
  --line-strong: rgba(244, 240, 230, 0.22);
  --text: #f4f0e6;
  --muted: #c4beb3;
  --faint: #8d887c;
  --accent: #e4f56a;
  --accent-soft: rgba(228, 245, 106, 0.14);
  --ink: #12140a;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --nav-h: 76px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
  accent-color: var(--accent);
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("../assets/noise.png");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--accent);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 560;
}

.skip:focus {
  top: 12px;
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: rgba(9, 10, 12, 0.72);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(9, 10, 12, 0.88);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(228, 245, 106, 0.55);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.logo-name {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-weight: 500;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 8px 11px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a.is-active {
  background: rgba(255, 255, 255, 0.05);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  min-width: 40px;
  min-height: 34px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--ink);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  position: relative;
  border-radius: 2px;
}

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger::before {
  top: -6px;
}

.burger::after {
  top: 6px;
}

.nav.is-open .burger {
  background: transparent;
}

.nav.is-open .burger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav.is-open .burger::after {
  top: 0;
  transform: rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 560;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn svg {
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

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

.btn-primary:hover {
  background: #eef7a4;
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
}

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

.btn-small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 18px) 0 36px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-bg::before {
  background-image:
    linear-gradient(rgba(244, 240, 230, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 240, 230, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 68%);
}

.hero-bg::after {
  background:
    radial-gradient(520px 320px at 88% 8%, rgba(228, 245, 106, 0.16), transparent 70%),
    radial-gradient(420px 280px at 8% 90%, rgba(228, 245, 106, 0.06), transparent 70%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow,
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-head .eyebrow span:first-child {
  color: var(--faint);
  letter-spacing: 0.08em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(228, 245, 106, 0.55);
  animation: ping 2.4s ease-out infinite;
  flex: none;
}

@keyframes ping {
  70% {
    box-shadow: 0 0 0 9px rgba(228, 245, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(228, 245, 106, 0);
  }
}

h1 {
  margin: 0;
  font-weight: 400;
}

.name {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 8vw, 7.15rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.name-last {
  font-style: italic;
  color: var(--accent);
}

.role-wrap {
  display: inline-block;
  position: relative;
  max-width: 100%;
  margin-top: 22px;
  animation: typeclip 2.15s steps(49, end) 0.2s both;
}

.role {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  letter-spacing: 0;
  color: var(--text);
  white-space: nowrap;
}

.role-wrap::after {
  content: "";
  position: absolute;
  top: 0.12em;
  bottom: 0.08em;
  left: 0;
  width: 2px;
  background: var(--accent);
  animation: caretm 2.15s steps(49, end) 0.2s both, blink 1s steps(1, end) 2.4s infinite;
}

@keyframes typeclip {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes caretm {
  from {
    left: 0;
  }
  to {
    left: calc(100% - 2px);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.lead {
  max-width: 38rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
  text-wrap: pretty;
}

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

.system {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
}

.system-kicker {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.system-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.node {
  position: relative;
  z-index: 1;
  background: rgba(12, 13, 17, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  min-height: 84px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.node:hover {
  border-color: rgba(228, 245, 106, 0.55);
  transform: translateY(-3px);
}

.node-web {
  grid-column: 1;
}

.node-mobile {
  grid-column: 2;
}

.node-api,
.node-db {
  grid-column: 1 / -1;
}

.node-k {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 6px;
}

.node strong {
  display: block;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.node em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: var(--muted);
  font-size: 0.86rem;
}

.join {
  grid-column: 1 / -1;
  height: 18px;
  position: relative;
}

.join::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 4px, transparent 4px 8px);
  animation: flow 0.9s linear infinite;
}

@keyframes flow {
  to {
    background-position: 0 8px;
  }
}

.system-foot {
  margin: 16px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-hint {
  position: relative;
  z-index: 1;
  margin: 36px 0 0;
  text-align: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 36px;
  margin: 10px auto 0;
  background: linear-gradient(var(--accent), transparent);
}

.band {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
  padding: 16px 0;
}

.marquee-track,
.marquee-seq {
  display: flex;
  align-items: center;
  margin: 0;
}

body.nav-open {
  overflow: hidden;
}

.marquee-track {
  width: max-content;
  animation: ticker 46s linear infinite;
}

.band:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-seq span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px 0 22px;
  position: relative;
  user-select: none;
}

.marquee-seq span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.section {
  padding: clamp(76px, 11vw, 124px) 0;
}

.section-head {
  margin-bottom: 36px;
  max-width: 44rem;
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.15rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.section-head .lede,
.lede {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42rem;
}

.about-grid,
.edu-grid,
.contact-grid {
  display: grid;
  gap: 28px;
}

.about-grid {
  grid-template-columns: 1.35fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.about-copy p {
  margin: 0 0 16px;
  color: var(--muted);
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.pull {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text) !important;
}

.facts {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.02);
}

.facts div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 4px;
}

.facts dd {
  margin: 0;
  color: var(--text);
}

.svc-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.svc,
.svc-layout,
.svc-panels,
.svc-panel,
.viz {
  min-width: 0;
  max-width: 100%;
}

.svc-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
  align-items: start;
}

.svc-tabs {
  display: grid;
  gap: 10px;
}

.svc-tab {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.svc-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(3px);
}

.svc-tab .idx {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  padding-top: 4px;
}

.svc-tab .kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.svc-tab .name {
  display: block;
  font-family: var(--sans);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 520;
}

#svc-web:focus-visible ~ .svc-layout .tab-web,
#svc-api:focus-visible ~ .svc-layout .tab-api,
#svc-data:focus-visible ~ .svc-layout .tab-data,
#svc-mobile:focus-visible ~ .svc-layout .tab-mobile {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#svc-web:checked ~ .svc-layout .tab-web,
#svc-api:checked ~ .svc-layout .tab-api,
#svc-data:checked ~ .svc-layout .tab-data,
#svc-mobile:checked ~ .svc-layout .tab-mobile {
  background: var(--accent-soft);
  border-color: rgba(228, 245, 106, 0.4);
}

#svc-web:checked ~ .svc-layout .tab-web .idx,
#svc-api:checked ~ .svc-layout .tab-api .idx,
#svc-data:checked ~ .svc-layout .tab-data .idx,
#svc-mobile:checked ~ .svc-layout .tab-mobile .idx {
  color: var(--accent);
}

.svc-panels {
  display: grid;
}

.svc-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 24px 22px;
  background: rgba(255, 255, 255, 0.02);
}

#svc-web:checked ~ .svc-layout .panel-web,
#svc-api:checked ~ .svc-layout .panel-api,
#svc-data:checked ~ .svc-layout .panel-data,
#svc-mobile:checked ~ .svc-layout .panel-mobile {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.svc-panel h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.svc-panel > p {
  margin: 0 0 14px;
  color: var(--muted);
}

.svc-panel ul {
  margin: 0 0 18px;
  padding-left: 1.1rem;
  color: var(--muted);
}

.svc-panel li + li {
  margin-top: 6px;
}

.viz {
  margin: 4px 0 0;
}

.viz,
.viz * {
  animation-play-state: paused;
}

#svc-web:checked ~ .svc-layout .panel-web .viz,
#svc-web:checked ~ .svc-layout .panel-web .viz *,
#svc-api:checked ~ .svc-layout .panel-api .viz,
#svc-api:checked ~ .svc-layout .panel-api .viz *,
#svc-data:checked ~ .svc-layout .panel-data .viz,
#svc-data:checked ~ .svc-layout .panel-data .viz *,
#svc-mobile:checked ~ .svc-layout .panel-mobile .viz,
#svc-mobile:checked ~ .svc-layout .panel-mobile .viz * {
  animation-play-state: running;
}

.browser,
.flow,
.schema,
.phone {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(420px 140px at 10% 0%, rgba(228, 245, 106, 0.08), transparent 60%),
    var(--bg-code);
  overflow: hidden;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  background: #3a3d44;
}

.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.url {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.wire {
  padding: 16px;
  display: grid;
  gap: 12px;
  min-height: 196px;
}

.w-nav,
.w-hero,
.w-cards i {
  animation: assemble 0.7s var(--ease) both;
}

.w-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 18px;
}

.w-nav span,
.w-hero span,
.ph-card span,
.ph-head span {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: rgba(244, 240, 230, 0.16);
}

.w-nav span:first-child { width: 28%; }
.w-nav span:nth-child(2) { width: 16%; margin-left: auto; }
.w-nav b,
.w-hero b,
.ph-head b {
  width: 46px;
  height: 16px;
  border-radius: 99px;
  background: var(--accent);
  display: block;
}

.w-hero {
  display: grid;
  gap: 8px;
  animation-delay: 0.18s;
}

.w-hero span:first-child { width: 72%; height: 14px; }
.w-hero span:nth-child(2) { width: 48%; }
.w-hero b { width: 72px; height: 22px; margin-top: 4px; }

.w-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.w-cards i {
  display: block;
  height: 64px;
  border-radius: 12px;
  background:
    linear-gradient(rgba(244, 240, 230, 0.14), rgba(244, 240, 230, 0.14)) 12px 14px / 60% 8px no-repeat,
    linear-gradient(rgba(244, 240, 230, 0.08), rgba(244, 240, 230, 0.08)) 12px 30px / 80% 6px no-repeat,
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.w-cards i:nth-child(1) { animation-delay: 0.36s; }
.w-cards i:nth-child(2) { animation-delay: 0.48s; }
.w-cards i:nth-child(3) { animation-delay: 0.6s; }

@keyframes assemble {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 36px 14px;
  min-height: 148px;
}

.flow-track {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
  background: rgba(244, 240, 230, 0.16);
}

.flow-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  animation: draw-line 1.1s var(--ease) forwards;
}

.flow-node {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 12px 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 13, 17, 0.92);
  animation: assemble 0.6s var(--ease) both;
}

.flow-node:nth-child(4) { animation-delay: 0.12s; }
.flow-node:nth-child(5) { animation-delay: 0.24s; }
.flow-node:nth-child(6) { animation-delay: 0.36s; }
.flow-node:nth-child(7) { animation-delay: 0.48s; }

.flow-node small {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.flow-node span {
  font-size: 0.92rem;
  font-weight: 520;
}

.packet {
  position: absolute;
  z-index: 2;
  top: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(228, 245, 106, 0.8);
  animation: travel 2.8s ease-in-out infinite;
}

.packet-res {
  background: #9dccff;
  box-shadow: 0 0 12px rgba(157, 204, 255, 0.7);
  animation-delay: 1.4s;
}

@keyframes draw-line {
  to { transform: scaleX(1); }
}

@keyframes travel {
  0% { left: 8%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 88%; opacity: 0; }
}

@keyframes draw-line-y {
  to { transform: scaleY(1); }
}

@keyframes travel-y {
  0% { top: 8%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 86%; opacity: 0; }
}

.schema {
  position: relative;
  height: 240px;
}

.schema-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rel {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.7;
  stroke-dasharray: 80;
  stroke-dashoffset: 0;
  animation: draw-rel 1.3s var(--ease) both;
}

.rel-b { animation-delay: 0.25s; stroke: #9dccff; }

@keyframes draw-rel {
  from { stroke-dashoffset: 80; }
  to { stroke-dashoffset: 0; }
}

.tbl {
  position: absolute;
  z-index: 1;
  width: 42%;
  padding: 10px 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 13, 17, 0.94);
  animation: assemble 0.6s var(--ease) both;
}

.tbl h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 560;
  letter-spacing: -0.01em;
}

.tbl i {
  display: block;
  height: 7px;
  margin-top: 6px;
  border-radius: 99px;
  background: rgba(244, 240, 230, 0.14);
}

.tbl i.pk {
  width: 46%;
  background: var(--accent);
}

.tbl i:nth-child(3) { width: 78%; }
.tbl i:nth-child(4) { width: 62%; }

.tbl-a { left: 6%; top: 16%; animation-delay: 0.05s; }
.tbl-b { right: 6%; top: 8%; width: 36%; animation-delay: 0.2s; }
.tbl-c { right: 6%; bottom: 10%; width: 36%; animation-delay: 0.35s; }

.viz-mobile {
  display: grid;
  justify-items: center;
}

.phone {
  width: 176px;
  padding: 10px;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.phone-screen {
  position: relative;
  height: 280px;
  border-radius: 20px;
  background: #101114;
  padding: 18px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.ph-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 54px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(244, 240, 230, 0.18);
}

.ph-head,
.ph-card,
.ph-nav {
  animation: assemble 0.65s var(--ease) both;
}

.ph-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ph-head span { flex: 1; height: 10px; }
.ph-head b { width: 28px; height: 28px; border-radius: 9px; }

.ph-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.ph-card span { margin-top: 8px; }
.ph-card span:first-child { width: 70%; margin-top: 0; }
.ph-card span:nth-child(2) { width: 46%; }
.ph-card:nth-child(3) { animation-delay: 0.18s; }
.ph-card:nth-child(4) { animation-delay: 0.32s; }

.ph-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding-top: 8px;
  animation-delay: 0.46s;
}

.ph-nav i {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(244, 240, 230, 0.16);
  display: block;
}

.ph-nav i:nth-child(2) { background: var(--accent); }

.caption {
  margin: 10px 2px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.process-grid {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.step {
  margin: 0;
  padding: 20px 8px 0 0;
  border-top: 1px solid var(--line-strong);
  position: relative;
}

.step::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  top: -6px;
  left: 0;
}

.step-num {
  display: block;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.stack-groups {
  display: grid;
  gap: 28px;
}

.stack-group h3 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.stack-group .note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.chips li {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.chips li:hover {
  transform: translateY(-3px);
  border-color: rgba(228, 245, 106, 0.55);
  background: var(--accent-soft);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline > li {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  align-items: start;
}

.when {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

.when time {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text);
}

.pill {
  align-self: flex-start;
  border: 1px solid rgba(228, 245, 106, 0.45);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.job {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 28px 18px;
  background:
    linear-gradient(180deg, rgba(228, 245, 106, 0.05), transparent 90px),
    rgba(255, 255, 255, 0.02);
}

.job h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.where {
  margin: 6px 0 16px;
  color: var(--muted);
}

.job ul {
  margin: 0;
  padding-left: 1.15rem;
}

.job li {
  margin: 0.55rem 0;
  color: var(--muted);
  padding-left: 0.2rem;
}

.job li::marker {
  color: var(--accent);
}

.edu-grid {
  grid-template-columns: 1.4fr 0.8fr;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 220px;
}

.card h3 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.school {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.school a {
  color: inherit;
  text-underline-offset: 3px;
}

.school a:hover {
  color: var(--accent);
}

.status-line {
  margin: 14px 0 0;
  color: var(--muted);
}

.lang-lines {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.lang-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
}

.lang-lines b {
  font-weight: 500;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.contact-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(228, 245, 106, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.02);
}

.contact-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 8px;
}

.email {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.4vw, 3.3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1px solid rgba(228, 245, 106, 0.45);
}

.email:hover {
  color: var(--accent);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.footer {
  padding-bottom: 28px;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  align-items: center;
  padding: 22px 0 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

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

.footer-links a,
.to-top {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.to-top:hover {
  color: var(--accent);
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

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

.page-404 {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.lost h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 12px;
}

.lost p {
  color: var(--muted);
  margin: 0 0 22px;
}

@media (max-width: 1080px) {
  .nav-links {
    position: fixed;
    z-index: 2;
    top: calc(var(--nav-h) + 10px);
    left: 12px;
    right: 12px;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: stretch;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    background: #16181e;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }

  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 14px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 40;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-cta {
    display: none;
  }

  .nav {
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 0 16px;
  }
}

@media (max-width: 880px) {
  .wrap {
    width: min(1120px, calc(100% - 32px));
  }

  .hero-grid,
  .about-grid,
  .svc-layout,
  .edu-grid,
  .timeline > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .when {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

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

  .svc-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .role {
    white-space: normal;
  }

  .role-wrap,
  .role-wrap::after {
    animation: none;
  }

  .role-wrap {
    display: block;
    clip-path: none;
  }

  .role-wrap::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .process-grid,
  .svc-tabs {
    grid-template-columns: 1fr;
  }

  .flow {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 14px 16px 36px;
    min-height: 0;
  }

  .flow-track {
    left: 18px;
    right: auto;
    top: 16px;
    bottom: 16px;
    width: 2px;
    height: auto;
  }

  .flow-track::after {
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    transform: scaleY(0);
    transform-origin: top center;
    animation-name: draw-line-y;
  }

  .flow-node {
    text-align: left;
    padding-left: 14px;
  }

  .packet {
    left: 13px;
    animation-name: travel-y;
  }

  .w-cards i { height: 52px; }

  .name {
    font-size: clamp(3.3rem, 16vw, 4.6rem);
  }

  .hero-actions .btn,
  .contact-links .btn {
    width: 100%;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .scroll-hint {
    display: none;
  }
}

@media (max-width: 380px) {
  .logo-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@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 .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .role {
    white-space: normal;
  }

  .role-wrap {
    animation: none !important;
    clip-path: none !important;
    display: block;
  }

  .role-wrap::after,
  .scroll-hint span {
    display: none !important;
  }

  .marquee-track {
    animation: none !important;
    transform: none !important;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    row-gap: 10px;
    padding-inline: 12px;
  }

  .marquee-seq + .marquee-seq {
    display: none;
  }

  .node:hover,
  .chips li:hover,
  .btn:hover,
  .svc-tab:hover {
    transform: none;
  }

  .viz,
  .viz * {
    animation: none !important;
  }

  .packet { display: none; }
}

@media print {
  .nav,
  .hero-bg,
  .band,
  .scroll-hint,
  body::before {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .svc-panel {
    opacity: 1 !important;
    visibility: visible !important;
    position: static;
    grid-area: auto;
    break-inside: avoid;
    margin-bottom: 16px;
  }

  a {
    text-decoration: underline;
  }
}
