/* =========================================================================
   Ahmed Askar — Portfolio
   Plain CSS, no build step. Sections:
   01 Fonts & tokens   02 Base   03 Utilities & components   04 Effects
   05 Nav              06 Hero   07 Sections                 08 Pages
   09 Overlays         10 Motion preferences & responsive
   ========================================================================= */

/* ---------- 01 Fonts & tokens ---------- */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Sora';
  src: url('/assets/fonts/sora.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #111113;
  --surface: #18181b;
  --surface-2: #1d1d21;
  --surface-3: #26262b;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.14);
  --text: #ededea;
  --text-2: #b5b5b0;
  --muted: #8a8a85;

  --accent: #d4561c;
  --accent-strong: #b8481a;
  --accent-text: #e2703c;
  --live: #34d399;
  --danger: #fb7185;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  --nav-h: 76px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
html.has-smooth-scroll {
  scroll-behavior: auto;
}
html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

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

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: rgb(212 86 28 / 0.35);
  color: #fff;
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #3a3a40;
  border-radius: 10px;
  border: 2px solid var(--bg);
}

.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;
}

main {
  overflow-x: clip; /* decorative glows and the tilted ribbon never cause sideways scroll */
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus {
  transform: none;
}

/* ---------- 03 Utilities & components ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.icon--xs {
  width: 14px;
  height: 14px;
}
.icon--sm {
  width: 16px;
  height: 16px;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.dot--live {
  background: var(--live);
}
.dot--live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: ping 1.8s var(--ease-out) infinite;
}

@keyframes ping {
  70%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.dots {
  display: inline-flex;
  gap: 7px;
}
.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.dots i:nth-child(2) {
  background: #febc2e;
}
.dots i:nth-child(3) {
  background: #28c840;
}

/* Buttons */
.btn {
  --bh: 54px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--bh);
  padding: 0 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition:
    box-shadow 0.4s var(--ease-out),
    background-color 0.3s,
    border-color 0.3s,
    color 0.3s,
    translate 0.6s var(--ease-out);
}
.btn .icon {
  transition: transform 0.45s var(--ease-out);
}
.btn:hover .icon {
  transform: translateX(4px);
}

.btn--primary {
  color: #fff;
  background: var(--accent-strong);
}
.btn--primary:hover {
  background: #a33f16;
}

.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.03);
}
.btn--ghost:hover {
  border-color: rgb(255 255 255 / 0.3);
  background: rgb(255 255 255 / 0.06);
}

.btn--glass {
  color: var(--text);
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.04);
  backdrop-filter: blur(10px);
}
.btn--glass:hover {
  border-color: rgb(52 211 153 / 0.5);
  background: rgb(52 211 153 / 0.08);
}

.btn--sm {
  --bh: 42px;
  padding: 0 18px;
  font-size: 14px;
}
.btn--block {
  width: 100%;
}

/* Chips & socials */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  transition:
    border-color 0.3s,
    box-shadow 0.4s var(--ease-out),
    background-color 0.3s,
    translate 0.6s var(--ease-out);
}
.chip:hover {
  border-color: var(--accent);
}
.chip .icon {
  opacity: 0.6;
  transition:
    transform 0.4s var(--ease-out),
    opacity 0.3s;
}
.chip:hover .icon {
  opacity: 1;
  transform: translate(2px, -2px);
}

.socials {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.03);
  color: var(--text-2);
  transition:
    color 0.3s,
    border-color 0.3s,
    background-color 0.3s,
    box-shadow 0.4s,
    translate 0.6s var(--ease-out);
}
.social .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--ease-spring);
}
.social:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgb(212 86 28 / 0.12);
}
.social:hover .icon {
  transform: scale(1.15) rotate(-6deg);
}
.socials--lg .social {
  width: 54px;
  height: 54px;
}
.socials--lg .social .icon {
  width: 22px;
  height: 22px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgb(52 211 153 / 0.35);
  background: rgb(52 211 153 / 0.08);
  color: #6ee7b7;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-live .dot {
  width: 6px;
  height: 6px;
}

