/* ==========================================================================
   Muhammad Hassan Gul — Portfolio
   Clean minimal light theme + full dark mode. No dependencies.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    color-scheme: light;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Source Serif 4", "Georgia", serif;

    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --accent: #2563eb;
    --accent-2: #7c3aed;
    --accent-3: #0ea5e9;
    --accent-rgb: 37, 99, 235;
    --accent2-rgb: 124, 58, 237;
    --gradient: linear-gradient(120deg, #2563eb 0%, #7c3aed 100%);
    --gradient-soft: linear-gradient(120deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .08));

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, .07);
    --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .18);
    --shadow-accent: 0 12px 34px -10px rgba(37, 99, 235, .45);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    --maxw: 1140px;
    --nav-h: 72px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1220;
    --bg-alt: #0d1526;
    --surface: #111c33;
    --surface-2: #0f172a;
    --text: #e2e8f0;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --border: #1e293b;
    --border-strong: #334155;

    --accent: #60a5fa;
    --accent-2: #a78bfa;
    --accent-3: #38bdf8;
    --accent-rgb: 96, 165, 250;
    --accent2-rgb: 167, 139, 250;
    --gradient: linear-gradient(120deg, #60a5fa 0%, #a78bfa 100%);
    --gradient-soft: linear-gradient(120deg, rgba(96, 165, 250, .1), rgba(167, 139, 250, .1));

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .5);
    --shadow-accent: 0 12px 34px -10px rgba(96, 165, 250, .35);
}

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

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 10px); -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    margin: 0;
    overflow-x: hidden;
    transition: background .4s ease, color .4s ease;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--accent-2); }
p { margin: 0 0 1rem; }
em { font-family: var(--font-display); font-style: italic; font-weight: 500; }
::selection { background: rgba(var(--accent-rgb), .22); color: var(--text); }

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

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 2px solid var(--bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Progress bar ---------- */
.progress-bar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: var(--gradient); z-index: 1000;
    transition: width .1s linear;
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0; pointer-events: none; z-index: 2000;
    border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor-dot { width: 7px; height: 7px; background: var(--accent); }
