/* ============================================================
   Hans.dev — Portfolio
   Dark, modern, IT-style. Pure CSS, no framework.
   ============================================================ */

:root {
  --bg:        #0a0e17;
  --bg-2:      #0d1320;
  --surface:   rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .055);
  --border:    rgba(255, 255, 255, .09);
  --border-2:  rgba(255, 255, 255, .16);
  --text:      #e6edf3;
  --muted:     #8b98a9;
  --muted-2:   #5d6b7d;
  --primary:   #6366f1;
  --primary-2: #8b5cf6;
  --accent:    #22d3ee;
  --grad:      linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #d946ef 100%);
  --grad-soft: linear-gradient(135deg, #6366f1, #22d3ee);
  --radius:    16px;
  --radius-lg: 24px;
  --maxw:      1140px;
  --shadow:    0 20px 50px rgba(0, 0, 0, .4);
  --ease:      cubic-bezier(.16, 1, .3, 1);
  --header-h:  72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Chặn bôi đen / sao chép text (rào cản nhẹ) */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* Vẫn cho chọn trong input/textarea nếu sau này thêm form */
input, textarea { -webkit-user-select: text; user-select: text; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(99, 102, 241, .35); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ── Background decoration ───────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%; filter: blur(120px);
  opacity: .5; pointer-events: none;
}
.bg-glow--1 { top: -160px; left: -120px; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(99,102,241,.5), transparent 70%); }
.bg-glow--2 { top: 30%; right: -160px; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(139,92,246,.4), transparent 70%); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; line-height: 1;
  padding: 14px 26px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s;
  white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(99,102,241,.35); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(99,102,241,.5); }
.btn--ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--primary); background: var(--surface-2); }

/* ── Header ──────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(10, 14, 23, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 18px;
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
}
.logo__dot { color: var(--accent); }
.logo--sm { font-size: 17px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative; padding: 8px 14px; font-size: 15px; font-weight: 500;
  color: var(--muted); border-radius: 8px; transition: color .2s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--grad); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__cta { margin-left: 8px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  align-items: center; justify-content: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Sections ────────────────────────────────────────── */
.section { padding: 100px 0; position: relative; }
.section__head { text-align: center; margin-bottom: 56px; }
.section__tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 13px;
  letter-spacing: .3px; color: var(--muted); margin-bottom: 14px;
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.section__tag i { color: #28c840; font-style: normal; font-weight: 700; margin-right: 7px; }
.section__title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; }

/* ── Hero ────────────────────────────────────────────── */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--header-h); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__greet { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100%{transform:rotate(0)} 10%{transform:rotate(14deg)} 20%{transform:rotate(-8deg)} 30%{transform:rotate(14deg)} 40%{transform:rotate(-4deg)} 50%{transform:rotate(10deg)} }

.hero__name { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 12px; }
.hero__alias { color: var(--muted); font-weight: 500; }
.hero__role { font-size: clamp(1.3rem, 3.2vw, 2rem); font-weight: 700; margin-bottom: 22px; font-family: 'JetBrains Mono', monospace; }
.hero__role-prefix { color: var(--muted-2); }
.hero__desc { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.12rem); max-width: 520px; margin-bottom: 32px; }
.hero__desc strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero__socials { display: flex; gap: 12px; }

.social {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: .25s var(--ease);
}
.social:hover { color: #fff; border-color: var(--primary); background: var(--surface-2); transform: translateY(-3px); }
.social--lg { width: 52px; height: 52px; border-radius: 13px; }

.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--border-2); border-radius: 14px; display: grid; justify-items: center; padding-top: 8px; }
.scroll-cue span { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: scrolly 1.6s infinite; }
@keyframes scrolly { 0%{opacity:0;transform:translateY(0)} 40%{opacity:1} 80%,100%{opacity:0;transform:translateY(12px)} }