/* ---------- 04 Effects ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  pointer-events: none;
}

/* Custom cursor (fine pointers only) */
.cursor {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  html.js .cursor {
    display: block;
  }
}
.cursor__ring,
.cursor__dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 95;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
}
.cursor__ring {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.32);
  transition:
    width 0.45s var(--ease-out),
    height 0.45s var(--ease-out),
    margin 0.45s var(--ease-out),
    background-color 0.35s,
    border-color 0.35s,
    opacity 0.3s,
    scale 0.25s var(--ease-out);
}
.cursor__dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--text);
  transition:
    opacity 0.3s,
    scale 0.3s var(--ease-out);
}
.cursor.is-visible .cursor__ring,
.cursor.is-visible .cursor__dot {
  opacity: 1;
}
.cursor.is-hover .cursor__ring {
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.5);
}
.cursor.is-hover .cursor__dot {
  scale: 0;
}
.cursor.has-label .cursor__ring {
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  background: var(--accent-strong);
  border-color: transparent;
}
.cursor__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s;
}
.cursor.has-label .cursor__label {
  opacity: 1;
}
.cursor.is-down .cursor__ring {
  scale: 0.85;
}
.cursor.is-text .cursor__ring {
  width: 4px;
  height: 30px;
  margin: -15px 0 0 -2px;
  border-radius: 4px;
  background: var(--accent-text);
  border-color: transparent;
}
.cursor.is-text .cursor__dot {
  scale: 0;
}

/* Preloader (first visit per session; CSS failsafe hides it after 5s) */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: var(--bg);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-in-out);
  animation: preloader-failsafe 0.8s 5s var(--ease-in-out) forwards;
}
html:not(.js) .preloader,
html.no-intro .preloader {
  display: none;
}
.preloader.is-done {
  clip-path: inset(0 0 100% 0);
}
.preloader__inner {
  width: min(560px, 86vw);
}
.preloader__name {
  display: flex;
  gap: 0.3em;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  overflow: hidden;
  padding-bottom: 0.1em;
}
.preloader__word {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s var(--ease-out) 0.1s forwards;
}
.preloader__word + .preloader__word {
  animation-delay: 0.22s;
}
.preloader__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: fade-in 0.8s 0.5s forwards;
}
.preloader__count {
  font-family: var(--font-mono);
  color: var(--text);
}
.preloader__bar {
  height: 2px;
  margin-top: 14px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.preloader__bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--load, 0));
  transition: transform 0.2s linear;
}

@keyframes preloader-failsafe {
  to {
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
  }
}
@keyframes rise {
  to {
    transform: none;
  }
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}

/* Scroll reveal — only hidden when JS is running (html.js) */
html.js [data-reveal] {
  opacity: 0;
  transition:
    opacity 0.9s var(--ease-out),
    translate 1.1s var(--ease-out),
    scale 1.1s var(--ease-out),
    filter 1s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
html.js [data-reveal='up'] {
  translate: 0 42px;
}
html.js [data-reveal='left'] {
  translate: -48px 0;
}
html.js [data-reveal='right'] {
  translate: 48px 0;
}
html.js [data-reveal='scale'] {
  scale: 0.9;
  filter: blur(10px);
}
html.js [data-reveal='fade'] {
  filter: blur(6px);
}
html.js [data-reveal].is-in {
  opacity: 1;
  translate: none;
  scale: none;
  filter: none;
}

/* Split headings (words wrapped by JS) */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.1em 0.12em;
  margin: 0 -0.1em -0.12em;
}
.w__i {
  display: inline-block;
  transform: translateY(115%) rotate(6deg);
  transform-origin: 0 100%;
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 70ms + var(--delay, 0ms));
}
.is-in > .w .w__i,
.is-in .w .w__i {
  transform: none;
}

