/* ==========================================================================
   Mehrbodjavadi – Premium Persian Portfolio
   css/style.css
   ========================================================================== */

/* ---------- CSS VARIABLES / THEMES ---------- */
:root {
    /* Dark theme (default) */
    --bg: #070b16;
    --bg-2: #0a1122;
    --bg-3: #0e162b;
    --surface: rgba(18, 27, 48, 0.72);
    --surface-solid: #111a2e;
    --border: rgba(212, 175, 55, 0.22);
    --border-strong: rgba(212, 175, 55, 0.55);
    --text: #eef2f9;
    --text-muted: #9aa7bd;
    --gold: #d4af37;
    --gold-light: #f5d97a;
    --gold-dark: #b8860b;
    --royal-blue: #2a4d9b;
    --royal-blue-light: #4f7bd6;
    --glow: rgba(212, 175, 55, 0.35);
    --glow-blue: rgba(79, 123, 214, 0.30);
    --header-bg: rgba(7, 11, 22, 0.82);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
    --font-fa: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    --font-en: 'Outfit', 'Vazirmatn', sans-serif;
    --radius: 20px;
    --radius-sm: 14px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
    --bg: #f6f1e4;
    --bg-2: #efe7d4;
    --bg-3: #e9dfc8;
    --surface: rgba(255, 252, 244, 0.80);
    --surface-solid: #fffcf4;
    --border: rgba(42, 77, 155, 0.20);
    --border-strong: rgba(42, 77, 155, 0.50);
    --text: #14203a;
    --text-muted: #4c5a73;
    --gold: #b8860b;
    --gold-light: #d4af37;
    --gold-dark: #8a6508;
    --royal-blue: #1e3a7b;
    --royal-blue-light: #2a4d9b;
    --glow: rgba(184, 134, 11, 0.25);
    --glow-blue: rgba(42, 77, 155, 0.20);
    --header-bg: rgba(246, 241, 228, 0.85);
    --shadow: 0 22px 50px rgba(42, 77, 155, 0.12);
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-fa);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background .5s var(--ease), color .5s var(--ease);
    background-image:
        radial-gradient(ellipse at 15% 0%, rgba(42, 77, 155, 0.16), transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(212, 175, 55, 0.08), transparent 55%);
    background-attachment: fixed;
}

html[dir="ltr"] body {
    font-family: var(--font-en);
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: min(1180px, 92%);
    margin-inline: auto;
}

/* ---------- CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar {
    width: 11px;
}

::-webkit-scrollbar-track {
    background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--gold), var(--gold-dark));
    border-radius: 10px;
    border: 2px solid var(--bg-2);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

html {
    scrollbar-color: var(--gold) var(--bg-2);
    scrollbar-width: thin;
}

/* ---------- SELECTION ---------- */
::selection {
    background: var(--gold);
    color: #070b16;
}

/* ---------- LOADER ---------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: radial-gradient(circle at 50% 40%, #0c1528, #070b16 75%);
    transition: opacity .7s var(--ease), visibility .7s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-persian {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    color: var(--gold);
}

.loader-col {
    width: 9px;
    height: 46px;
    background: linear-gradient(var(--gold-light), var(--gold-dark));
    border-radius: 6px 6px 2px 2px;
    animation: colPulse 1.3s ease-in-out infinite alternate;
}

.loader-col:last-child {
    animation-delay: .35s;
}

.loader-emblem {
    font-size: 2.1rem;
    color: var(--gold-light);
    text-shadow: 0 0 22px var(--glow);
    animation: emblemFloat 1.6s ease-in-out infinite alternate;
}

.loader-text {
    font-family: var(--font-en);
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold-light);
    font-size: 1.05rem;
    text-transform: uppercase;
}

.loader-bar {
    width: 180px;
    height: 3px;
    border-radius: 3px;
    background: rgba(212, 175, 55, 0.18);
    overflow: hidden;
}

.loader-bar span {
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    animation: barSlide 1.2s ease-in-out infinite;
}

@keyframes colPulse {
    from {
        transform: scaleY(.75);
        opacity: .6;
    }

    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes emblemFloat {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-7px);
    }
}

@keyframes barSlide {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}

/* ---------- PARTICLE CANVAS ---------- */
.particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .85;
}