/* Code window */
.code-window {
  position: relative;
  background: linear-gradient(180deg, #11182a, #0c1120);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transform: perspective(1200px) rotateY(-7deg) rotateX(3deg);
  transition: transform .5s var(--ease);
}
.code-window:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
/* Sheen sweep — signature */
.code-window::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 36%; height: 100%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  transform: skewX(-20deg); animation: sheen 6.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { left: -60%; } 50% { left: 130%; } }
.code-window__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.code-window__file { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted-2); }
.code-window__body { padding: 22px 24px; font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.85; overflow-x: auto; color: var(--text); }
.t-key { color: #c792ea; } .t-var { color: #82aaff; } .t-prop { color: #f07178; }
.t-str { color: #c3e88d; } .t-bool { color: #f78c6c; } .t-fn { color: #82aaff; }

/* ── About ───────────────────────────────────────────── */
.about__grid { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
.about__card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px 28px; text-align: center; position: sticky; top: 100px;
}
.about__avatar {
  width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 28px; position: relative;
  background: var(--grad); display: grid; place-items: center; font-size: 48px; font-weight: 800; color: #fff;
  box-shadow: 0 12px 30px rgba(99,102,241,.4);
}
.about__status { position: absolute; bottom: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: #28c840; border: 4px solid var(--bg-2); box-shadow: 0 0 12px #28c840; }
.about__name { font-size: 22px; font-weight: 700; }
.about__job { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 14px; margin-bottom: 20px; }
.about__facts { list-style: none; text-align: left; display: grid; gap: 12px; }
.about__facts li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14.5px; }
.about__facts span { font-size: 16px; }
.about__text p { color: var(--muted); margin-bottom: 18px; font-size: 1.05rem; }
.about__text strong { color: var(--text); font-weight: 600; }
.about__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 14px; text-align: center; }
.stat__num { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__plus { font-size: 1.4rem; font-weight: 800; color: var(--primary-2); }
.stat__label { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ── Skills ──────────────────────────────────────────── */
.skills__layout { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; margin-bottom: 34px; }

/* Terminal card — signature */
.terminal {
  background: linear-gradient(180deg, #0d1424, #0a0f1c);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.terminal__bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.terminal__title { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--muted-2); }
.terminal__body { padding: 24px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; line-height: 1.85; }
.terminal__body p { margin: 0; }
.t-prompt { color: #28c840; font-weight: 700; margin-right: 8px; }
.t-out { color: var(--muted); margin: 2px 0 16px; }
.t-green { color: #c3e88d; }
.t-cyan { color: var(--accent); }
.blink2 { color: var(--accent); animation: blink 1.05s steps(1) infinite; }

/* Proficiency bars */
.bars { display: flex; flex-direction: column; gap: 20px; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 26px; }
.bar__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.bar__name { font-weight: 600; font-size: 15px; }
.bar__lvl { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted-2); margin-left: 8px; font-weight: 400; }
.bar__pct { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); }
.bar__track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--border); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); box-shadow: 0 0 14px rgba(34,211,238,.4);
  transition: width 1.3s var(--ease); }
.bar.is-filled .bar__fill { width: var(--w, 0); }

/* Tech chip cloud */
.tech-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tech-cloud span {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted);
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  transition: .25s var(--ease); cursor: default;
}
.tech-cloud span:hover { color: #fff; border-color: var(--primary); background: var(--surface-2);
  transform: translateY(-3px); box-shadow: 0 8px 20px rgba(99,102,241,.28); }

/* ── Services ────────────────────────────────────────── */
.services__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.service {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 34px 32px; transition: transform .3s var(--ease), background .3s; min-height: 230px;
}
.service:hover { transform: translateY(-6px); background: var(--surface-2); }
/* animated gradient rim on hover */
.service::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 0;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.service:hover::before { opacity: 1; }
/* big watermark number */
.service__bg {
  position: absolute; top: 2px; right: 18px; z-index: 0; pointer-events: none;
  font-family: 'JetBrains Mono', monospace; font-size: 120px; font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .07; transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.service:hover .service__bg { opacity: .14; transform: scale(1.06) translateY(-4px); }
.service__icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(99,102,241,.1); border: 1px solid var(--border); color: var(--accent);
  transition: .3s var(--ease);
}
.service:hover .service__icon { background: var(--grad); color: #fff; border-color: transparent;
  transform: translateY(-2px) rotate(-6deg); box-shadow: 0 10px 24px rgba(99,102,241,.42); }
.service__title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.service__desc { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.service__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.service__list li {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted-2);
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; transition: .25s;
}
.service:hover .service__list li { color: var(--muted); border-color: var(--border-2); }
/* Featured service (Phổ biến) */
.service--featured { background: var(--surface-2); }
.service--featured::before { opacity: 1; }
.service__badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: #fff; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--grad); box-shadow: 0 6px 16px rgba(99,102,241,.45);
}
.service--featured .service__bg { top: auto; bottom: 14px; right: 18px; }

