/* =========================================================
   ARSHAD — Backend Engineer
   Design system: Editorial + Developer System
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* color */
  --bg: #0a0a0b;
  --bg-2: #101013;
  --surface: #121216;
  --surface-2: #18181d;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f2f1ef;
  --text-muted: #8a8a93;
  --text-dim: #5c5c66;
  --accent: #e8a13c;
  --accent-dim: rgba(232, 161, 60, 0.14);

  /* type */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* spacing scale (8px base) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --s-8: 8rem;

  /* layout */
  --max: 1280px;
  --gutter: max(1.25rem, 4vw);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
ul {
  list-style: none;
}
::selection {
  background: var(--accent);
  color: #0a0a0b;
}

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

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (max-width: 430px) {
  .wrap {
    padding-inline: 1rem;
  }
  .mock--chat .chat {
    grid-template-columns: 1fr;
  }
  .chat__main,
  .chat__stream {
    min-width: 0;
  }
}

/* ---------- Section head (shared) ---------- */
.section__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--s-6);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.section__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.section__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 0.85rem var(--gutter);
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    padding 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav[data-scroll] {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem var(--gutter);
}
.nav__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--accent);
  transition: none;
}
.nav__inner {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav__logo-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent);
}
.nav__logo-text {
  font-size: 1rem;
}

.nav__links {
  display: flex;
  gap: 0.35rem;
}
.nav__links a {
  position: relative;
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.15rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s cubic-bezier(0.7, 0, 0.2, 1);
}
.nav__links a:hover {
  color: var(--text);
}
.nav__links a.is-active {
  color: var(--text);
}
.nav__links a.is-active::after {
  transform: scaleX(1);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav__resume {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition:
    border-color 0.25s,
    background 0.25s,
    color 0.25s;
}
.nav__resume:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.nav__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text-muted);
  transition:
    color 0.25s,
    background 0.25s;
}
.nav__icon:hover {
  color: var(--text);
  background: var(--surface);
}
.nav__toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 1.5px;
  background: var(--text);
  transition:
    transform 0.35s cubic-bezier(0.7, 0, 0.2, 1),
    opacity 0.2s;
}
.nav__toggle span:nth-child(1) {
  top: 13px;
}
.nav__toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.nav__toggle span:nth-child(3) {
  bottom: 13px;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(2.5px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-2.5px) rotate(-45deg);
}

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.55s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
  padding: 6rem var(--gutter) 2rem;
}
.menu.is-open {
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}
.menu__inner {
  max-width: var(--max);
  margin-inline: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu__links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.menu__links a {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 2rem + 6vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  padding: 0.35rem 0;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  transition:
    color 0.25s,
    transform 0.35s cubic-bezier(0.7, 0, 0.2, 1);
}
.menu__links a:hover {
  color: var(--accent);
  transform: translateX(8px);
}
.menu__links a::after {
  content: attr(data-index);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}
.menu__footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.menu__footer a:hover {
  color: var(--accent);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem var(--gutter) var(--s-5);
  position: relative;
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      rgba(232, 161, 60, 0.06),
      transparent 55%
    ),
    radial-gradient(
      90% 60% at 0% 100%,
      rgba(232, 161, 60, 0.04),
      transparent 50%
    ),
    var(--bg);
}
.hero__grid {
  max-width: var(--max);
  margin-inline: auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-6) var(--s-5);
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
  }
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 2.2rem + 6vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: var(--s-4);
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-family: var(--font-display);
}
.hero__sub {
  max-width: 34ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.18rem);
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition:
    transform 0.3s cubic-bezier(0.7, 0, 0.2, 1),
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
  will-change: transform;
}
.btn svg {
  transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}