/* ---------- HEADER ---------- */
.site-header {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background .45s var(--ease), border-color .45s, transform .4s var(--ease);
}

.site-header.scrolled {
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-block: 14px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    border: 1px solid var(--border-strong);
    background: linear-gradient(145deg, rgba(212, 175, 55, .14), rgba(42, 77, 155, .12));
    color: var(--gold-light);
    box-shadow: 0 0 20px rgba(212, 175, 55, .18), inset 0 0 12px rgba(212, 175, 55, .10);
    animation: logoGlow 3.2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from {
        box-shadow: 0 0 14px rgba(212, 175, 55, .14), inset 0 0 10px rgba(212, 175, 55, .08);
    }

    to {
        box-shadow: 0 0 30px rgba(212, 175, 55, .34), inset 0 0 16px rgba(212, 175, 55, .16);
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.16rem;
    letter-spacing: .5px;
    background: linear-gradient(100deg, var(--gold-dark), var(--gold-light), var(--gold), var(--gold-light), var(--gold-dark));
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 5s linear infinite;
}

@keyframes goldShine {
    to {
        background-position: 220% center;
    }
}

.logo-sub {
    font-size: .68rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: .3px;
}

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: .93rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .3s var(--ease), background .3s;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 3px;
    inset-inline: 16px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .35s var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-light);
    background: rgba(212, 175, 55, .07);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn,
.lang-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--gold);
    font-size: 1rem;
    font-weight: 700;
    transition: all .3s var(--ease);
}

.lang-btn {
    width: auto;
    min-width: 48px;
    padding-inline: 12px;
    font-family: var(--font-en);
    font-size: .85rem;
}

.icon-btn:hover,
.lang-btn:hover {
    border-color: var(--border-strong);
    color: var(--gold-light);
    box-shadow: 0 0 18px var(--glow);
    transform: translateY(-2px);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.hamburger span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
    transition: all .35s var(--ease);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- SECTIONS ---------- */
.section {
    position: relative;
    z-index: 2;
    padding-block: 120px;
}

.section-head {
    text-align: center;
    margin-bottom: 58px;
}

.section-kicker {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: .85;
}

.section-title {
    font-size: clamp(1.9rem, 4.6vw, 2.9rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.5px;
}

.section-line {
    display: block;
    width: 90px;
    height: 2px;
    margin: 18px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    position: relative;
}

.section-line::after {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gold-light);
    font-size: .75rem;
    background: var(--bg);
    padding-inline: 8px;
}

/* ---------- HERO ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 90px;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    text-align: center;
    z-index: 3;
}

.hero-bg-ornaments {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.ornament {
    position: absolute;
    border: 1px solid var(--border);
    border-radius: 50%;
    opacity: .5;
    animation: orbit 22s linear infinite;
}

.orn-1 {
    width: 420px;
    height: 420px;
    top: -80px;
    inset-inline-start: -120px;
    border-style: dashed;
}

.orn-2 {
    width: 260px;
    height: 260px;
    bottom: -60px;
    inset-inline-end: -60px;
    animation-direction: reverse;
    border-color: var(--border-strong);
}

.orn-3 {
    width: 140px;
    height: 140px;
    top: 30%;
    inset-inline-end: 12%;
    border-style: dotted;
}

@keyframes orbit {
    to {
        transform: rotate(360deg);
    }
}

.achaemenid-arch {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(760px, 90%);
    height: 46vh;
    border: 1px solid rgba(212, 175, 55, .15);
    border-bottom: none;
    border-radius: 380px 380px 0 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(42, 77, 155, .20), transparent 70%);
}

.achaemenid-arch::before,
.achaemenid-arch::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 12px;
    height: 68%;
    background: linear-gradient(var(--border-strong), transparent);
    opacity: .4;
}

.achaemenid-arch::before {
    inset-inline-start: 4%;
}

.achaemenid-arch::after {
    inset-inline-end: 4%;
}

.hero-kicker {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 18px;
}

.hero-title {
    margin-bottom: 12px;
}

.hero-glow {
    display: inline-block;
    font-family: var(--font-en);
    font-size: clamp(2.8rem, 9vw, 6.2rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.05;
    background: linear-gradient(115deg, var(--gold-dark) 0%, var(--gold-light) 30%, #fff8e1 50%, var(--gold-light) 70%, var(--gold-dark) 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 6s linear infinite;
    filter: drop-shadow(0 0 26px rgba(212, 175, 55, .45));
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.6vw, 1.45rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
}

.hero-desc {
    max-width: 620px;
    margin: 0 auto 38px;
    color: var(--text-muted);
    font-size: clamp(.95rem, 2vw, 1.1rem);
}

/* Buttons */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 34px;
    border-radius: 14px;
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: .3px;
    transition: all .35s var(--ease);
    overflow: hidden;
}