.cursor-ring {
    width: 36px; height: 36px; border: 1.5px solid rgba(var(--accent-rgb), .5);
    transition: width .25s ease, height .25s ease, border-color .25s ease;
}
.cursor-ring.is-active { width: 54px; height: 54px; border-color: rgba(var(--accent2-rgb), .7); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: .95rem;
    border: 1px solid transparent; cursor: pointer; transition: all .3s cubic-bezier(.22, .61, .36, 1);
    font-family: var(--font-body); position: relative; overflow: hidden; line-height: 1;
}
.btn svg { transition: transform .3s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
    background: var(--gradient); color: #fff;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -10px rgba(var(--accent-rgb), .55); color: #fff; }
.btn-primary::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .7s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost {
    background: transparent; border-color: var(--border-strong); color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: .88rem; }
.btn-block { width: 100%; }

/* ---------- Badges / tags ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 16px; border-radius: 999px; font-size: .83rem; font-weight: 600;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
    box-shadow: var(--shadow-sm);
}
.availability .pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #22c55e; position: relative; flex-shrink: 0;
}
.availability .pulse-dot::after {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    background: rgba(34, 197, 94, .35); animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
    0% { transform: scale(.6); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}
.tag {
    display: inline-block; padding: 6px 14px; border-radius: 999px;
    background: var(--gradient-soft); border: 1px solid rgba(var(--accent-rgb), .18);
    color: var(--accent); font-size: .82rem; font-weight: 600;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    height: var(--nav-h);
    transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(255, 255, 255, .8); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-color: var(--border); box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .nav.scrolled { background: rgba(11, 18, 32, .78); }
.nav-inner {
    max-width: var(--maxw); margin: 0 auto; height: 100%;
    display: flex; align-items: center; justify-content: space-between; padding: 0 24px; gap: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.logo:hover { color: var(--text); }
.logo-mark {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: var(--gradient); color: #fff; box-shadow: var(--shadow-accent);
}
.logo-dot { color: var(--accent); }
.nav-links { display: flex; list-style: none; gap: 6px; margin: 0; padding: 0; }
.nav-link {
    color: var(--text-2); font-weight: 500; font-size: .92rem; padding: 8px 14px; border-radius: 999px;
    position: relative; transition: color .25s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); background: var(--gradient-soft); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2); cursor: pointer;
    transition: all .3s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(15deg); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

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

/* Mobile menu */
.mobile-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 890;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 20px 24px 30px;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: all .3s cubic-bezier(.22, .61, .36, 1);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu a { padding: 12px 8px; color: var(--text); font-weight: 600; font-size: 1.05rem; border-radius: 10px; }
.mobile-menu a:not(.btn):hover { background: var(--gradient-soft); color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 48px) 0 40px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(to right, rgba(100, 116, 139, .07) 1px, transparent 1px), linear-gradient(to bottom, rgba(100, 116, 139, .07) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.orb-1 { width: 480px; height: 480px; top: -160px; right: -120px; background: radial-gradient(circle, rgba(37, 99, 235, .35), transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
.orb-2 { width: 420px; height: 420px; bottom: -140px; left: -140px; background: radial-gradient(circle, rgba(124, 58, 237, .28), transparent 70%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.08); }
}

.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 60px; position: relative; z-index: 2; }
.hero-name {
    font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -.03em;
    margin: 14px 0 12px; color: var(--text);
}
.hero-name .word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-name .word > span {
    display: inline-block; transform: translateY(115%); will-change: transform;
    background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; color: var(--accent); min-height: 1.6em; display: flex; align-items: center; gap: 2px; }
.caret { display: inline-block; width: 2.5px; height: 1.15em; background: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; vertical-align: text-bottom; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { font-size: 1.06rem; color: var(--text-2); max-width: 540px; margin: 20px 0 30px; }
.hero-desc strong { color: var(--text); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-social { display: flex; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.hero-social a {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
    font-size: .86rem; font-weight: 600; transition: all .3s ease; box-shadow: var(--shadow-sm);
}
.hero-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Hero visual */
.hero-visual { position: relative; display: grid; place-items: center; }
.orbit-canvas { position: absolute; width: 420px; height: 420px; }
.profile-card { position: relative; width: min(340px, 78vw); border-radius: var(--radius-lg); overflow: visible; }
.profile-card picture { position: relative; z-index: 2; display: block; border-radius: var(--radius-lg); overflow: hidden; border: 6px solid var(--surface); box-shadow: var(--shadow-lg); aspect-ratio: 1 / 1; }
.profile-card img { width: 100%; height: 100%; object-fit: cover; }
.profile-glow {
    position: absolute; inset: -24px; z-index: 1; border-radius: 50%; filter: blur(50px); opacity: .5;
    background: conic-gradient(from 0deg, rgba(var(--accent-rgb), .5), rgba(var(--accent2-rgb), .4), rgba(var(--accent-rgb), .5));
}

.float-chip {
    position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    animation: floaty 5s ease-in-out infinite;
}
[data-theme="dark"] .float-chip { background: rgba(17, 28, 51, .9); }
.float-chip strong { display: block; font-size: .88rem; color: var(--text); line-height: 1.2; }
.float-chip small { font-size: .74rem; color: var(--text-3); }
.chip-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--gradient-soft); color: var(--accent); flex-shrink: 0; }
.chip-1 { top: 8%; left: -12%; animation-delay: 0s; }
.chip-2 { bottom: 18%; right: -14%; animation-delay: 1.2s; }
.chip-3 { bottom: -4%; left: 2%; animation-delay: 2.2s; }
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Hero stats */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 70px; position: relative; z-index: 2; }
.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px 24px; box-shadow: var(--shadow-sm); transition: all .3s ease; text-align: left;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(var(--accent-rgb), .35); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: .82rem; color: var(--text-3); font-weight: 500; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); position: relative; z-index: 2; }
.marquee-track { display: flex; align-items: center; white-space: nowrap; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { font-weight: 700; font-size: 1rem; color: var(--text-2); letter-spacing: .02em; text-transform: uppercase; margin-right: 26px; }
.marquee-track .sep { color: var(--accent); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scroll-down hint */
.scroll-hint {
    display: none; margin: 54px auto 0; width: 26px; height: 44px;
    border: 2px solid var(--border-strong); border-radius: 999px; position: relative;
}
.scroll-hint span {
    position: absolute; left: 50%; top: 7px; width: 4px; height: 8px;
    background: var(--accent); border-radius: 99px; transform: translateX(-50%);
    animation: scrollwheel 1.8s ease-in-out infinite;
}
@keyframes scrollwheel {
    0% { opacity: 0; top: 6px; }
    30% { opacity: 1; }
    100% { opacity: 0; top: 22px; }
}
@media (min-width: 1024px) { .scroll-hint { display: block; } }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 700px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-tag {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent); padding: 6px 14px; border-radius: 999px; background: var(--gradient-soft);
    border: 1px solid rgba(var(--accent-rgb), .18); margin-bottom: 16px;
}
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; color: var(--text); line-height: 1.15; }
.section-title em { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-sub { color: var(--text-2); font-size: 1.05rem; margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.about-text p { color: var(--text-2); font-size: 1.03rem; }
.about-text p strong { color: var(--text); }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.about-cards { display: grid; gap: 16px; }
.about-card {
    position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px 28px; box-shadow: var(--shadow-sm); transition: all .35s cubic-bezier(.22, .61, .36, 1);
    overflow: hidden;
}
.about-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--gradient); transform: scaleY(0); transform-origin: bottom; transition: transform .4s ease;
}
.about-card:hover { transform: translateX(6px); box-shadow: var(--shadow-md); border-color: rgba(var(--accent-rgb), .35); }
.about-card:hover::before { transform: scaleY(1); }
.about-card-num { position: absolute; top: 20px; right: 24px; font-weight: 800; font-size: 1.4rem; color: var(--border-strong); }
.about-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--text); }
.about-card p { margin: 0; color: var(--text-2); font-size: .94rem; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); transition: all .35s ease; }
.skill-group:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.skill-group-title { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: 1.08rem; color: var(--text); }
.skill-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gradient); color: #fff; flex-shrink: 0; box-shadow: var(--shadow-accent); }
.skill { margin-bottom: 18px; }
.skill:last-child { margin-bottom: 0; }
.skill-info { display: flex; justify-content: space-between; font-size: .86rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.skill-info span:last-child { color: var(--accent); }
.skill-bar { height: 7px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; }
.skill-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--gradient); position: relative; }
.skill-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .4) 50%, transparent 70%); transform: translateX(-100%); animation: shimmer 2.4s ease infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* No-JS fallback widths */
.skill[data-level="78"] i { width: 78%; } .skill[data-level="82"] i { width: 82%; }
.skill[data-level="85"] i { width: 85%; } .skill[data-level="86"] i { width: 86%; }
.skill[data-level="88"] i { width: 88%; } .skill[data-level="90"] i { width: 90%; }
.skill[data-level="92"] i { width: 92%; } .skill[data-level="95"] i { width: 95%; }
.skill[data-level="96"] i { width: 96%; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 4px; bottom: 4px; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent-2)); }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -40px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 6px solid var(--accent); box-shadow: 0 0 0 4px var(--bg); z-index: 1; }
.timeline-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); transition: all .35s ease; }
.timeline-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(var(--accent-rgb), .35); }
.timeline-period { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--gradient-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.timeline-card h3 { margin: 0 0 4px; font-size: 1.22rem; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.timeline-type { font-size: .7rem; font-weight: 700; color: var(--accent-2); border: 1px solid rgba(var(--accent2-rgb), .35); padding: 3px 10px; border-radius: 999px; }
.timeline-card h4 { margin: 0 0 14px; font-size: .95rem; font-weight: 600; color: var(--text-2); }
.timeline-loc { font-weight: 500; color: var(--text-3); }
.timeline-card ul { margin: 0 0 16px; padding-left: 20px; color: var(--text-2); font-size: .95rem; }
.timeline-card li { margin-bottom: 8px; }
.timeline-card li strong { color: var(--text); }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-tags span { font-size: .76rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-2); }

/* ---------- Projects ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: all .4s cubic-bezier(.22, .61, .36, 1); }
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(var(--accent-rgb), .4); }
.project-card.featured { grid-column: 1 / -1; flex-direction: row; }
.project-visual { position: relative; background: var(--gradient-soft); padding: 32px; display: grid; place-items: center; min-height: 200px; overflow: hidden; }
.project-card.featured .project-visual { flex: 1; }
.project-card:not(.featured) .project-visual { border-bottom: 1px solid var(--border); }
.project-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .35), transparent 70%); filter: blur(30px); }
.project-art { position: relative; width: 100%; max-width: 320px; height: auto; transition: transform .5s cubic-bezier(.22, .61, .36, 1); }
.project-card:hover .project-art { transform: scale(1.06) rotate(-1deg); }
.project-badge { position: absolute; top: 16px; right: 16px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--gradient); color: #fff; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-accent); }
.project-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.project-card.featured .project-body { flex: 1; }
.project-body h3 { margin: 0 0 10px; font-size: 1.2rem; color: var(--text); }
.project-body p { margin: 0 0 18px; color: var(--text-2); font-size: .95rem; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tech span { font-size: .76rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--gradient-soft); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .18); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .3s ease; }
.faq-item:hover { border-color: rgba(var(--accent-rgb), .35); }
.faq-q {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 20px 24px; background: transparent; border: 0; cursor: pointer;
    font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--text); text-align: left;
}
.faq-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gradient-soft); color: var(--accent); flex-shrink: 0; transition: transform .35s ease, background .3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--gradient); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .45s cubic-bezier(.22, .61, .36, 1); }
.faq-a p { padding: 0 24px 22px; margin: 0; color: var(--text-2); font-size: .95rem; }
.faq-a a { font-weight: 600; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-info .section-title { margin-top: 4px; }
.contact-info > p { color: var(--text-2); }
.contact-rows { display: grid; gap: 12px; margin-top: 28px; }
.contact-row {
    display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: all .3s ease; box-shadow: var(--shadow-sm);
}
.contact-row:hover { transform: translateX(6px); border-color: rgba(var(--accent-rgb), .4); color: var(--text); box-shadow: var(--shadow-md); }
.contact-row-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gradient-soft); color: var(--accent); flex-shrink: 0; }
.contact-row strong { display: block; font-size: .9rem; }
.contact-row span:not(.contact-row-ico) { font-size: .84rem; color: var(--text-2); }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .84rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.form-field input, .form-field textarea {
    width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
    background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: .95rem;
    transition: all .3s ease; resize: vertical;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12); background: var(--surface); }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-3); }
.form-field input.invalid, .form-field textarea.invalid { border-color: #ef4444; }
.form-note { min-height: 1.4em; font-size: .88rem; margin: 12px 0 0; color: var(--text-2); }
.form-note.ok { color: #22c55e; }
.form-note.err { color: #ef4444; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 40px; }
.footer-tagline { color: var(--text-2); font-size: .92rem; margin-top: 16px; max-width: 320px; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); margin: 0 0 16px; }
.footer-col a { display: block; color: var(--text-2); padding: 5px 0; font-size: .92rem; }
.footer-col a:hover { color: var(--accent); padding-left: 6px; }
.footer-col p { color: var(--text-2); font-size: .92rem; margin: 0 0 8px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-bottom p { margin: 0; color: var(--text-3); font-size: .85rem; }
.back-top { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: all .3s ease; box-shadow: var(--shadow-sm); }
.back-top:hover { background: var(--gradient); color: #fff; border-color: transparent; transform: translateY(-4px); box-shadow: var(--shadow-accent); }

/* ---------- Reveal (JS-driven via GSAP) ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); will-change: transform, opacity; }
.js .availability, .js .hero-role, .js .hero-desc, .js .hero-cta, .js .hero-social,
.js .profile-card, .js .float-chip, .js .hero .stat { opacity: 0; }

/* When JS is enabled, ensure hero name words are visible by default
    (GSAP will still animate them if available). This prevents the
    name from staying translated off-screen when the animation library
    isn't ready. */
.js .hero-name .word > span { transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-visual { order: -1; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .skills-grid { grid-template-columns: 1fr; }
    .project-card.featured { flex-direction: column; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .float-chip.chip-2 { right: -4%; }
    .float-chip.chip-1 { left: -4%; }
}

@media (max-width: 768px) {
    .section { padding: 72px 0; }
    .nav-links, .nav-cta { display: none; }
    .menu-toggle { display: flex; }
    .hero { min-height: auto; padding-top: calc(var(--nav-h) + 36px); }
    .orbit-canvas { width: 340px; height: 340px; }
    .projects-grid { grid-template-columns: 1fr; }
    .timeline { padding-left: 30px; }
    .timeline-dot { left: -30px; width: 22px; height: 22px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
    .stat-num { font-size: 1.6rem; }
    .hero-cta .btn { flex: 1; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .float-chip { padding: 10px 14px; }
    .float-chip .chip-icon { width: 32px; height: 32px; }
    .contact-form { padding: 24px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .orb, .float-chip, .marquee-track, .skill-bar i::after, .availability .pulse-dot::after, .scroll-hint span { animation: none !important; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}
