/* =================================================================
   Mayank Singla — Portfolio
   Gold on Black · Vanilla CSS
   ================================================================= */

/* ---------- Tokens ---------- */
:root {
    --bg: #0a0a0a;
    --bg-2: #101010;
    --panel: #141414;
    --panel-2: #1a1a1a;
    --line: rgba(212, 175, 55, 0.16);
    --line-soft: rgba(255, 255, 255, 0.07);

    --gold: #d4af37;
    --gold-bright: #ffc800;
    --gold-deep: #a8842a;
    --gold-grad: linear-gradient(135deg, #f5d469 0%, #d4af37 45%, #b8902f 100%);

    --text: #ece9e2;
    --muted: #9a958c;
    --muted-2: #6f6a62;

    --radius: 16px;
    --radius-lg: 22px;
    --maxw: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    --glow: 0 0 40px -8px rgba(212, 175, 55, 0.45);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background ambience */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 600px at 80% -5%, rgba(212, 175, 55, 0.10), transparent 60%),
        radial-gradient(800px 700px at -10% 30%, rgba(212, 175, 55, 0.06), transparent 55%),
        radial-gradient(700px 700px at 50% 110%, rgba(212, 175, 55, 0.07), transparent 60%);
    pointer-events: none;
}
/* Subtle grain */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.035;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: "Space Grotesk", sans-serif; font-weight: 600; line-height: 1.1; margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.text-gold {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand { display: inline-flex; align-items: center; justify-content: center; }
.brand svg { display: block; }

::selection { background: rgba(212, 175, 55, 0.3); color: #fff; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* =================================================================
   Preloader
   ================================================================= */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-content: center;
    gap: 22px;
    background: var(--bg);
    transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__ring {
    position: relative;
    display: grid;
    place-content: center;
    width: 120px;
    height: 120px;
}
.preloader__ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(212, 175, 55, 0.14);
}
.preloader__ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--gold);
    box-shadow: 0 0 14px -2px rgba(212, 175, 55, 0.5);
    animation: spin 0.9s linear infinite;
}
.preloader__mark {
    width: 60px;
    height: 60px;
    object-fit: contain;
    animation: pulse 1.6s var(--ease) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* =================================================================
   Cursor glow + scroll progress
   ================================================================= */
.cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 420px; height: 420px;
    margin: -210px 0 0 -210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
    will-change: transform;
}
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--gold-grad);
    z-index: 1000;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.7);
}

/* =================================================================
   Buttons
   ================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s var(--ease), box-shadow 0.3s, background 0.3s, color 0.3s;
    will-change: transform;
}
.btn i { width: 18px; height: 18px; }
.btn--gold {
    background: var(--gold-grad);
    color: #1a1206;
    box-shadow: var(--glow);
}
.btn--gold:hover { box-shadow: 0 0 50px -6px rgba(212, 175, 55, 0.7); }
.btn--ghost {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--line);
    color: var(--text);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(212, 175, 55, 0.06); }

/* =================================================================
   Navigation
   ================================================================= */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    transition: background 0.4s, border-color 0.4s, padding 0.4s;
    border-bottom: 1px solid transparent;
    padding: 8px 0;
}
.nav.is-scrolled {
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand-mark {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}
.nav__brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.05rem; }

.nav__links { display: flex; gap: 4px; }
.nav__link {
    position: relative;
    padding: 8px 14px;
    font-size: 0.92rem;
    color: var(--muted);
    border-radius: 99px;
    transition: color 0.25s;
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 2px;
    background: var(--gold-grad);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--gold-bright); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cv { padding: 9px 18px; }
.nav__cv i { width: 16px; height: 16px; }

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px; height: 42px;
    align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
}
.nav__toggle span {
    width: 20px; height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s;
}
.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); }