.btn-gold {
    color: #131313;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    box-shadow: 0 10px 30px rgba(212, 175, 55, .30), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.btn-gold:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(212, 175, 55, .48);
}

.btn-gold::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .55), transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s var(--ease);
}

.btn-gold:hover::after {
    transform: translateX(120%);
}

.btn-outline {
    color: var(--gold);
    border: 1px solid var(--border-strong);
    background: rgba(212, 175, 55, .05);
}

.btn-outline:hover {
    transform: translateY(-4px);
    background: rgba(212, 175, 55, .12);
    box-shadow: 0 0 26px var(--glow);
    color: var(--gold-light);
}

/* Hero scroll mouse */
.hero-scroll {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--border-strong);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 8px;
    border-radius: 4px;
    background: var(--gold);
    animation: wheelDrop 1.6s ease-in-out infinite;
}

@keyframes wheelDrop {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    70% {
        transform: translateY(12px);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* ---------- ABOUT ---------- */
.about-inner {
    max-width: 1080px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 54px;
    align-items: center;
}

.about-text .typewriter {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    min-height: 7em;
    margin-bottom: 22px;
    border-inline-start: 2px solid var(--gold);
    padding-inline-start: 18px;
    line-height: 2;
}

.typewriter .cursor {
    display: inline-block;
    width: 9px;
    height: 1.15em;
    background: var(--gold-light);
    margin-inline-start: 3px;
    vertical-align: text-bottom;
    animation: blink .85s steps(2) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.about-para {
    color: var(--text-muted);
    margin-bottom: 26px;
    line-height: 2;
}

.about-points {
    display: grid;
    gap: 13px;
}

.about-points li {
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--text);
    font-size: .95rem;
}

.about-points i {
    color: var(--gold);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

/* Persian ornament card */
.persian-ornament-card {
    position: relative;
    padding: 34px 26px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
    text-align: center;
    overflow: hidden;
}

.persian-ornament-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, .16), transparent 65%);
    pointer-events: none;
}

.ornament-svg-wrap {
    animation: slowSpin 26s linear infinite;
}

@keyframes slowSpin {
    to {
        transform: rotate(360deg);
    }
}

.persian-star {
    width: 100%;
    max-width: 250px;
    margin-inline: auto;
    filter: drop-shadow(0 0 18px rgba(212, 175, 55, .35));
}

.card-caption {
    margin-top: 18px;
    font-weight: 700;
    font-size: .95rem;
    color: var(--gold);
    letter-spacing: 1px;
}

/* ---------- SKILLS ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.skill-card {
    position: relative;
    padding: 42px 24px 34px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(6px);
    text-align: center;
    overflow: hidden;
    transition: transform .45s var(--ease), border-color .45s, box-shadow .45s;
}

.skill-glow {
    position: absolute;
    inset: -40%;
    opacity: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent), transparent 55%);
    transition: opacity .45s var(--ease);
    pointer-events: none;
}

.skill-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 26px 56px rgba(0, 0, 0, .45), 0 0 34px color-mix(in srgb, var(--accent) 35%, transparent);
}

.skill-card:hover .skill-glow {
    opacity: .22;
}

.skill-icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    font-size: 2.5rem;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    transition: transform .45s var(--ease), box-shadow .45s;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(-4deg);
    box-shadow: 0 0 32px color-mix(in srgb, var(--accent) 55%, transparent);
}

.skill-name {
    font-family: var(--font-en);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.skill-desc {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---------- CONTACT / SOCIAL ---------- */
.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.social-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 30px 26px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(6px);
    overflow: hidden;
    transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}

.social-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle at 20% 20%, var(--social), transparent 60%);
    transition: opacity .4s var(--ease);
    pointer-events: none;
}