/* ---------- 05 Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition:
    transform 0.6s var(--ease-out),
    background-color 0.4s,
    border-color 0.4s,
    backdrop-filter 0.4s;
  view-transition-name: site-nav;
}
.nav.is-scrolled {
  background: rgb(17 17 19 / 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.nav.is-hidden {
  transform: translateY(-105%);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.nav__links {
  position: relative;
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.025);
}
.nav__links a {
  position: relative;
  z-index: 1;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.3s;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
}
.nav__pill {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  width: var(--pill-w, 0);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.07);
  border: 1px solid var(--line-2);
  transform: translateX(var(--pill-x, 0));
  opacity: 0;
  transition:
    transform 0.55s var(--ease-out),
    width 0.55s var(--ease-out),
    opacity 0.35s;
}
.nav__pill.is-visible {
  opacity: 1;
}

.nav__toggle {
  display: none;
  position: relative;
  z-index: 60;
  width: 46px;
  height: 46px;
  margin-left: auto;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.04);
}
.nav__toggle span {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition:
    transform 0.5s var(--ease-out),
    top 0.5s var(--ease-out);
}
.nav__toggle span:first-child {
  top: 18px;
}
.nav__toggle span:last-child {
  top: 26px;
}
.nav__toggle[aria-expanded='true'] span:first-child {
  top: 22px;
  transform: rotate(45deg);
}
.nav__toggle[aria-expanded='true'] span:last-child {
  top: 22px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 32px) var(--gutter) 40px;
  background: rgb(17 17 19 / 0.98);
  clip-path: circle(0 at calc(100% - var(--gutter) - 23px) calc(var(--nav-h) / 2));
  visibility: hidden;
  transition:
    clip-path 0.8s var(--ease-in-out),
    visibility 0s 0.8s;
}
.mobile-menu.is-open {
  clip-path: circle(150% at calc(100% - var(--gutter) - 23px) calc(var(--nav-h) / 2));
  visibility: visible;
  transition:
    clip-path 0.8s var(--ease-in-out),
    visibility 0s;
}
.mobile-menu__links {
  display: flex;
  flex-direction: column;
}
.mobile-menu__links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  opacity: 0;
  translate: 0 30px;
  transition:
    opacity 0.5s,
    translate 0.7s var(--ease-out),
    color 0.3s;
}
.mobile-menu__links a span {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--accent-text);
  letter-spacing: 0;
}
.mobile-menu__links a:hover {
  color: var(--accent-text);
}
.mobile-menu.is-open .mobile-menu__links a {
  opacity: 1;
  translate: none;
  transition-delay: calc(0.25s + var(--i, 0) * 60ms);
}
.mobile-menu__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-2);
  opacity: 0;
  transition: opacity 0.5s 0.6s;
}
.mobile-menu.is-open .mobile-menu__foot {
  opacity: 1;
}

/* ---------- 06 Hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 48px) 0 110px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
}
.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.hero__title {
  margin-top: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero__hello {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text-2);
  margin-bottom: 10px;
}
.hero__name {
  display: block;
  font-size: clamp(3.4rem, 8.6vw, 7.4rem);
}

.hero__lead {
  max-width: 560px;
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-2);
}
.hero__lead strong {
  color: var(--text);
  font-weight: 600;
}

.rotator {
  display: inline-grid;
  vertical-align: top;
  overflow: hidden;
  height: 1.65em;
}
.rotator__word {
  grid-area: 1 / 1;
  white-space: nowrap;
  font-weight: 600;
  color: var(--accent-text);
  transform: translateY(105%);
  opacity: 0;
  transition:
    transform 0.8s var(--ease-out),
    opacity 0.5s;
}
.rotator__word.is-active {
  transform: none;
  opacity: 1;
}
.rotator__word.is-leaving {
  transform: translateY(-105%);
  opacity: 0;
}

.hero__products {
  margin-top: 34px;
}
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}
.hero__actions .socials {
  margin-left: 8px;
}

.hero__visual {
  position: relative;
}
.portrait {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  transform-style: preserve-3d;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.7s var(--ease-out);
}
.portrait__frame {
  position: relative;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.8);
}
.portrait__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  border: 1px solid var(--line-2);
  pointer-events: none;
}
.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  scale: 1.04;
  transition: scale 1.4s var(--ease-out);
}
.portrait:hover .portrait__frame img {
  scale: 1.1;
}
.portrait__glare {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 0%), rgb(255 255 255 / 0.22), transparent 55%);
  mix-blend-mode: soft-light;
  opacity: var(--glare, 0);
  transition: opacity 0.5s;
}

.portrait__badges {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}
.float-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgb(24 24 27 / 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / 0.8);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: auto;
  animation: float 6s ease-in-out infinite;
  transition:
    border-color 0.3s,
    scale 0.45s var(--ease-out);
}
.float-badge .icon {
  color: var(--accent-text);
  opacity: 0.55;
  transition:
    opacity 0.3s,
    transform 0.4s var(--ease-out);
}
.float-badge:hover,
.float-badge:focus-visible {
  z-index: 4;
  border-color: var(--accent);
  scale: 1.06;
  animation-play-state: paused;
}
.float-badge:hover .icon,
.float-badge:focus-visible .icon {
  opacity: 1;
  transform: translate(2px, -2px);
}
.float-badge--1 {
  top: 4%;
  left: -14%;
  transform: translateZ(70px);
}
.float-badge--2 {
  top: 17%;
  right: -12%;
  transform: translateZ(50px);
  animation-delay: -1s;
}
.float-badge--3 {
  top: 39%;
  left: -18%;
  transform: translateZ(80px);
  animation-delay: -2s;
}
.float-badge--4 {
  top: 54%;
  right: -15%;
  transform: translateZ(60px);
  animation-delay: -3s;
}
.float-badge--5 {
  bottom: 15%;
  left: -9%;
  transform: translateZ(55px);
  animation-delay: -4s;
}
.float-badge--6 {
  bottom: 2%;
  right: -6%;
  transform: translateZ(75px);
  animation-delay: -5s;
}
@keyframes float {
  50% {
    translate: 0 -12px;
  }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.scroll-cue:hover {
  color: var(--text);
}
.scroll-cue__mouse {
  position: relative;
  width: 24px;
  height: 38px;
  border-radius: 14px;
  border: 1.5px solid currentColor;
}
.scroll-cue__mouse span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--accent);
  animation: wheel 1.8s var(--ease-out) infinite;
}
@keyframes wheel {
  0% {
    transform: none;
    opacity: 1;
  }
  80%,
  100% {
    transform: translateY(12px);
    opacity: 0;
  }
}

/* Ribbon */
.ribbon {
  position: relative;
  z-index: 2;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  background: var(--surface);
  transform: rotate(-1.6deg) scale(1.04);
}
.ribbon .marquee__track {
  --gap: 34px;
  align-items: center;
}
.ribbon__item {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.ribbon__sep {
  color: var(--accent);
  font-size: 1.3rem;
}

/* ---------- 07 Sections ---------- */
.section {
  position: relative;
  padding-block: clamp(80px, 9vw, 128px);
}
.section-head {
  max-width: 820px;
  margin-bottom: clamp(44px, 6vw, 72px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center .kicker {
  justify-content: center;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
}
.kicker__index {
  font-family: var(--font-mono);
  color: var(--accent-text);
  letter-spacing: 0;
}
.kicker__line {
  width: 48px;
  height: 1px;
  background: var(--accent);
  transform-origin: 0 50%;
  transition: transform 1.2s var(--ease-out) 0.2s;
}
html.js .kicker:not(.is-in) .kicker__line {
  transform: scaleX(0);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.section-sub {
  margin-top: 22px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-2);
}
.section-head--center .section-sub {
  max-width: 640px;
  margin-inline: auto;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.about__text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--text);
}
.about__text .sw {
  opacity: 0.2;
  transition: opacity 0.35s;
}
.about__text .sw.is-lit {
  opacity: 1;
}

.recognition {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.7s var(--ease-out);
}
.recognition__head {
  display: flex;
  justify-content: space-between;
  margin: 2px 4px 14px;
}
.recognition__head .label {
  color: var(--accent-text);
}
.recognition__plate {
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.6);
}
.recognition__plate img {
  width: 100%;
  height: auto;
  transition: scale 1.2s var(--ease-out);
}
.recognition:hover .recognition__plate img {
  scale: 1.05;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(56px, 8vw, 96px);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 14px;
  color: var(--text-2);
}

/* Marquee */
.marquee {
  --gap: 20px;
  display: flex;
  overflow: hidden;
  user-select: none;
}
.marquee__track {
  display: flex;
  flex-shrink: 0;
  gap: var(--gap);
  padding-right: var(--gap);
  min-width: max-content;
  animation: marquee var(--duration, 40s) linear infinite;
  will-change: transform;
}
.marquee--reverse .marquee__track {
  animation-direction: reverse;
}
.marquee--fade {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.reviews .marquee:hover .marquee__track,
.skills .marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
  animation-play-state: paused;
}
@keyframes marquee {
  to {
    transform: translate3d(var(--shift, -50%), 0, 0);
  }
}

/* Reviews */
.reviews__rows {
  display: grid;
  gap: 22px;
}
.reviews__rows .marquee__track {
  padding-block: 14px;
}
.review {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 400px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition:
    transform 0.6s var(--ease-out),
    border-color 0.4s,
    box-shadow 0.5s var(--ease-out);
}
.review:hover,
.review:focus-visible {
  transform: translateY(-8px);
  border-color: rgb(255 255 255 / 0.22);
}
.review__top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgb(212 86 28 / 0.16);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-text);
}
.review__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.review__name {
  font-weight: 600;
  font-size: 15px;
}
.review__place {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.review__stars {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
  color: var(--accent-text);
}
.review__stars .icon {
  width: 15px;
  height: 15px;
}
.review__quote {
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  min-height: calc(1.65em * 4);
}
.review__quote::before {
  content: '“';
  font-family: var(--font-display);
  font-size: 1.6em;
  line-height: 0;
  vertical-align: -0.35em;
  margin-right: 2px;
  color: var(--accent-text);
}
.review__shot {
  width: 100%;
  height: 104px;
  padding: 4px 6px;
  object-fit: contain;
  object-position: left center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1c1c1c;
}
.review__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.review__project {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.review__price {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
}
.review__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 58px;
  overflow: hidden;
}
.review__tags li {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-2);
}

