:root {
    --bg: #05070d;
    --bg-2: #080c17;
    --surface: rgba(15, 22, 42, .55);
    --surface-solid: #0c1222;
    --line: rgba(120, 160, 255, .12);
    --line-strong: rgba(120, 160, 255, .28);
    --text: #e8eefa;
    --muted: #8d9ab3;
    --blue: #2f7bff;
    --blue-2: #5aa2ff;
    --cyan: #38d6ff;
    --grad: linear-gradient(120deg, #2f7bff 0%, #38d6ff 100%);
    --radius: 20px;
    --line-off: -40px;
    --step-pad: 0px;
    --tilt: 8deg;
    --font: "Vazirmatn", "Inter", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    color-scheme: dark;
}

:root[dir="ltr"] {
    --tilt: -8deg;
    --font: "Inter", system-ui, sans-serif;
}
[dir="ltr"] body { line-height: 1.7; }
[dir="ltr"] .scroll-progress span { transform-origin: left; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: rgba(47, 123, 255, .45); }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
p { margin: 0; }

.container {
    width: min(1180px, 100% - 32px);
    margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.6rem;
    border-radius: 999px;
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    box-shadow: 0 10px 30px -10px rgba(47, 123, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(56, 214, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--line-strong);
    box-shadow: none;
}
.btn-ghost:hover { background: rgba(47, 123, 255, .1); box-shadow: none; }
.btn-sm { padding: .5rem 1.1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; font-family: var(--mono); font-weight: 500; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 2px;
    z-index: 60;
}
.scroll-progress span {
    display: block;
    height: 100%;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: right;
    box-shadow: 0 0 12px var(--cyan);
}

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    transition: background .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(5, 7, 13, .72);
    backdrop-filter: blur(14px) saturate(140%);
    border-color: var(--line);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo { display: flex; align-items: center; gap: .7rem; font-weight: 800; }
.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--grad);
    font-family: "Inter", sans-serif;
    font-size: .9rem;
    letter-spacing: .5px;
    box-shadow: 0 6px 20px -6px rgba(47, 123, 255, .9);
}
.nav-links { display: flex; gap: 2rem; font-size: .92rem; color: var(--muted); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 1rem; }
.lang-switch {
    display: flex;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    font-size: .78rem;
    font-weight: 700;
}
.lang-switch a { padding: .25rem .65rem; border-radius: 999px; color: var(--muted); transition: color .2s, background .2s; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.on { background: rgba(47, 123, 255, .2); color: var(--text); }
.nav-links a::after {
    content: "";
    position: absolute;
    inset: auto 0 -6px 0;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
    transform: scaleX(0);
    transition: transform .3s;
}
.nav-links a.active::after { transform: scaleX(1); }

/* ---------- Side rail ---------- */
.rail {
    position: fixed;
    top: 50%;
    inset-inline-end: 28px;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}
.rail.show { opacity: 1; pointer-events: auto; }
.rail a { display: flex; align-items: center; gap: 12px; }
.rail-dot {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--bg);
    color: var(--muted);
    font-size: .78rem;
    transition: all .3s;
}
.rail-label {
    font-size: .8rem;
    color: var(--muted);
    opacity: 0;
    transition: opacity .3s;
    white-space: nowrap;
}
.rail a:hover .rail-label, .rail a.active .rail-label { opacity: 1; }
.rail a.active .rail-dot {
    background: var(--grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 0 5px rgba(47, 123, 255, .15), 0 0 24px rgba(56, 214, 255, .5);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 120px 0 100px;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid {
    position: absolute;
    inset: -2px;
    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(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); }
.orb-1 { width: 520px; height: 520px; background: rgba(47, 123, 255, .35); top: -120px; right: -80px; animation: float 14s ease-in-out infinite; }
.orb-2 { width: 420px; height: 420px; background: rgba(56, 214, 255, .18); bottom: -140px; left: 5%; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(-40px, 40px) scale(1.08); } }

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 4rem;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(47, 123, 255, .08);
    color: var(--blue-2);
    font-size: .85rem;
    margin-bottom: 1.6rem;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(56, 214, 255, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(56, 214, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(56, 214, 255, 0); } }

.kicker { margin-bottom: 1rem; color: var(--muted); font-size: 1rem; font-weight: 500; max-width: 34rem; }
.hero h1 { font-family: "Inter", var(--font); font-size: clamp(2.6rem, 6.2vw, 5.2rem); font-weight: 800; letter-spacing: -2px; line-height: 1.08; }
[dir="rtl"] .hero h1 { text-align: right; }
.hero h1 .grad { display: inline-block; padding-bottom: .08em; }
.hero h1 .caret { width: .08em; min-width: 5px; height: .9em; margin-left: .1em; vertical-align: -.05em; }
.grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lead { margin-top: 1.4rem; max-width: 36rem; color: var(--muted); font-size: 1.12rem; }
.lead b { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

.code-card {
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(16, 24, 46, .85), rgba(8, 12, 24, .9));
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 0 60px -20px rgba(47, 123, 255, .5);
    overflow: hidden;
    transform: perspective(1200px) rotateY(var(--tilt)) rotateX(4deg);
}
.code-top { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.code-top i { width: 11px; height: 11px; border-radius: 50%; background: #1d2740; }
.code-top i:first-child { background: #2f7bff; }
.code-top span { margin-left: auto; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.code-card pre { margin: 0; padding: 22px 24px 26px; font-family: var(--mono); font-size: .86rem; line-height: 1.85; color: #c6d3ea; overflow-x: auto; }
.code-card .k { color: #5aa2ff; }
.code-card .t { color: #38d6ff; }
.code-card .s { color: #9fd6ff; }
.code-card .f { color: #e8eefa; font-weight: 500; }
.code-card .n { color: #7ee0ff; }
.code-card .c { color: #55617a; font-style: italic; }
.caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 3px; vertical-align: -3px; background: var(--cyan); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: .78rem;
    color: var(--muted);
}
.scroll-hint i { width: 22px; height: 36px; border: 1.5px solid var(--line-strong); border-radius: 12px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; top: 7px; left: 50%; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Steps / timeline ---------- */
.steps { position: relative; padding-bottom: 60px; }
.steps-line {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: calc((100% - min(1180px, 100% - 32px)) / 2 + var(--line-off));
    width: 2px;
    background: var(--line);
}
.steps-line span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
    transform-origin: top;
    transform: scaleY(var(--fill, 0));
    box-shadow: 0 0 14px rgba(56, 214, 255, .6);
}

.step {
    position: relative;
    padding: 130px 0;
}
.step + .step { border-top: 1px solid rgba(120, 160, 255, .05); }
.step:nth-child(odd) { background: linear-gradient(180deg, transparent, rgba(47, 123, 255, .025), transparent); }

.step-head { position: relative; display: flex; align-items: flex-end; gap: 1.6rem; margin-bottom: 3.5rem; }
.step-node {
    position: absolute;
    top: 30px;
    inset-inline-start: calc(var(--line-off) - var(--step-pad) - 8px);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line-strong);
    transition: all .5s;
}
.step-head.in .step-node { border-color: var(--cyan); background: var(--blue); box-shadow: 0 0 0 6px rgba(47, 123, 255, .15), 0 0 20px var(--cyan); }
.step-num {
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 900;
    line-height: .9;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(90, 162, 255, .45);
}
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--blue-2); text-align: start; }
.step-head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }

/* ---------- Cards ---------- */
.card {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(6px);
    padding: 2rem;
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
    isolation: isolate;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(47, 123, 255, .16), transparent 45%);
    opacity: 0;
    transition: opacity .35s;
    z-index: -1;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(47, 123, 255, .45); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .96rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 1.4rem 0 0; }
.chips li {
    font-family: var(--mono);
    font-size: .74rem;
    padding: .25rem .7rem;
    border-radius: 8px;
    color: var(--blue-2);
    background: rgba(47, 123, 255, .08);
    border: 1px solid rgba(47, 123, 255, .18);
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: start; }
.about-text p { font-size: 1.2rem; color: #c4cee2; }
.about-text p + p { margin-top: 1.3rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--bg-2); padding: 1.8rem 1.5rem; display: flex; flex-direction: column; gap: .2rem; }
.fact strong { font-size: 2.2rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.2; }
.fact span { color: var(--muted); font-size: .88rem; }

/* Skills */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, rgba(47, 123, 255, .25), rgba(56, 214, 255, .08));
    border: 1px solid rgba(47, 123, 255, .3);
    margin-bottom: 1.4rem;
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.section-intro { max-width: 46rem; margin: -1.5rem 0 2.6rem; color: #c4cee2; font-size: 1.15rem; }

/* Experience */
.xp-list { border-top: 1px solid var(--line); }
.xp {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    padding: 2.6rem 0;
    border-bottom: 1px solid var(--line);
}
.xp-meta { display: flex; flex-direction: column; gap: .3rem; }
.xp-period { font-size: 1.5rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xp-place { color: var(--muted); font-size: .9rem; }
.xp-body h3 { font-size: 1.45rem; font-weight: 700; }
.xp-org { color: var(--cyan); margin-top: .3rem; font-size: .95rem; }
.xp-body ul { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .7rem; }
.xp-body li { position: relative; padding-inline-start: 1.4rem; color: #b7c2d8; }
.xp-body li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .75em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--blue);
    box-shadow: 0 0 10px var(--blue);
    transform: rotate(45deg);
}

/* Training */
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cert {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.4rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: border-color .3s;
}
.cert:hover { border-color: var(--line-strong); }
.cert-mark {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(140deg, rgba(47, 123, 255, .3), rgba(56, 214, 255, .08));
    border: 1px solid rgba(47, 123, 255, .35);
    position: relative;
}
.cert-mark::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 8px;
    width: 7px;
    height: 13px;
    border: solid var(--cyan);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.cert h3 { font-size: 1rem; font-weight: 700; line-height: 1.5; }
.cert p { color: var(--muted); font-size: .85rem; margin-top: .2rem; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.2rem; }
.project { grid-column: span 4; display: flex; flex-direction: column; }
.project.featured, .project:nth-child(2) { grid-column: span 6; }
.project.featured {
    background: linear-gradient(150deg, rgba(47, 123, 255, .18), rgba(10, 16, 32, .7) 55%);
    border-color: rgba(47, 123, 255, .35);
}
.project h3 { font-family: "Inter", var(--font); font-size: 1.6rem; font-weight: 800; text-align: start; }
.project .chips { margin-top: auto; padding-top: 1.4rem; }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.6rem; }
.project-kind { font-size: .8rem; color: var(--cyan); }
.project-index { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.project-link { align-self: flex-start; margin-top: 1rem; font-size: .9rem; font-weight: 600; color: var(--cyan); transition: opacity .2s; }
.project-link:hover { opacity: .75; }
.nav-links a.nav-ext { color: var(--cyan); }
.nav-links a.nav-ext:hover { color: var(--text); }

/* Process */
.process {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
    position: relative;
}
.process::before {
    content: "";
    position: absolute;
    top: 27px;
    right: 28px;
    left: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong) 10%, var(--line-strong) 90%, transparent);
}
.process li { position: relative; transition-delay: var(--d, 0ms); }
.process-num {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--blue-2);
    margin-bottom: 1.4rem;
    transition: all .4s;
}
.process li:hover .process-num { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 30px rgba(56, 214, 255, .5); }
.process h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.process p { color: var(--muted); font-size: .92rem; }

/* Contact */
.contact-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 5rem 2rem;
    border-radius: 28px;
    border: 1px solid rgba(47, 123, 255, .3);
    background: linear-gradient(180deg, #0a1328, #060912);
}
.contact-glow {
    position: absolute;
    width: 700px;
    height: 400px;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(47, 123, 255, .45), transparent);
    pointer-events: none;
}
.contact-card > :not(.contact-glow) { position: relative; }
.contact-card h3 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 800; }
.contact-card p { color: var(--muted); margin: 1rem auto 2.4rem; max-width: 34rem; }
.socials { display: flex; justify-content: center; gap: 2rem; margin-top: 2rem; font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.socials a:hover { color: var(--cyan); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer a:hover { color: var(--text); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .code-card.reveal { transform: perspective(1200px) rotateY(var(--tilt)) rotateX(4deg) translateY(28px); }
.js .code-card.reveal.in { transform: perspective(1200px) rotateY(var(--tilt)) rotateX(4deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
    .rail { display: none; }
}
@media (max-width: 1100px) {
    .skill-grid { grid-template-columns: repeat(2, 1fr); }
    .process { grid-template-columns: repeat(2, 1fr); row-gap: 2.4rem; }
    .process::before { display: none; }
    .certs { grid-template-columns: repeat(2, 1fr); }
    .project { grid-column: span 6; }
    .project:last-child:nth-child(odd) { grid-column: span 12; }
}
@media (max-width: 1300px) {
    :root { --line-off: 0px; --step-pad: 36px; }
    .steps .container { padding-inline-start: var(--step-pad); }
}
.menu-btn { display: none; }

@media (max-width: 1200px) {
    .menu-btn {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid var(--line-strong);
        background: rgba(47, 123, 255, .08);
        color: var(--text);
        cursor: pointer;
    }
    .menu-btn span, .menu-btn span::before, .menu-btn span::after {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .3s, background .3s;
        position: relative;
    }
    .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
    .menu-btn span::before { top: -6px; }
    .menu-btn span::after { top: 6px; }
    .nav.open .menu-btn span { background: transparent; }
    .nav.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
    .nav.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

    .nav-links {
        position: absolute;
        top: 72px;
        inset-inline: 16px;
        flex-direction: column;
        gap: 0;
        padding: .5rem;
        border-radius: 18px;
        border: 1px solid var(--line-strong);
        background: var(--bg-2);
        box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
        font-size: 1rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .25s, transform .25s, visibility .25s;
    }
    .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
    .nav.open { background: rgba(5, 7, 13, .9); backdrop-filter: blur(14px); border-color: var(--line); }
    .nav-links a { padding: .85rem 1rem; border-radius: 12px; }
    .nav-links a:hover, .nav-links a.active { background: rgba(47, 123, 255, .1); }
    .nav-links a::after { display: none; }
}
@media (max-width: 900px) {
    .hero-inner, .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .code-card, .js .code-card.reveal.in { transform: none; }
    .js .code-card.reveal { transform: translateY(28px); }
    .projects { grid-template-columns: 1fr; }
    .project, .project.featured, .project:nth-child(2), .project:last-child:nth-child(odd) { grid-column: auto; }
    .xp { grid-template-columns: 1fr; gap: 1rem; }
    .certs { grid-template-columns: 1fr; }
    .step { padding: 90px 0; }
    .step-head { gap: 1rem; margin-bottom: 2.4rem; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .skill-grid, .process { grid-template-columns: 1fr; }
    .card { padding: 1.5rem; }
    .about-text p { font-size: 1.05rem; }
    .fact strong { font-size: 1.8rem; }
    .contact-card { padding: 3.5rem 1.25rem; }
    .btn-lg { font-size: .9rem; padding: .9rem 1.4rem; }
    .scroll-hint { display: none; }
    .nav-end .btn-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}