.social-card:hover {
    transform: translateY(-8px);
    border-color: var(--social);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .4), 0 0 28px color-mix(in srgb, var(--social) 40%, transparent);
}

.social-card:hover .social-glow {
    opacity: .18;
}

.social-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.65rem;
    color: var(--social);
    border: 1px solid color-mix(in srgb, var(--social) 45%, transparent);
    background: color-mix(in srgb, var(--social) 12%, transparent);
    transition: transform .4s var(--ease);
}

.social-card:hover .social-icon {
    transform: scale(1.08);
}

.social-info h3 {
    font-family: var(--font-en);
    font-size: 1.05rem;
    font-weight: 700;
}

.social-user {
    font-size: .85rem;
    color: var(--text-muted);
    direction: ltr;
    text-align: start;
}

html[dir="rtl"] .social-user {
    text-align: right;
}

.social-arrow {
    margin-inline-start: auto;
    color: var(--text-muted);
    font-size: .95rem;
    transition: transform .4s var(--ease), color .4s;
}

.social-card:hover .social-arrow {
    transform: translate(-4px, -4px);
    color: var(--gold-light);
}

/* ---------- FOOTER ---------- */
.site-footer {
    position: relative;
    z-index: 2;
    margin-top: 60px;
    padding-top: 70px;
    border-top: 1px solid var(--border);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, .10), transparent 60%),
        var(--bg-2);
    overflow: hidden;
}

.footer-ornament {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 95%);
    height: 100%;
    background-image:
        linear-gradient(90deg, transparent 49.6%, var(--border) 49.6%, var(--border) 50.4%, transparent 50.4%),
        radial-gradient(circle at 50% -30%, transparent 68%, var(--border) 68.4%, transparent 69%);
    opacity: .25;
    pointer-events: none;
}

.footer-inner {
    position: relative;
    z-index: 2;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding-bottom: 42px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-mark {
    width: 42px;
    height: 42px;
}

.footer-brand-name {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(100deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 5s linear infinite;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.footer-nav a {
    font-size: .92rem;
    color: var(--text-muted);
    transition: color .3s;
}

.footer-nav a:hover {
    color: var(--gold-light);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--gold);
    font-size: 1rem;
    transition: all .3s var(--ease);
}

.footer-social a:hover {
    color: var(--gold-light);
    border-color: var(--border-strong);
    box-shadow: 0 0 18px var(--glow);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-block: 30px;
    display: grid;
    gap: 6px;
}

.footer-dev {
    font-weight: 600;
    color: var(--gold);
    font-size: .95rem;
}

.footer-copy {
    font-family: var(--font-en);
    font-size: .8rem;
    color: var(--text-muted);
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    will-change: opacity, transform;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.skills-grid .reveal:nth-child(2) {
    transition-delay: .1s;
}

.skills-grid .reveal:nth-child(3) {
    transition-delay: .2s;
}

.skills-grid .reveal:nth-child(4) {
    transition-delay: .3s;
}

.social-grid .reveal:nth-child(2) {
    transition-delay: .12s;
}

.social-grid .reveal:nth-child(3) {
    transition-delay: .24s;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-visual {
        order: -1;
    }

    .persian-star {
        max-width: 200px;
    }
}

@media (max-width: 860px) {
    .section {
        padding-block: 88px;
    }

    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        inset-inline: 0;
        top: 76px;
        background: var(--header-bg);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 18px 6%;
        transform: translateY(-130%);
        opacity: 0;
        visibility: hidden;
        transition: transform .45s var(--ease), opacity .35s, visibility .35s;
        z-index: 999;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-link {
        padding: 13px 18px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .nav-link::after {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: 130px;
        padding-bottom: 70px;
    }

    .hero-scroll {
        display: none;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .header-inner {
        gap: 10px;
    }

    .logo-mark {
        width: 40px;
        height: 40px;
    }

    .logo-name {
        font-size: 1rem;
    }

    .logo-sub {
        font-size: .6rem;
    }

    .icon-btn,
    .lang-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .lang-btn {
        min-width: 42px;
        font-size: .78rem;
    }

    .hamburger {
        width: 38px;
        height: 38px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .social-card {
        padding: 24px 20px;
    }

    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .about-text .typewriter {
        font-size: .95rem;
        padding-inline-start: 14px;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}