/* Experience */
.experience__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.terminal {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: 0 30px 60px -40px rgb(0 0 0 / 0.8);
  overflow: hidden;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.02);
}
.terminal__title {
  flex: 1;
  text-align: center;
  margin-right: 47px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.terminal__body {
  min-height: 330px;
  padding: 24px 24px 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
}
.t-line {
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.t-line[data-cmd]::before {
  content: '❯ ';
  color: var(--live);
}
.t-line[data-cmd] {
  color: var(--text);
}
.t-out {
  color: var(--muted);
  margin-bottom: 8px;
}
.t-dir {
  color: var(--accent-text);
}
.t-ok {
  color: var(--live);
}
.t-caret {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--text-2);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
  padding-left: 44px;
}
.timeline__track {
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.timeline__progress {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 50% 0;
  transform: scaleY(var(--p, 0));
}
.timeline__item {
  position: relative;
}
.timeline__dot {
  position: absolute;
  left: -40px;
  top: 30px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--bg);
  transition:
    border-color 0.5s,
    background-color 0.5s,
    box-shadow 0.5s,
    scale 0.6s var(--ease-spring);
}
.timeline__item.is-active .timeline__dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px rgb(212 86 28 / 0.18);
  scale: 1.15;
}
.xp {
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    transform 0.7s var(--ease-out),
    border-color 0.4s;
}
.timeline__item.is-active .xp {
  border-color: rgb(212 86 28 / 0.35);
}
.xp__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.xp__date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-text);
}
.xp__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-3);
  color: var(--text-2);
  transition: transform 0.6s var(--ease-spring);
}
.xp:hover .xp__icon {
  transform: rotate(-12deg) scale(1.1);
}
.xp__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.xp__company {
  margin-top: 4px;
  color: var(--text-2);
}
.xp__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-text);
  transition: gap 0.4s var(--ease-out);
}
.xp__link:hover {
  gap: 10px;
}

