/* =========================================================================
   Muhammad Mujtahid — Portfolio
   Art direction: "Terminal Editorial"
   Near-black warm canvas · warm off-white · single acid-lime accent
   Space Grotesk (display) / Inter (body) / JetBrains Mono (labels)
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0c;
  --bg-2: #0e0e12;
  --surface: #131318;
  --surface-2: #17171d;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3f2ec;
  --dim: #9b9ba4;
  --faint: #5c5c66;

  --accent: #c6f135;          /* acid lime — fills */
  --accent-text: #cdf94e;     /* readable accent on dark */
  --on-accent: #0a0a0c;       /* text on accent fills */
  --accent-glow: rgba(198, 241, 53, 0.28);
  --warm: #ff6a3d;            /* used in tiny doses */

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --pill: 999px;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5rem, 12vh, 9rem);

  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
}

:root[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-2: #efece3;
  --surface: #ffffff;
  --surface-2: #faf8f2;
  --line: rgba(18, 18, 12, 0.1);
  --line-2: rgba(18, 18, 12, 0.16);
  --text: #17170f;
  --dim: #55554b;
  --faint: #97968b;

  --accent: #c6f135;
  --accent-text: #55760a;     /* darkened lime for text/links on paper */
  --on-accent: #17170f;
  --accent-glow: rgba(120, 160, 20, 0.22);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ---------- Grain overlay ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::after {
  opacity: 0.05;
  mix-blend-mode: multiply;
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--accent);
  z-index: 100;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
    background 0.25s, border-color 0.25s, opacity 0.3s;
}
.cursor-ring.is-hover {
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
}
body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring {
  opacity: 1;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide {
  max-width: 1440px;
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

/* section heading block */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 1.1rem;
}
.sec-note {
  font-size: 1rem;
  color: var(--dim);
  max-width: 34ch;
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 0.85rem;
  --pad-x: 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--pill);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s,
    border-color 0.3s;
  white-space: nowrap;
  will-change: transform;
}
.btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.35s var(--ease);
}
.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn--accent:hover {
  box-shadow: 0 10px 40px -6px var(--accent-glow);
}
.btn--accent:hover svg {
  transform: translateX(3px);
}
.btn--ghost {
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--text);
  background: var(--surface-2);
}
.btn--lg {
  --pad-y: 1.05rem;
  --pad-x: 1.9rem;
  font-size: 0.95rem;
}

/* animated underline link */
.ulink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-weight: 500;
}
.ulink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.ulink:hover {
  color: var(--accent-text);
}
.ulink:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* mono tag */
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--dim);
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: border-color 0.3s, color 0.3s;
}
.tag:hover {
  border-color: var(--line-2);
  color: var(--text);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  transition: background 0.4s var(--ease), border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(120%);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand__mark {
  transform: rotate(-8deg);
}
.nav__menu {
  display: none;
  align-items: center;
  gap: 2rem;
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--dim);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.3s;
}
.nav__link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}
.nav__link:hover::before,
.nav__link.is-active::before {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  color: var(--text);
  transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease);
}
.icon-btn:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
.nav__cta {
  display: none;
}

/* burger */
.burger {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  transition: border-color 0.3s, background 0.3s;
}
.burger:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}
.burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
/* closed: three evenly-spread bars (±5px from centre) */
.burger span:nth-child(1) {
  transform: translate(-50%, -50%) translateY(-5px);
}
.burger span:nth-child(2) {
  transform: translate(-50%, -50%);
}
.burger span:nth-child(3) {
  transform: translate(-50%, -50%) translateY(5px);
}
/* open: outer bars meet at center → clean X, middle bar fades */
.burger.is-open span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}
.burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(0.3);
}
.burger.is-open span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* mobile overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  clip-path: circle(0% at calc(100% - 3rem) 2.4rem);
  transition: clip-path 0.6s var(--ease);
  pointer-events: none;
}
.mobile-menu.is-open {
  clip-path: circle(150% at calc(100% - 3rem) 2.4rem);
  pointer-events: auto;
}
.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 11vw, 3.2rem);
  letter-spacing: -0.02em;
  padding: 0.35rem 0;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s;
}
.mobile-menu.is-open a {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu a span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-text);
}
.mobile-menu a:hover {
  color: var(--accent-text);
}