/* =================================================================
   Hero
   ================================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 70vw; height: 70vw;
    max-width: 900px; max-height: 900px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.10), transparent 62%);
    z-index: 0;
    pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; }

.hero__greeting {
    display: flex; align-items: center; gap: 12px;
    color: var(--gold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 18px;
}
.hero__greeting-line { display: inline-block; width: 42px; height: 2px; background: var(--gold-grad); }
.hero__name {
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.hero__role {
    font-size: clamp(1.3rem, 3.6vw, 2.2rem);
    font-weight: 500;
    color: var(--muted);
    min-height: 1.4em;
    margin-bottom: 22px;
}
.hero__role-static { color: var(--muted); }
.hero__role-rotator { color: var(--gold-bright); font-weight: 600; }
.hero__role-rotator::after {
    content: "";
    display: inline-block;
    width: 2px; height: 1em;
    margin-left: 3px;
    vertical-align: -0.12em;
    background: var(--gold-bright);
    animation: caret 0.9s step-end infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero__tagline { max-width: 560px; color: var(--muted); font-size: 1.08rem; margin: 0 0 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero__social { display: flex; gap: 12px; }
.hero__social a {
    display: grid; place-content: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.hero__social a i, .hero__social a .brand { display: inline-flex; }
.hero__social a i, .hero__social a svg { width: 19px; height: 19px; }
.hero__social a:hover {
    color: var(--gold-bright);
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

.hero__scroll {
    position: absolute;
    bottom: 28px; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--muted-2);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}
.hero__scroll-mouse {
    width: 24px; height: 38px;
    border: 2px solid var(--line);
    border-radius: 14px;
    position: relative;
}
.hero__scroll-mouse::before {
    content: "";
    position: absolute;
    top: 7px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 8px;
    border-radius: 4px;
    background: var(--gold);
    animation: scrollDot 1.6s var(--ease) infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 14px); } 100% { opacity: 0; } }

/* =================================================================
   Section scaffolding
   ================================================================= */
.section { padding: 100px 0; position: relative; }
.section__head { margin-bottom: 50px; }
.section__eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.section__title { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
.section__lead { color: var(--muted); margin-top: 14px; max-width: 520px; }

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

/* =================================================================
   About
   ================================================================= */
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: stretch; }
.about__photo { position: relative; min-height: 460px; }
.about__photo-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.10), rgba(10, 10, 10, 0));
    box-shadow: var(--shadow);
    line-height: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about__photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.35);
}
.about__photo-frame img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.6) translateY(4%);
    transform-origin: center center;
    filter: contrast(1.02) saturate(1.02);
}
.about__heading { font-size: 1.5rem; line-height: 1.35; margin-bottom: 18px; }
.about__body p { color: var(--muted); margin: 0 0 16px; }
.about__body strong { color: var(--text); font-weight: 600; }

.about__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 28px 0;
    padding: 24px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}
.about__facts li { display: flex; align-items: center; gap: 13px; }
.about__facts i {
    flex-shrink: 0;
    width: 40px; height: 40px;
    padding: 10px;
    border-radius: 11px;
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--line);
}
.about__facts span { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.about__facts strong, .about__facts a { font-size: 0.95rem; color: var(--text); font-weight: 500; word-break: break-word; }
.about__facts a:hover { color: var(--gold-bright); }

.about__languages h4 { font-size: 1.1rem; margin-bottom: 16px; }
.about__lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lang-card {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    transition: border-color 0.3s, transform 0.3s var(--ease);
}
.lang-card strong { display: block; color: var(--gold-bright); font-family: "Space Grotesk", sans-serif; margin-bottom: 4px; }
.lang-card span { font-size: 0.82rem; color: var(--muted); }

/* =================================================================
   Cards — shared tilt hover
   ================================================================= */
[data-tilt] { transform-style: preserve-3d; will-change: transform; }
.lang-card:hover, .edu-card:hover, .skill-cat:hover, .contact-card:hover { border-color: var(--gold); }

/* =================================================================
   Education
   ================================================================= */
.edu-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.edu-card {
    position: relative;
    padding: 30px 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.edu-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gold-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.edu-card:hover::before { transform: scaleX(1); }
.edu-card:hover { box-shadow: var(--shadow); }
.edu-card__year {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 14px;
}
.edu-card__body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.edu-card__school { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }
.edu-card__score {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--line);
    color: var(--gold-bright);
    font-size: 0.85rem;
    font-weight: 600;
}
.edu-card__score i { width: 15px; height: 15px; }

/* =================================================================
   Experience timeline
   ================================================================= */
.xp-timeline { position: relative; padding-left: 38px; }
.xp-timeline::before {
    content: "";
    position: absolute;
    left: 9px; top: 6px; bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--gold), transparent);
}
.xp-item { position: relative; margin-bottom: 30px; }
.xp-item__dot {
    position: absolute;
    left: -38px; top: 26px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}