/* Skills */
.skills__rows {
  display: grid;
  gap: 18px;
}
.skills .marquee {
  --gap: 14px;
}
.skills .marquee__track {
  padding-block: 10px;
}
.skill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.4s,
    background-color 0.4s,
    box-shadow 0.5s;
}
.skill img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transition: transform 0.6s var(--ease-spring);
}
.skill img.invert {
  filter: invert(1) hue-rotate(180deg);
}
.skill:hover {
  transform: translateY(-6px);
  border-color: rgb(255 255 255 / 0.22);
  background-color: var(--surface-2);
}
.skill:hover img {
  transform: scale(1.18) rotate(-8deg);
}

/* Projects */
.stack {
  display: grid;
  gap: 32px;
}
.project {
  --top: calc(var(--nav-h) + 24px + var(--i, 0) * 22px);
}
.project__card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow:
    0 -12px 40px -20px rgb(0 0 0 / 0.9),
    0 40px 80px -40px rgb(0 0 0 / 0.9);
  overflow: hidden;
  transform-origin: 50% 0;
  transform: scale(var(--s, 1));
  will-change: transform;
}
.project__shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #0b0b0c;
  opacity: var(--dim, 0);
  pointer-events: none;
}
.project__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.02);
}
.project__file {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.project__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 26px clamp(20px, 3vw, 36px) 6px;
}
.project__index {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgb(255 255 255 / 0.3);
}
.project__name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.project__role {
  margin-top: 4px;
  font-size: 14px;
  color: var(--accent-text);
}
.project__title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.project__logo {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
}
.project__titles {
  min-width: 0;
}
.code {
  padding: 18px clamp(20px, 3vw, 36px) 30px;
  font-family: var(--font-mono);
  font-size: clamp(12.5px, 1.1vw, 14px);
  line-height: 1.85;
  color: var(--text-2);
}
.code__line {
  white-space: pre-wrap;
  word-break: break-word;
}
.code__line--in {
  padding-left: 2.2em;
  text-indent: -1.1em;
  margin-left: 1.1em;
}
html.js .code__line {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition:
    clip-path 0.9s var(--ease-out),
    opacity 0.4s;
  transition-delay: var(--ld, 0ms);
}
html.js .code.is-typed .code__line {
  opacity: 1;
  clip-path: inset(0 -1em 0 0);
}
.code.is-typed .code__line:last-child::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 6px;
  vertical-align: -0.2em;
  background: var(--text-2);
  animation: blink 1s steps(1) infinite;
}
.tok-c {
  color: #7f8c7c;
}
.tok-k {
  color: var(--accent-text);
}
.tok-v {
  color: var(--text);
}
.tok-p {
  color: #7a7a74;
}
.tok-prop {
  color: var(--text);
}
.tok-s {
  color: #a9c18c;
}
.tok-r {
  color: #d8a66e;
}
.tok-d {
  color: #b3c2cf;
}
.tok-link {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: rgb(226 112 60 / 0.4);
  text-underline-offset: 3px;
  transition:
    color 0.3s,
    text-decoration-color 0.3s;
}
.tok-link:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.form__intro {
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 15px;
}
.field {
  position: relative;
}
.field input,
.field textarea {
  width: 100%;
  padding: 26px 18px 10px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.025);
  outline: none;
  font-size: 15.5px;
  transition:
    border-color 0.3s,
    background-color 0.3s,
    box-shadow 0.4s;
}
.field textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}
.field label {
  position: absolute;
  left: 19px;
  top: 18px;
  font-size: 15.5px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: 0 0;
  transition:
    transform 0.4s var(--ease-out),
    color 0.3s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-11px) scale(0.76);
  color: var(--accent-text);
}
.field input:hover,
.field textarea:hover {
  border-color: rgb(255 255 255 / 0.2);
}
.field input:focus,
.field textarea:focus {
  border-color: rgb(212 86 28 / 0.7);
  box-shadow: 0 0 0 3px rgb(212 86 28 / 0.15);
}
.field__line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-out);
}
.field textarea ~ .field__line {
  bottom: 6px;
}
.field input:focus ~ .field__line,
.field textarea:focus ~ .field__line {
  transform: scaleX(1);
}
.field__error {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-size: 13px;
  color: var(--danger);
  transition:
    max-height 0.4s var(--ease-out),
    margin 0.4s;
}
.field.is-invalid .field__error {
  max-height: 40px;
  margin-top: 6px;
}
.field.is-invalid input,
.field.is-invalid textarea {
  border-color: rgb(251 113 133 / 0.6);
  animation: shake 0.45s var(--ease-out);
}
.field__count {
  position: absolute;
  right: 14px;
  top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
@keyframes shake {
  20%,
  60% {
    translate: -6px 0;
  }
  40%,
  80% {
    translate: 6px 0;
  }
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn--submit {
  margin-top: 6px;
}
.btn__spinner,
.btn__check {
  position: absolute;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.5s var(--ease-spring);
}
.btn__spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.3);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.btn__check {
  width: 24px;
  height: 24px;
  transform: scale(0.4);
}
.btn__label,
.btn__icon {
  transition:
    opacity 0.3s,
    transform 0.45s var(--ease-out);
}
.btn--submit.is-loading .btn__label,
.btn--submit.is-loading .btn__icon,
.btn--submit.is-success .btn__label,
.btn--submit.is-success .btn__icon {
  opacity: 0;
  transform: translateY(-14px);
}
.btn--submit.is-loading .btn__spinner {
  opacity: 1;
}
.btn--submit.is-success {
  background: #15803d;
}
.btn--submit.is-success .btn__check {
  opacity: 1;
  transform: none;
}
.btn--submit:disabled {
  cursor: progress;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form__status {
  min-height: 1.4em;
  font-size: 14px;
  text-align: center;
  color: var(--text-2);
}
.form__status a {
  color: var(--accent-text);
  text-decoration: underline;
}

.contact__info {
  display: grid;
  gap: 14px;
}
.info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transition:
    border-color 0.4s,
    transform 0.5s var(--ease-out);
}
.info:hover {
  border-color: rgb(255 255 255 / 0.2);
  transform: translateX(6px);
}
.info__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 15px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--accent-text);
  transition: transform 0.6s var(--ease-spring);
}
.info:hover .info__icon {
  transform: rotate(-10deg) scale(1.08);
}
.info__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.info__label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.info__value {
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
  transition: color 0.3s;
}
a.info__value:hover {
  color: var(--accent-text);
}
.info__copy {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text-2);
  transition:
    color 0.3s,
    border-color 0.3s,
    background-color 0.3s;
}
.info__copy:hover {
  color: #fff;
  border-color: var(--line-2);
  background: rgb(255 255 255 / 0.05);
}
.info__copy::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  translate: -50% 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--live);
  color: #052e1f;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    translate 0.4s var(--ease-out);
}
.info__copy.is-copied::after {
  opacity: 1;
  translate: -50% 0;
}
.contact__socials {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
}