/* status chip */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
}
.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #46e08a;
  box-shadow: 0 0 0 0 rgba(70, 224, 138, 0.6);
  animation: ping 2.4s infinite;
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(70, 224, 138, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(70, 224, 138, 0);
  }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 7rem;
  padding-bottom: 2rem;
  overflow: hidden;
}
.hero .container {
  width: 100%;
}
.hero__mesh {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(40% 40% at 18% 22%, var(--accent-glow), transparent 70%),
    radial-gradient(45% 45% at 82% 30%, rgba(255, 106, 61, 0.14), transparent 70%),
    radial-gradient(50% 50% at 60% 88%, rgba(120, 130, 255, 0.12), transparent 70%);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2%, -3%, 0) scale(1.08);
  }
  100% {
    transform: translate3d(-2%, 2%, 0) scale(1.02);
  }
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  opacity: 0.5;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero__grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
/* let items shrink below content min-width so the terminal scrolls
   internally instead of blowing out the column on narrow screens */
.hero__grid-layout > * {
  min-width: 0;
}
@media (min-width: 1000px) {
  .hero__grid-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.hero__eyebrow b {
  color: var(--accent-text);
  font-weight: 500;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.hero__title .ln {
  display: block;
  overflow: hidden;
}
.hero__title .ln > span {
  display: block;
  transform: translateY(110%);
  animation: rise 0.9s var(--ease-out) forwards;
}
.hero__title .ln:nth-child(2) > span {
  animation-delay: 0.08s;
}
@keyframes rise {
  to {
    transform: translateY(0);
  }
}
.hero__title em {
  font-style: normal;
  color: var(--accent-text);
}
.hero__roles {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: var(--text);
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 1.8em;
}
.hero__roles .prompt {
  color: var(--accent-text);
}
.hero__roles .word {
  position: relative;
}
.hero__roles .caret {
  display: inline-block;
  width: 0.6ch;
  height: 1.1em;
  background: var(--accent);
  translate: 0 0.15em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero__desc {
  margin-top: 1.8rem;
  max-width: 46ch;
  color: var(--dim);
  font-size: 1.075rem;
}
.hero__cta {
  margin-top: 2.4rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.hero__foot {
  margin-top: 2.6rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.socials {
  display: flex;
  gap: 0.6rem;
}
.social {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  color: var(--dim);
  transition: color 0.3s, border-color 0.3s, transform 0.4s var(--ease),
    background 0.3s;
}
.social:hover {
  color: var(--accent-text);
  border-color: var(--line-2);
  transform: translateY(-3px);
}
.social svg {
  width: 18px;
  height: 18px;
}

/* hero terminal window */
.window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  position: relative;
}
.window::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--accent-glow), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}
.dot--r { background: #ff5f57; }
.dot--y { background: #febc2e; }
.dot--g { background: #28c840; }
.window__name {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--faint);
}

/* terminal (keeps IDs used by terminal.js) */
.terminal-content {
  font-family: var(--font-mono);
  padding: 1.25rem;
  background: var(--surface);
  color: var(--accent-text);
  font-size: 0.82rem;
  line-height: 1.65;
  min-height: 340px;
  max-height: 340px;
  overflow: auto;
  text-align: left;
}
.terminal-welcome {
  color: var(--accent-text);
  font-weight: 500;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: pre;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}
.terminal-line {
  margin-bottom: 0.15rem;
  word-wrap: break-word;
  color: var(--dim);
}
.terminal-command { color: var(--text); }
.terminal-error { color: var(--warm); }
.terminal-dir { color: #66d9ef; font-weight: 600; }
.terminal-file { color: var(--accent-text); }
.terminal-input-line {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.terminal-prompt {
  color: var(--warm) !important;
  font-weight: 600;
  white-space: nowrap;
  margin-right: 0.5rem;
  font-family: var(--font-mono);
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  caret-color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.terminal-content::-webkit-scrollbar { width: 7px; height: 7px; }
.terminal-content::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 4px;
}

/* marquee */
.marquee {
  position: relative;
  z-index: 2;
  margin-top: clamp(3rem, 8vh, 5rem);
  border-block: 1px solid var(--line);
  padding-block: 1.4rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: scroll-x 34s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee__item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 3rem;
  transition: color 0.3s;
}
.marquee__item:hover {
  color: var(--text);
}
.marquee__item::after {
  content: "◇";
  color: var(--accent-text);
  font-size: 0.7em;
}
@keyframes scroll-x {
  to {
    transform: translateX(-50%);
  }
}

/* =========================================================================
   ABOUT
   ========================================================================= */
.about__lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.35rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: 24ch;
}
.about__lead b {
  color: var(--accent-text);
  font-weight: 400;
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.about__body p {
  color: var(--dim);
  margin-top: 1.1rem;
  max-width: 60ch;
}
.about__body p:first-child {
  margin-top: 0;
}
.facts {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.facts__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.facts__row:last-child { border-bottom: none; }
.facts__row:hover { background: var(--surface-2); }
.facts__k {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--faint);
  text-transform: uppercase;
}
.facts__v {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
}

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: clamp(3rem, 7vw, 5rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (min-width: 720px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  transition: background 0.3s;
}
.stat:hover { background: var(--surface); }
.stat__n {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat__n em {
  font-style: normal;
  color: var(--accent-text);
}
.stat__l {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--dim);
}

/* feature cards */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
@media (min-width: 620px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}
.feature {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.6rem;
  background: var(--surface);
  transition: transform 0.4s var(--ease), border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.feature:hover {
  transform: translateY(-6px);
  border-color: var(--line-2);
}
.feature:hover::before { transform: scaleX(1); }
.feature__icon {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--accent-text);
  margin-bottom: 1.1rem;
}
.feature__icon svg { width: 20px; height: 20px; }
.feature h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.feature p {
  color: var(--dim);
  font-size: 0.9rem;
}

/* =========================================================================
   SKILLS
   ========================================================================= */
.skillcols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (min-width: 640px) {
  .skillcols { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .skillcols { grid-template-columns: repeat(4, 1fr); }
}
.skillcol {
  background: var(--bg);
  padding: 1.75rem;
}
.skillcol__h {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.skillcol__h span { color: var(--faint); }
.skillrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.92rem;
  transition: color 0.3s, padding-left 0.3s var(--ease);
}
.skillrow:first-of-type { border-top: none; }
.skillrow:hover {
  color: var(--text);
  padding-left: 0.4rem;
}
.skillrow__i {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
  width: 1.6rem;
}
.skillrow:hover .skillrow__i { color: var(--accent-text); }
.additional {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.additional__h {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1.3rem;
}
.additional__wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* =========================================================================
   CLI section
   ========================================================================= */
.cli__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 960px) {
  .cli__grid { grid-template-columns: 0.95fr 1.05fr; }
}
.cli__demo {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  padding: 1.4rem;
  min-height: 300px;
  color: var(--accent-text);
}
.cli__demo .muted { color: var(--dim); }
.cli__demo .arrow { color: var(--accent-text); }
.cli h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.1rem;
}
.cli p.lead {
  color: var(--dim);
  max-width: 48ch;
  margin-bottom: 1.6rem;
}
.cli__list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
}
.cli__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--dim);
  font-size: 0.94rem;
}
.cli__list li::before {
  content: "→";
  color: var(--accent-text);
  font-family: var(--font-mono);
}
.copybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 0.9rem 0.9rem 0.9rem 1.2rem;
  font-family: var(--font-mono);
  margin-top: 1.4rem;
}
.copybar code {
  color: var(--accent-text);
  font-size: 0.92rem;
}
.copybar code .p { color: var(--faint); margin-right: 0.6rem; }
.copybtn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.8rem;
  transition: background 0.3s, color 0.3s;
}
.copybtn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.copybtn svg { width: 14px; height: 14px; }

/* =========================================================================
   WORK / PROJECTS
   ========================================================================= */
.work {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 820px) {
  .work { grid-template-columns: repeat(2, 1fr); }
}
.wcard {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  min-height: 320px;
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}
.wcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.wcard:hover {
  transform: translateY(-8px);
  border-color: var(--line-2);
}
.wcard:hover::before { transform: scaleX(1); }
.wcard__index {
  position: absolute;
  top: clamp(1rem, 2vw, 1.6rem);
  right: clamp(1.2rem, 2.5vw, 2rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  transition: -webkit-text-stroke-color 0.4s, color 0.4s;
  user-select: none;
}
.wcard:hover .wcard__index {
  -webkit-text-stroke-color: var(--accent-text);
}
.wcard__head {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1.2rem;
}
.wcard__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
  max-width: 16ch;
  margin-bottom: 0.9rem;
}
.wcard__desc {
  color: var(--dim);
  font-size: 0.92rem;
  max-width: 48ch;
}
.wcard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.3rem;
}
.wcard__links {
  display: flex;
  gap: 1.4rem;
  margin-top: auto;
  padding-top: 1.6rem;
}
.wlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  transition: color 0.3s;
}
.wlink svg { width: 14px; height: 14px; transition: transform 0.35s var(--ease); }
.wlink:hover { color: var(--accent-text); }
.wlink:hover svg { transform: translate(2px, -2px); }