.btn--primary {
  background: var(--text);
  color: var(--bg);
}
.btn--primary:hover {
  transform: translateY(-2px);
}
.btn--primary:hover svg {
  transform: translateX(3px);
}
.btn--ghost {
  border: 1px solid var(--line-2);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

/* ---------- Hero bento ---------- */
.hero__bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(0, auto);
  gap: 0.75rem;
}
.bento {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  transition:
    border-color 0.3s,
    transform 0.35s cubic-bezier(0.7, 0, 0.2, 1);
}
.bento:hover {
  border-color: var(--line-2);
}
.bento__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.bento--status {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}
.bento__value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.bento__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.bento--terminal {
  grid-column: 1 / span 2;
  grid-row: 2;
  padding: 0;
  overflow: hidden;
}
.bento--featured {
  grid-column: 1 / span 2;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.bento__feat-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
}
.bento__feat-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.bento__arrow {
  position: absolute;
  right: 1.1rem;
  bottom: 1.1rem;
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}
.bento--featured:hover {
  border-color: var(--accent-dim);
}
.bento--featured:hover .bento__arrow {
  transform: translate(3px, -3px);
}

/* terminal */
.term {
  display: flex;
  flex-direction: column;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.term__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b3b42;
}
.term__dot--r {
  background: #ff5f57;
}
.term__dot--y {
  background: #febc2e;
}
.term__dot--g {
  background: #28c840;
}
.term__title {
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}
.term__body {
  margin: 0;
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.85;
  white-space: pre;
  color: var(--text-muted);
  overflow-x: auto;
}
.term__body .t-c {
  color: var(--accent);
}
.term__body .t-m {
  color: var(--text-dim);
}
.term__body .t-s {
  color: #cdd3e0;
}
.term__body .t-n {
  color: #7cd6a0;
}

/* ---------- Marquee ---------- */
.hero__marquee {
  width: 100%;
  max-width: var(--max);
  margin: var(--s-6) auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  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;
  align-items: center;
  padding: 0.85rem 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  width: max-content;
  will-change: transform;
  animation: marquee 22s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee__group span {
  padding-right: 1.2rem;
}
.marquee__track span:nth-child(odd) {
  color: var(--text-muted);
}
.hero__marquee:hover .marquee__track {
  animation-play-state: paused;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  padding: var(--s-7) var(--gutter);
  background: var(--bg);
}
.about__grid {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s-6);
}
.about__statement {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 18ch;
}
.about__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-content: start;
  align-self: start;
}
.about__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
  transition:
    transform 0.35s cubic-bezier(0.7, 0, 0.2, 1),
    border-color 0.3s;
}
.about__card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
}
.about__card-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.about__card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* =========================================================
   WORK / PROJECTS
   ========================================================= */
.work {
  padding: var(--s-7) var(--gutter);
  background: var(--bg);
}
.work .section__head {
  max-width: var(--max);
  margin-inline: auto;
}

.proj {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  gap: var(--s-4);
  align-items: center;
  padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-7);
}
.proj:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.proj--featured {
  grid-template-columns: 1.15fr 0.85fr;
}
.proj--split {
  grid-template-columns: 0.85fr 1.15fr;
}
.proj--split .proj__body {
  order: 1;
}
.proj--split .proj__visual {
  order: 2;
}

.proj__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.proj__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}
.proj__desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 44ch;
  margin-bottom: 1.2rem;
}
.proj__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}
.proj__stack span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  transition:
    border-color 0.25s,
    color 0.25s;
}
.proj__stack span:hover {
  border-color: var(--line-2);
  color: var(--text);
}
.proj__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.25s;
}
.link-arrow:hover {
  color: var(--accent);
}
.link-arrow svg {
  transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}
.link-arrow:hover svg {
  transform: translate(2px, -2px);
}

.proj__visual {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  max-width: 100%;
  width: 100%;
  transition:
    border-color 0.35s,
    transform 0.45s cubic-bezier(0.7, 0, 0.2, 1);
}
.proj__visual:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
}

/* ---- Mock chrome wrapper ---- */
.mock {
  display: flex;
  flex-direction: column;
}
.mock__chrome {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}
.mock__url {
  display: block;
}