/* Footer */
.footer {
  position: relative;
  padding: 40px 0 34px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.footer__big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12.5vw, 11.5rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.95;
  text-align: center;
  white-space: nowrap;
  color: #2e2e33;
  user-select: none;
  padding-bottom: 0.08em;
}
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.footer__bottom a {
  color: var(--text-2);
  transition: color 0.3s;
}
.footer__bottom a:hover {
  color: var(--accent-text);
}
.footer__bottom p a {
  color: var(--accent-text);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.to-top {
  position: fixed;
  right: clamp(16px, 2.5vw, 30px);
  bottom: clamp(16px, 2.5vw, 30px);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgb(24 24 27 / 0.88);
  backdrop-filter: blur(12px);
  color: var(--text);
  opacity: 0;
  scale: 0.6;
  pointer-events: none;
  transition:
    opacity 0.4s,
    scale 0.5s var(--ease-spring),
    border-color 0.3s,
    translate 0.6s var(--ease-out);
}
.to-top.is-visible {
  opacity: 1;
  scale: 1;
  pointer-events: auto;
}
.to-top:hover {
  border-color: rgb(255 255 255 / 0.3);
}
.to-top .icon {
  transition: transform 0.5s var(--ease-out);
}
.to-top:hover .icon {
  transform: translateY(-4px);
}
.to-top__ring {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  max-width: none;
  rotate: -90deg;
}
.to-top__ring circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 138.2;
  stroke-dashoffset: calc(138.2 * (1 - var(--progress, 0)));
}