/* ── Projects ────────────────────────────────────────── */
.projects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: .3s var(--ease);
}
.project:hover { transform: translateY(-6px); border-color: var(--border-2); background: var(--surface-2); }
.project__top { display: flex; align-items: center; justify-content: space-between; }
.project__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; background: rgba(99,102,241,.12); border: 1px solid var(--border); }
.project__links a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 18px; transition: .2s; }
.project__links a:hover { color: #fff; border-color: var(--primary); transform: rotate(45deg); }
.project__title { font-size: 20px; font-weight: 700; }
.project__desc { color: var(--muted); font-size: 14.5px; flex: 1; }
.project .tags { margin-top: 6px; }

/* ── Contact ─────────────────────────────────────────── */
.contact__box {
  background: linear-gradient(160deg, rgba(99,102,241,.12), rgba(139,92,246,.06));
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px); text-align: center; position: relative; overflow: hidden;
}
.contact__box::after { content: ''; position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; background: radial-gradient(circle, rgba(99,102,241,.18), transparent 60%); pointer-events: none; }
.contact__title { font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800; margin: 16px 0 14px; letter-spacing: -.02em; position: relative; }
.contact__desc { color: var(--muted); font-size: 1.1rem; max-width: 480px; margin: 0 auto 30px; position: relative; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 30px; position: relative; }
.contact__socials { display: flex; gap: 14px; justify-content: center; position: relative; }

/* ── Footer ──────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__copy { color: var(--muted-2); font-size: 14px; }
.footer__top { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 18px; transition: .25s var(--ease); }
.footer__top:hover { color: #fff; border-color: var(--primary); transform: translateY(-3px); }

/* ── Cursor glow (follows mouse, desktop) ────────────── */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 380px; height: 380px; z-index: -1;
  border-radius: 50%; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(99,102,241,.16), transparent 62%);
  transition: opacity .4s;
}
body.has-cursor .cursor-glow { opacity: 1; }

/* ── Blinking caret in hero role ─────────────────────── */
.cursor-blink {
  color: var(--accent); font-weight: 400; margin-left: 2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Tech marquee ────────────────────────────────────── */
.marquee {
  overflow: hidden; padding: 20px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 38px; width: max-content;
  animation: scroll-x 32s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: 'JetBrains Mono', monospace; font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 700; color: var(--muted); white-space: nowrap; transition: color .2s;
}
.marquee__track:hover span { color: var(--text); }
.marquee__track b { color: var(--primary); font-size: 12px; opacity: .7; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ── Spotlight (follows cursor over card) ────────────── */
.spotlight { position: relative; overflow: hidden; }
.spotlight::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(99,102,241,.16), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.spotlight:hover::after { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }

/* ── Tilt (3D hover via JS-set vars) ─────────────────── */
.tilt { transition: transform .25s var(--ease); transform-style: preserve-3d; will-change: transform; }
.tilt:hover,
.reveal.is-visible.tilt:hover { transform: perspective(800px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }

.skill-card__title em { font-style: normal; font-size: 12px; color: var(--muted-2); font-weight: 500; font-family: 'JetBrains Mono', monospace; }

/* ── Reveal animation ────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero__content { order: 2; }
  .hero__visual { order: 1; max-width: 460px; margin: 0 auto; width: 100%; }
  .code-window { transform: none; }
  .hero__desc { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__socials { justify-content: center; }
  .about__grid { grid-template-columns: 1fr; }
  .about__card { position: static; max-width: 420px; margin: 0 auto; }
  .skills__layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(10, 14, 23, .97); backdrop-filter: blur(16px);
    padding: 16px 24px 24px; border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; }
  .nav__link { padding: 14px 12px; font-size: 16px; border-radius: 10px; }
  .nav__link::after { display: none; }
  .nav__link:hover, .nav__link.is-active { background: var(--surface); }
  .nav__cta { margin: 8px 0 0; }
  .nav-toggle { display: flex; }
  .section { padding: 72px 0; }
  .scroll-cue { display: none; }
}

@media (max-width: 540px) {
  .services__grid, .about__stats { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat { padding: 16px 8px; }
  .container { padding: 0 18px; }
  .hero__actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