/* ---- Chat mockup ---- */
.mock--chat .chat {
  display: grid;
  grid-template-columns: 130px 1fr;
  height: 340px;
  background: var(--bg-2);
}
.chat__side {
  border-right: 1px solid var(--line);
  padding: 0.8rem 0.6rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.chat__side-head {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  color: var(--text-dim);
}
.chat__room {
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
  transition:
    background 0.25s,
    color 0.25s;
}
.chat__room--active {
  background: var(--surface-2);
  color: var(--text);
}
.chat__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chat__topbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.chat__hash {
  color: var(--accent);
}
.chat__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-dim);
}
.chat__stream {
  flex: 1;
  overflow: hidden;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.msg__avatar {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
}
.msg__avatar.m1 {
  background: linear-gradient(135deg, #e8a13c, #b6722a);
}
.msg__avatar.m2 {
  background: linear-gradient(135deg, #6b7280, #3f3f46);
}
.msg__avatar.m3 {
  background: linear-gradient(135deg, #5b8def, #3a5fcd);
}
.msg__body .msg__who {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.1rem;
}
.msg__body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  font-family: var(--font-mono);
}
.typing {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.2rem;
}
.typing__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: blink 1.4s infinite;
}
.typing__dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing__dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  60%,
  100% {
    opacity: 0.25;
  }
  30% {
    opacity: 1;
  }
}
.chat__input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.7rem 0.9rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
  background: var(--surface);
}
.chat__send {
  color: var(--accent);
}