/* ---------- 08 Pages (Courses / Streaming / 404) ---------- */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + clamp(60px, 9vw, 110px)) 0 clamp(80px, 10vw, 130px);
  overflow: hidden;
}
.soon {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}
.badge-soon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgb(212 86 28 / 0.4);
  background: rgb(212 86 28 / 0.08);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  overflow: hidden;
}
.soon__title {
  margin-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 8.4vw, 6.4rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}
.soon__title > span {
  display: block;
}
.soon__lead {
  max-width: 620px;
  margin: 26px auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-2);
}

.tabs {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 48px;
  padding: 5px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.025);
}
.tab {
  position: relative;
  z-index: 1;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s;
}
.tab:hover {
  color: var(--text-2);
}
.tab[aria-selected='true'] {
  color: var(--text);
}
.tabs__pill {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--tw, 0);
  height: var(--th, 0);
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.08);
  transform: translate(var(--tx, 0), var(--ty, 0));
  transition:
    transform 0.55s var(--ease-out),
    width 0.55s var(--ease-out),
    height 0.55s var(--ease-out);
}

.soon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
  text-align: left;
}
.soon-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    transform 0.7s var(--ease-out),
    opacity 0.45s,
    scale 0.45s var(--ease-out),
    border-color 0.4s;
}
.soon-card.is-filtered {
  opacity: 0;
  scale: 0.94;
}
.soon-card[hidden] {
  display: none;
}
.soon-card:hover {
  border-color: rgb(255 255 255 / 0.2);
}
.soon-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.soon-card__num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
}
.soon-card__lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.soon-card__tag {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.soon-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.soon-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 14px;
  color: var(--text-2);
}
.soon-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
  text-align: center;
  color: var(--muted);
}
.soon-empty[hidden] {
  display: none;
}
.soon__divider {
  height: 1px;
  margin: 56px 0 28px;
  background: var(--line-2);
}
.soon__note {
  color: var(--muted);
  font-size: 15px;
}
.soon__note a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: rgb(226 112 60 / 0.4);
  text-underline-offset: 3px;
}

.notfound {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px var(--gutter);
  position: relative;
  overflow: hidden;
}
.notfound__code {
  font-family: var(--font-display);
  font-size: clamp(7rem, 26vw, 15rem);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.9;
  color: var(--accent);
}
.notfound__title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.notfound p {
  margin: 10px auto 30px;
  color: var(--text-2);
  max-width: 420px;
}