.xp-item__dot::after {
    content: "";
    position: absolute; inset: 4px;
    border-radius: 50%;
    background: var(--gold-grad);
}
.xp-item__card {
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft);
    transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.xp-item__card:hover { border-color: var(--line); box-shadow: var(--shadow); }
.xp-item__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.xp-item__role { font-size: 1.3rem; }
.xp-item__role span { color: var(--muted); font-weight: 400; font-size: 1rem; }
.xp-item__company { color: var(--gold-bright); font-size: 0.92rem; margin: 6px 0 0; font-weight: 500; }
.xp-item__date {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-soft);
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}
.xp-item__date--now { background: rgba(212, 175, 55, 0.1); border-color: var(--line); color: var(--gold-bright); }
.xp-item__points { color: var(--muted); font-size: 0.95rem; }
.xp-item__points > li { position: relative; padding-left: 22px; margin-bottom: 11px; }
.xp-item__points > li::before {
    content: "";
    position: absolute; left: 0; top: 11px;
    width: 7px; height: 7px;
    border-radius: 2px;
    background: var(--gold);
    transform: rotate(45deg);
}
.xp-item__points ul { margin: 10px 0 4px; }
.xp-item__points ul li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: 0.9rem; }
.xp-item__points ul li::before {
    content: "";
    position: absolute; left: 2px; top: 9px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--muted-2);
}

/* Experience document links */
.xp-item__docs {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.xp-item__docs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 99px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid var(--line);
    color: var(--gold-bright);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s var(--ease), border-color 0.3s;
}
.xp-item__docs a i:first-child { width: 15px; height: 15px; }
.xp-item__docs a i:last-child { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.xp-item__docs a:hover { background: rgba(212, 175, 55, 0.12); border-color: var(--gold); transform: translateY(-2px); }
.xp-item__docs a:hover i:last-child { transform: translate(2px, -2px); }

/* Awards / Achievements */
.awards { margin-top: 36px; }
.awards__head { margin-bottom: 24px; }
.awards__label { font-size: 0.74rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.awards__title { font-size: 1.5rem; margin: 8px 0 8px; }
.awards__sub { color: var(--muted); margin: 0; max-width: 640px; font-size: 0.95rem; }

.award-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.award-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 26px 22px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(420px 150px at 50% 0%, rgba(212, 175, 55, 0.12), transparent 70%),
        var(--panel);
    border: 1px solid var(--line-soft);
    color: inherit;
    transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.award-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.award-card--annual { border-color: var(--line); }
.award-card__icon {
    display: grid; place-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--gold-grad);
    color: #1a1206;
    box-shadow: var(--glow);
}
.award-card__icon i { width: 24px; height: 24px; }
.award-card__body h4 { font-size: 1.05rem; margin: 0 0 5px; }
.award-card__body p { color: var(--gold-bright); margin: 0; font-size: 0.85rem; font-weight: 500; }
.award-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-top: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.3s, gap 0.3s var(--ease);
}
.award-card__cta i { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.award-card:hover .award-card__cta { color: var(--gold-bright); }
.award-card:hover .award-card__cta i { transform: translate(2px, -2px); }

/* =================================================================
   Projects
   ================================================================= */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 34px 30px 30px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(212, 175, 55, 0.12), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.project-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.project-card:hover::after { opacity: 1; }
.project-card__num {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold-deep);
    letter-spacing: 0.1em;
    margin-bottom: 18px;
}
.project-card__title { font-size: 1.5rem; margin-bottom: 12px; }
.project-card__desc { color: var(--muted); font-size: 0.92rem; margin: 0 0 18px; min-height: 60px; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.project-card__tags span {
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.76rem;
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--line);
}
.project-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
}
.project-card__links a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-soft);
    transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.3s, transform 0.25s var(--ease);
}
.project-card__links a i, .project-card__links a svg { width: 16px; height: 16px; }
.project-card__links a:hover {
    color: var(--gold-bright);
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}
.project-card__links a.is-primary {
    color: #1a1206;
    background: var(--gold-grad);
    border-color: transparent;
}
.project-card__links a.is-primary:hover {
    color: #1a1206;
    box-shadow: var(--glow);
}

/* =================================================================
   Skills
   ================================================================= */
/* Skill-domain marquee */
.skills__marquee {
    position: relative;
    overflow: hidden;
    margin-bottom: 36px;
    padding: 10px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.skills__marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 34s linear infinite;
}
.skills__marquee:hover .skills__marquee-track { animation-play-state: paused; }
.skills__marquee-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 12px;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 99px;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease), background 0.3s;
    cursor: default;
}
.chip:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-3px); background: rgba(212, 175, 55, 0.06); }