/* ---- Dashboard mockup ---- */
.mock--dash .dash {
  display: grid;
  grid-template-columns: 120px 1fr;
  height: 340px;
  background: var(--bg-2);
}
.dash__nav {
  border-right: 1px solid var(--line);
  padding: 0.8rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.dash__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.dash__item {
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.15rem;
  transition:
    background 0.25s,
    color 0.25s;
}
.dash__item--on {
  background: var(--surface-2);
  color: var(--accent);
}
.dash__main {
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
}
.dash__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}
.dash__pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.dash__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
}
.kpi__n {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.kpi--g .kpi__n {
  color: #7cd6a0;
}
.kpi--a .kpi__n {
  font-size: 0.72rem;
  color: var(--accent);
  padding-top: 0.25rem;
}
.kpi__l {
  font-size: 0.62rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.dash__table {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.dash__table .row {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr 0.6fr;
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  color: var(--text-muted);
}
.dash__table .row:last-child {
  border-bottom: none;
}
.row--head {
  color: var(--text-dim);
  background: var(--surface);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.row--hide {
  display: none;
}

/* =========================================================
   STACK
   ========================================================= */
.stack {
  padding: var(--s-7) var(--gutter);
  background: var(--bg-2);
}
.stack__grid {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4) var(--s-3);
}
.stack__col h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.stack__list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.stack__list li {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 0.4rem 0;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  padding-left: 0.7rem;
  margin-left: -0.7rem;
  transition:
    color 0.25s,
    border-color 0.25s,
    transform 0.35s cubic-bezier(0.7, 0, 0.2, 1);
  cursor: default;
}
.stack__list li:hover {
  color: var(--text);
  border-left-color: var(--accent);
  transform: translateX(4px);
}

/* =========================================================
   EXPERIENCE
   ========================================================= */
.experience {
  padding: var(--s-7) var(--gutter);
  background: var(--bg);
}
.exp {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.exp__item {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  transition: padding 0.3s ease;
}
.exp__item:first-child {
  border-top: none;
  padding-top: 0;
}
.exp__aside {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.exp__role {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.exp__org {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.exp__date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}
.exp__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.exp__list p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  position: relative;
  padding-left: 1.2rem;
}
.exp__list p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  padding: var(--s-8) var(--gutter) var(--s-7);
  background:
    radial-gradient(
      80% 100% at 50% 100%,
      rgba(232, 161, 60, 0.07),
      transparent 60%
    ),
    var(--bg);
  border-top: 1px solid var(--line);
}
.contact__inner {
  max-width: var(--max);
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
}
.contact__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 2rem + 5vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.contact__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem);
  letter-spacing: -0.01em;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition:
    border-color 0.3s,
    color 0.3s,
    transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}
.contact__mail:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.contact__mail svg {
  transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}
.contact__mail:hover svg {
  transform: translateX(4px);
}
.contact__links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.contact__links a {
  position: relative;
  transition: color 0.25s;
}
.contact__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}
.contact__links a:hover {
  color: var(--text);
}
.contact__links a:hover::after {
  width: 100%;
}

/* Contact form styles */
.contact__form {
  max-width: 600px;
  width: 100%;
  margin-inline: auto;
}
.contact__form-fields {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.contact__form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact__form-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-align: left;
  width: 100%;
}
.contact__form-input,
.contact__form-textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--text);
  background: var(--surface);
  transition:
    border-color 0.2s,
    background 0.2s;
}
.contact__form-input:focus,
.contact__form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}
.contact__form-input::placeholder,
.contact__form-textarea::placeholder {
  color: var(--text-dim);
}
.contact__form-textarea {
  min-height: 12rem;
  resize: vertical;
}
.contact__form-btn {
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  margin-top: var(--s-4);
  padding: 0.8rem 1.3rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 98px;
}
.contact__form-btn:hover {
  background: var(--accent-dim);
}
.contact__form-btn:active {
  transform: translateY(1px);
}
.contact__form-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.contact__form-btn-loading {
  display: none;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  margin-top: var(--s-4);
  padding: 0.8rem 1.3rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--accent);
  color: var(--bg);
  cursor: default;
}
.contact__form-success {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: center;
}
.contact__form-error {
  color: var(--accent);
  font-size: 0.78rem;
  margin-top: 0.4rem;
  text-align: left;
  width: 100%;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 2rem var(--gutter);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.footer__inner {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer__mid {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.footer__top {
  transition: color 0.25s;
}
.footer__top:hover {
  color: var(--accent);
}

/* =========================================================
   REVEAL (initial state — overridden by JS)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .hero__bento {
    max-width: 560px;
  }
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .stack__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .proj--featured,
  .proj--split {
    grid-template-columns: 1fr;
  }
  .proj--split .proj__visual {
    order: 1;
  }
  .proj--split .proj__body {
    order: 2;
  }
  .exp__item {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }
}
@media (max-width: 768px) {
  .nav__links {
    display: none;
  }
  .nav__toggle {
    display: block;
  }
  .nav__resume {
    display: none;
  }
  .nav__icon {
    display: none;
  }
  .hero__bento {
    grid-template-columns: 1fr;
  }
  .bento--status {
    grid-column: 1;
    grid-row: 1;
  }
  .bento--terminal {
    grid-column: 1;
    grid-row: 2;
  }
  .bento--featured {
    grid-column: 1;
    grid-row: 3;
  }
  .about__cards {
    grid-template-columns: 1fr;
  }
  .stack__grid {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .mock--chat .chat,
  .mock--dash .dash {
    height: 300px;
  }
  .chat__side {
    display: none;
  }
  .dash__nav {
    display: none;
  }
}
@media (max-width: 480px) {
  :root {
    --s-7: 4rem;
    --s-8: 5rem;
  }
  .hero {
    padding-top: 6rem;
  }
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
  .proj__links {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .footer__inner {
    justify-content: center;
    text-align: center;
  }
}

/* =========================================================
   MOTION PREFERENCE
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .marquee__track {
    animation: none;
  }
  .status-dot {
    animation: none;
  }
}

@media (max-width: 430px) {
  .mock--chat .chat {
    grid-template-columns: 1fr;
  }
  .mock--dash .dash {
    grid-template-columns: 1fr;
  }
  .chat__main,
  .chat__stream,
  .dash__main {
    min-width: 0;
  }
}