/* ---------- 09 Overlays ---------- */
.modal {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.modal::backdrop {
  background: rgb(0 0 0 / 0);
  backdrop-filter: blur(0);
  transition:
    background-color 0.4s,
    backdrop-filter 0.4s;
}
.modal.is-open::backdrop {
  background: rgb(0 0 0 / 0.7);
  backdrop-filter: blur(10px);
}
.modal__panel {
  position: relative;
  max-height: calc(100svh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: 0 60px 120px -40px rgb(0 0 0 / 0.9);
  opacity: 0;
  translate: 0 30px;
  scale: 0.95;
  transition:
    opacity 0.4s,
    translate 0.6s var(--ease-out),
    scale 0.6s var(--ease-out);
}
.modal.is-open .modal__panel {
  opacity: 1;
  translate: none;
  scale: none;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.04);
  transition:
    transform 0.5s var(--ease-spring),
    background-color 0.3s;
}
.modal__close:hover {
  transform: rotate(90deg);
  background: rgb(255 255 255 / 0.1);
}
.modal__content .review {
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: default;
  box-shadow: none;
  transform: none;
}
.modal__content .review__top {
  padding-right: 48px;
}
.modal__content .review__quote {
  display: block;
  min-height: 0;
  font-size: 17px;
  color: var(--text);
}
.modal__content .review__project {
  white-space: normal;
}
.modal__content .review__tags {
  max-height: none;
}
.modal__shot {
  margin-top: 24px;
}
.modal__shot figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal__shot img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #1c1c1c;
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  translate: -50% 0;
  pointer-events: none;
}
.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: rgb(24 24 27 / 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px -20px rgb(0 0 0 / 0.8);
  font-size: 14.5px;
  overflow: hidden;
  pointer-events: auto;
  animation: toast-in 0.6s var(--ease-spring);
}
.toast.is-leaving {
  animation: toast-out 0.4s var(--ease-in-out) forwards;
}
.toast__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgb(52 211 153 / 0.15);
  color: var(--live);
}
.toast--error .toast__icon {
  background: rgb(251 113 133 / 0.15);
  color: var(--danger);
}
.toast__icon .icon {
  width: 15px;
  height: 15px;
}
.toast__msg a {
  color: var(--accent-text);
  text-decoration: underline;
}
.toast::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--live);
  transform-origin: 0 50%;
  animation: toast-timer 5s linear forwards;
}
.toast--error::after {
  background: var(--danger);
}
@keyframes toast-in {
  from {
    opacity: 0;
    translate: 0 30px;
    scale: 0.9;
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    translate: 0 20px;
    scale: 0.95;
  }
}
@keyframes toast-timer {
  to {
    transform: scaleX(0);
  }
}

/* Cross-page transitions (View Transitions API, progressive enhancement) */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: vt-out 0.35s var(--ease-in-out) both;
}
::view-transition-new(root) {
  animation: vt-in 0.6s var(--ease-out) both;
}
@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-14px);
    filter: blur(6px);
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
}

/* ---------- 10 Motion preferences & responsive ---------- */
@media (min-width: 981px) and (min-height: 720px) {
  .stack {
    gap: 14vh;
    padding-bottom: 4vh;
  }
  .project {
    position: sticky;
    top: var(--top);
  }
}

@media (max-width: 1180px) {
  .nav__links a {
    padding: 8px 11px;
  }
}

@media (max-width: 1320px) {
  .float-badge--1,
  .float-badge--3,
  .float-badge--5 {
    left: -8%;
  }
  .float-badge--2,
  .float-badge--4,
  .float-badge--6 {
    right: -2%;
  }
}

@media (max-width: 980px) {
  :root {
    --nav-h: 68px;
  }
  .nav__links,
  .nav__cta {
    display: none;
  }
  .nav__toggle {
    display: block;
  }
  .hero {
    padding-top: calc(var(--nav-h) + 32px);
  }
  .hero__inner,
  .about__grid,
  .experience__grid,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__visual {
    order: -1;
  }
  .portrait {
    width: min(340px, 80vw);
    aspect-ratio: auto;
  }
  .portrait__frame {
    height: auto;
    aspect-ratio: 1;
  }
  .portrait__badges {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: min(620px, calc(100vw - 2 * var(--gutter)));
    margin: 20px 0 0 50%;
    translate: -50% 0;
  }
  .float-badge {
    position: static;
    transform: none;
    animation: none;
    padding: 8px 12px 8px 13px;
    font-size: 12.5px;
  }
  .terminal {
    position: relative;
    top: 0;
  }
  .recognition {
    max-width: 460px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scroll-cue {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero__actions .socials {
    margin-left: 0;
    width: 100%;
  }
  .review {
    width: 300px;
    padding: 22px;
  }
  .review__stars .icon {
    width: 12px;
    height: 12px;
  }
  .project__head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .project__head .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .project__bar .badge-live {
    display: none;
  }
  .stat {
    padding: 22px 18px;
  }
  .soon-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer__links {
    justify-content: center;
  }
  .terminal__body {
    min-height: 0;
    font-size: 12.5px;
    padding: 20px 18px;
  }
}

@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;
    transition-delay: 0ms !important;
  }
  .marquee {
    overflow-x: auto;
  }
  .marquee__track {
    animation: none !important;
  }
  html.js [data-reveal],
  html.js .code__line {
    opacity: 1;
    translate: none;
    scale: none;
    filter: none;
    clip-path: none;
  }
  .w__i {
    transform: none;
  }
  .about__text .sw {
    opacity: 1;
  }
  .hero__canvas {
    display: none;
  }
}