/* =========================================================================
   TIMELINE (experience + education)
   ========================================================================= */
.timeline {
  position: relative;
  padding-left: 2.2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--line-2), transparent);
}
.tl-item {
  position: relative;
  padding-bottom: 3rem;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-2);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.tl-item:hover::before {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-glow);
}
.tl-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tl-role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.tl-org {
  color: var(--accent-text);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}
.tl-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--faint);
  text-align: right;
  white-space: nowrap;
}
.tl-list {
  list-style: none;
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.tl-list li {
  display: flex;
  gap: 0.7rem;
  color: var(--dim);
  font-size: 0.92rem;
}
.tl-list li::before {
  content: "—";
  color: var(--accent-text);
  flex-shrink: 0;
}
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}
.edu-meta-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-text);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.15rem 0.5rem;
  margin-top: 0.4rem;
}

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: start;
}
@media (min-width: 960px) {
  .contact__grid { grid-template-columns: 1fr 1fr; }
}
.contact__big {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}
.contact__email {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  letter-spacing: -0.01em;
  position: relative;
  color: var(--text);
  word-break: break-all;
}
.contact__email::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.contact__email:hover::after { transform: scaleX(1); }
.contact__details {
  margin-top: 2.4rem;
  display: grid;
  gap: 0.2rem;
}
.cdetail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.cdetail:last-child { border-bottom: 1px solid var(--line); }
.cdetail__k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  width: 6rem;
  flex-shrink: 0;
}
.cdetail__v { color: var(--text); font-size: 0.95rem; }
.contact__socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 2rem;
}