.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-cat {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft);
    transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.skill-cat:hover { box-shadow: var(--shadow); }
.skill-cat__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.skill-cat__head i {
    width: 42px; height: 42px;
    padding: 10px;
    border-radius: 12px;
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--line);
}
.skill-cat__head h3 { font-size: 1.1rem; }
.skill-cat p { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* =================================================================
   Contact
   ================================================================= */
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 50px; }
.contact-card {
    text-align: center;
    padding: 40px 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft);
    transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.contact-card:hover { box-shadow: var(--shadow); }
.contact-card__icon {
    display: grid; place-content: center;
    width: 60px; height: 60px;
    margin: 0 auto 18px;
    border-radius: 16px;
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--line);
    transition: background 0.3s, transform 0.3s var(--ease);
}
.contact-card:hover .contact-card__icon { background: var(--gold-grad); color: #1a1206; transform: translateY(-4px); box-shadow: var(--glow); }
.contact-card__icon i { width: 26px; height: 26px; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 7px; }
.contact-card p { color: var(--muted); margin: 0; font-size: 0.9rem; word-break: break-word; }

.contact__social { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.contact__social a {
    display: grid; place-content: center;
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.contact__social a .brand { display: inline-flex; }
.contact__social a i, .contact__social a svg { width: 20px; height: 20px; }
.contact__social a:hover { color: var(--gold-bright); border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--glow); }

/* =================================================================
   Footer + back to top
   ================================================================= */
.footer { border-top: 1px solid var(--line-soft); padding: 40px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__brand { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.15rem; }
.footer__copy { color: var(--muted-2); font-size: 0.88rem; margin: 0; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { color: var(--muted); font-size: 0.88rem; transition: color 0.25s; }
.footer__links a:hover { color: var(--gold-bright); }

.back-to-top {
    position: fixed;
    bottom: 26px; right: 26px;
    z-index: 800;
    display: grid; place-content: center;
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--gold-grad);
    color: #1a1206;
    box-shadow: var(--glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top i { width: 22px; height: 22px; }

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 1024px) {
    .about__grid { grid-template-columns: 1fr; gap: 40px; }
    .about__photo { min-height: 0; }
    .about__photo-frame { max-width: 360px; margin-inline: auto; height: auto; aspect-ratio: 4 / 5; }
    .edu-timeline, .project-grid, .skills__grid, .contact__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .nav__cv span { display: none; }
    .nav__cv { padding: 9px 11px; }
    .nav__links {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(78vw, 320px);
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 40px;
        background: rgba(12, 12, 12, 0.96);
        backdrop-filter: blur(18px);
        border-left: 1px solid var(--line);
        transform: translateX(100%);
        transition: transform 0.4s var(--ease);
        z-index: 950;
    }
    .nav__links.is-open { transform: translateX(0); }
    .nav__link { font-size: 1.1rem; padding: 12px 16px; }
    .nav__link::after { display: none; }
    .nav__toggle { display: flex; z-index: 960; }

    .section { padding: 90px 0; }
    .section__head { margin-bottom: 44px; }
    .edu-timeline, .project-grid, .skills__grid, .contact__grid, .about__facts, .about__lang-grid { grid-template-columns: 1fr; }
    .about__lang-grid { grid-template-columns: repeat(3, 1fr); }
    .cursor-glow { display: none; }
    .xp-item__card { padding: 22px; }
    .footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 440px) {
    .container { padding-inline: 18px; }
    .hero__actions { width: 100%; }
    .hero__actions .btn { flex: 1; justify-content: center; }
    .about__lang-grid { grid-template-columns: 1fr; }
}

/* =================================================================
   Reduced motion
   ================================================================= */
@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; }
    .reveal { opacity: 1; transform: none; }
    .hero__canvas, .cursor-glow { display: none; }
    /* Marquee falls back to a static wrapped row */
    .skills__marquee { -webkit-mask-image: none; mask-image: none; overflow: visible; }
    .skills__marquee-track { animation: none; width: auto; flex-wrap: wrap; }
    .skills__marquee-group { flex-wrap: wrap; }
    .skills__marquee-group[aria-hidden="true"] { display: none; }
}