/* form */
.form {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.4rem);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field {
  position: relative;
  margin-top: 1.2rem;
}
.field:first-child { margin-top: 0; }
.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.15rem 1rem 0.55rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field textarea {
  resize: vertical;
  min-height: 7rem;
  padding-top: 1.4rem;
}
.field label {
  position: absolute;
  left: 1rem;
  top: 0.95rem;
  font-size: 0.95rem;
  color: var(--faint);
  pointer-events: none;
  transition: transform 0.25s var(--ease), color 0.25s, font-size 0.25s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-0.7rem);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--accent-text);
}
.form .btn { width: 100%; margin-top: 1.4rem; }
.form__success {
  text-align: center;
  padding: 2rem 0;
}
.form__success svg {
  width: 3rem;
  height: 3rem;
  color: var(--accent);
  margin: 0 auto 1rem;
}
.form__success h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.form__success p { color: var(--dim); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 8vw, 5rem) 2.5rem;
  position: relative;
  overflow: hidden;
}
.footer__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 18.5vw, 15rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  text-align: center;
  white-space: nowrap;
  user-select: none;
  margin-bottom: 2.5rem;
}
.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--faint);
}
.footer__nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.footer__nav a {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--dim);
  transition: color 0.3s;
}
.footer__nav a:hover { color: var(--accent-text); }
.totop {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--dim);
  transition: color 0.3s;
}
.totop:hover { color: var(--accent-text); }
.totop svg { width: 14px; height: 14px; }

/* =========================================================================
   Reveal animations
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (min-width: 1000px) {
  .nav__menu { display: flex; }
  .nav__cta { display: inline-flex; }
  .burger { display: none; }
}
@media (max-width: 999px) {
  .nav__menu,
  .nav__cta { display: none; }

  /* hero content stacks (text + terminal); don't vertically center tall
     content or the top gets clipped under the fixed nav */
  .hero {
    justify-content: flex-start;
    min-height: auto;
    padding-top: 6.5rem;
    padding-bottom: 3rem;
  }
  .marquee { margin-top: clamp(2.5rem, 6vh, 4rem); }
}

@media (max-width: 640px) {
  .form__row { grid-template-columns: 1fr; }
  .tl-meta { text-align: left; margin-top: 0.35rem; }

  /* full-width stacked CTA — avoids long-label overflow at flex:1 */
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }

  .sec-head { gap: 1.25rem; }
  .copybar { flex-wrap: wrap; gap: 0.75rem; }

  /* contact rows: label above value, let long email wrap */
  .cdetail { flex-wrap: wrap; gap: 0.15rem 1rem; }
  .cdetail__k { width: auto; }
  .cdetail__v { word-break: break-word; }

  .footer__bar { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
}

/* =========================================================================
   Reduced motion / touch
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title .ln > span { transform: none; }
  .marquee__track { animation: none; }
  .cursor-dot,
  .cursor-ring { display: none; }
}

@media (hover: none) {
  .cursor-dot,
  .cursor-ring { display: none; }
}
