/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════ */
:root {
    --bg:          #05050a;
    --bg-alt:      #0c0c14;
    --surface:     #10101c;
    --surface-2:   #16162a;
    --border:      rgba(255,255,255,0.07);
    --border-glow: rgba(99,102,241,0.4);

    --accent:      #6366f1;
    --accent-2:    #a78bfa;
    --accent-3:    #38bdf8;
    --accent-glow: rgba(99,102,241,0.25);

    --text:        #e2e8f0;
    --text-muted:  #64748b;
    --text-faint:  #334155;

    --green:       #34d399;
    --pink:        #f472b6;

    --font-body:   'Space Grotesk', system-ui, sans-serif;
    --font-mono:   'Space Mono', monospace;

    --ease:        cubic-bezier(0.16,1,0.3,1);
    --radius:      12px;
    --radius-lg:   20px;
    --nav-h:       72px;
    --container:   1180px;
}

/* ═══════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none; /* use custom cursor */
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: none; font-family: inherit; }

/* ═══════════════════════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════════════════════ */
.cursor-dot {
    position: fixed; top: 0; left: 0; z-index: 9999;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s;
    box-shadow: 0 0 8px var(--accent);
}
.cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 9998;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1.5px solid rgba(99,102,241,0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease),
                border-color 0.3s, opacity 0.2s;
}
.cursor-ring.hover {
    width: 48px; height: 48px;
    border-color: var(--accent);
    background: rgba(99,102,241,0.06);
}
@media (hover: none) {
    .cursor-dot, .cursor-ring { display: none; }
    body, button, a { cursor: auto; }
}

/* ═══════════════════════════════════════════════════════
   PRELOADER
═══════════════════════════════════════════════════════ */
.preloader {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-logo {
    font-family: var(--font-mono);
    font-size: 3rem; font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    animation: pulse-logo 1s ease-in-out infinite alternate;
}
@keyframes pulse-logo {
    from { opacity: 0.6; transform: scale(0.97); }
    to   { opacity: 1;   transform: scale(1.03); }
}
.preloader-bar-wrap {
    width: 240px; height: 3px; border-radius: 99px;
    background: rgba(255,255,255,0.08);
    overflow: hidden; margin: 0 auto 0.75rem;
}
.preloader-bar {
    height: 100%; width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--accent);
}
.preloader-pct {
    font-family: var(--font-mono);
    font-size: 0.85rem; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* ═══════════════════════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════════════════════ */
.container {
    width: 100%; max-width: var(--container);
    margin: 0 auto; padding: 0 1.5rem;
}
.section { padding: 7rem 0; position: relative; overflow: hidden; }
.section-dark { background: var(--bg-alt); }

/* ═══════════════════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════════════════ */
.section-header { margin-bottom: 4rem; text-align: center; }
.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem; color: var(--accent);
    letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: block;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 700; color: #fff;
    line-height: 1.15;
}
.section-subtitle {
    margin-top: 0.75rem; color: var(--text-muted);
    font-size: 1rem;
}
.accent-text { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.95rem;
    transition: all 0.3s var(--ease);
    position: relative; overflow: hidden;
    white-space: nowrap;
}
.btn::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,0.06);
    opacity: 0; transition: opacity 0.3s;
}
.btn:hover::before { opacity: 1; }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(99,102,241,0.35);
}
.btn-primary:hover {
    box-shadow: 0 0 32px rgba(99,102,241,0.6);
    transform: translateY(-2px);
}
.btn-outline {
    border: 1.5px solid var(--border-glow);
    color: var(--accent);
}
.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}
.btn-ghost {
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.btn-sm { padding: 0.55rem 1.25rem; font-size: 0.85rem; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius);
    color: var(--text-muted); transition: all 0.25s;
}
.icon-btn:hover { color: var(--accent); background: var(--accent-glow); }

/* ═══════════════════════════════════════════════════════
   TILT CARDS (base)
═══════════════════════════════════════════════════════ */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ═══════════════════════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════════════════════ */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-h);
    transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
}
.header.scrolled {
    background: rgba(5,5,10,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-container {
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo {
    font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700;
    color: #fff;
}
.logo-bracket { color: var(--accent); }
.nav-list { display: flex; gap: 0.25rem; }
.nav-link {
    padding: 0.5rem 0.75rem; font-size: 0.9rem; color: var(--text-muted);
    border-radius: 8px; transition: all 0.25s;
    position: relative;
}
.nav-link::after {
    content: ''; position: absolute;
    bottom: 4px; left: 50%; width: 0; height: 2px;
    background: var(--accent); border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { width: 60%; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    padding: 6px; border-radius: 8px;
    transition: background 0.25s;
}
.hamburger:hover { background: var(--accent-glow); }
.hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.25s, width 0.3s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
    z-index: 2000;
}
.mobile-nav.open { opacity: 1; visibility: visible; pointer-events: all; }
.mobile-nav-close {
    position: absolute; top: 1.25rem; right: 1.25rem;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
}
.mobile-nav-close:hover { color: var(--accent); border-color: var(--accent); }
.mobile-nav-list { text-align: center; }
.mobile-nav-list li { overflow: hidden; }
.mobile-nav-link {
    display: block; font-size: 2.5rem; font-weight: 700; color: var(--text-muted);
    padding: 0.5rem 2rem;
    transition: color 0.25s;
}
.mobile-nav-link:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport height — fixes mobile browser chrome */
    display: flex; align-items: center;
    overflow: hidden;
}
#hero-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.hero-content {
    position: relative; z-index: 1;
    padding-top: var(--nav-h);
    max-width: 720px;
}
.hero-tag {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.25);
    color: var(--green); border-radius: 99px;
    font-size: 0.82rem; font-weight: 500;
    padding: 0.4rem 1rem;
    margin-bottom: 1.75rem;
}
.hero-tag-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
.hero-name {
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 700; line-height: 1.0;
    color: #fff; margin-bottom: 1rem;
}
.hero-name-line { display: block; }
.hero-name-line.accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-family: var(--font-mono); font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--accent); letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}
.hero-desc {
    font-size: 1.05rem; color: var(--text-muted);
    line-height: 1.75; max-width: 520px;
    margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-socials { display: flex; gap: 0.75rem; }
.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius);
    color: var(--text-muted); border: 1px solid var(--border);
    transition: all 0.3s var(--ease);
}
.social-link:hover {
    color: var(--accent); border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.25);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    z-index: 1; opacity: 0;
    animation: fadeInUp 1s 2.5s var(--ease) forwards;
    color: var(--text-faint); font-size: 0.72rem; letter-spacing: 0.12em;
    text-transform: uppercase; font-family: var(--font-mono);
}
.scroll-mouse {
    width: 22px; height: 34px; border-radius: 11px;
    border: 1.5px solid var(--text-faint);
    display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
    width: 3px; height: 7px; border-radius: 2px;
    background: var(--text-faint);
    animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════ */
.about-grid {
    display: grid; grid-template-columns: 1fr 420px;
    gap: 5rem; align-items: center;
}
.about-text p {
    color: var(--text-muted); line-height: 1.8;
    margin-bottom: 1.25rem; font-size: 1.02rem;
}
.about-text p strong { color: var(--text); }
.about-stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 1rem; margin-top: 2.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.stat-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 20px rgba(99,102,241,0.12);
}
.stat-num {
    display: block;
    font-size: 2rem; font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); }

/* About image */
.about-image-wrap { position: relative; overflow: visible; }
.about-image-frame {
    position: relative; border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    transition: box-shadow 0.4s;
}
.about-image-frame:hover {
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 40px rgba(99,102,241,0.15);
}
.about-img { width: 100%; height: 420px; object-fit: cover; object-position: center top; }
.about-image-glow {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(99,102,241,0.25) 0%, transparent 60%);
    pointer-events: none;
}
.about-badge {
    position: absolute;
    display: flex; align-items: center; gap: 0.4rem;
    background: rgba(10,10,20,0.9); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glow);
    border-radius: 99px; padding: 0.5rem 1rem;
    font-size: 0.8rem; font-weight: 600; color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.about-badge svg { color: var(--accent); }
.about-badge-1 { bottom: -1rem; left: -0.5rem; }
.about-badge-2 { top: 1.5rem; right: -0.5rem; }

/* ═══════════════════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════════════════ */
.skills-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.1s;
    position: relative; overflow: hidden;
}
.skill-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0; transition: opacity 0.3s;
}
.skill-card:hover::before { opacity: 1; }
.skill-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 32px rgba(99,102,241,0.12);
}
.skill-card-icon {
    width: 52px; height: 52px; border-radius: var(--radius);
    background: var(--accent-glow); border: 1px solid var(--border-glow);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); margin-bottom: 1.25rem;
}
.skill-card h3 {
    font-size: 1rem; font-weight: 600; color: #fff;
    margin-bottom: 1rem;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    font-size: 0.78rem; padding: 0.3rem 0.7rem;
    background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
    color: var(--accent-2); border-radius: 99px;
    transition: background 0.25s, border-color 0.25s;
}
.chip:hover { background: rgba(99,102,241,0.2); border-color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   EXPERIENCE / TIMELINE
═══════════════════════════════════════════════════════ */
.timeline {
    position: relative; max-width: 800px; margin: 0 auto;
}
.timeline-track {
    position: absolute; left: 16px; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border-glow) 10%, var(--border-glow) 90%, transparent);
}
.timeline-item {
    position: relative; padding-left: 60px; margin-bottom: 3rem;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-node {
    position: absolute; left: 0; top: 24px;
    width: 33px; height: 33px;
    display: flex; align-items: center; justify-content: center;
}
.timeline-node-inner {
    width: 13px; height: 13px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2), 0 0 14px var(--accent);
    transition: box-shadow 0.3s;
}
.timeline-item:hover .timeline-node-inner {
    box-shadow: 0 0 0 5px rgba(99,102,241,0.3), 0 0 24px var(--accent);
}
.timeline-date {
    font-family: var(--font-mono); font-size: 0.78rem;
    color: var(--accent); margin-bottom: 0.75rem;
    letter-spacing: 0.06em;
}
.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.1s;
}
.timeline-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 20px rgba(99,102,241,0.08);
}
.timeline-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem;
}
.timeline-header h3 { font-size: 1.1rem; font-weight: 600; color: #fff; }
.timeline-company-badge {
    font-size: 0.78rem; padding: 0.3rem 0.8rem;
    background: var(--accent-glow); border: 1px solid var(--border-glow);
    color: var(--accent); border-radius: 99px;
    white-space: nowrap;
}
.timeline-card p { color: var(--text-muted); line-height: 1.75; font-size: 0.95rem; margin-bottom: 1.25rem; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.timeline-tags span {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--accent-3); background: rgba(56,189,248,0.08);
    border: 1px solid rgba(56,189,248,0.2); border-radius: 6px;
    padding: 0.2rem 0.6rem;
}

/* ═══════════════════════════════════════════════════════
   PROJECTS — FEATURED
═══════════════════════════════════════════════════════ */
.featured-projects { display: flex; flex-direction: column; gap: 4rem; margin-bottom: 4rem; }
.featured-card {
    display: grid; grid-template-columns: 1fr 380px;
    gap: 3rem; align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2.5rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.1s;
    position: relative; overflow: hidden;
}
.featured-card::after {
    content: ''; position: absolute;
    top: -80px; right: -80px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 70%);
    pointer-events: none;
}
.featured-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(99,102,241,0.1);
}
.featured-card-alt { direction: rtl; }
.featured-card-alt > * { direction: ltr; }
.featured-number {
    position: absolute; top: 1.5rem; right: 2rem;
    font-family: var(--font-mono); font-size: 5rem; font-weight: 700;
    color: rgba(255,255,255,0.03); user-select: none; pointer-events: none;
    line-height: 1;
}
.featured-label {
    font-family: var(--font-mono); font-size: 0.78rem;
    color: var(--accent); letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}
.featured-title { font-size: 1.6rem; font-weight: 700; color: #fff; margin-bottom: 1.25rem; }
.featured-desc-box {
    background: var(--surface-2); border-radius: var(--radius);
    padding: 1.25rem; margin-bottom: 1.5rem;
}
.featured-desc-box p { color: var(--text-muted); line-height: 1.75; font-size: 0.95rem; }
.featured-tech {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    font-family: var(--font-mono); margin-bottom: 1.25rem;
}
.featured-tech li {
    font-size: 0.78rem; color: var(--accent-3);
    background: rgba(56,189,248,0.07); border: 1px solid rgba(56,189,248,0.15);
    border-radius: 6px; padding: 0.2rem 0.65rem;
}
.featured-metrics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.metric {
    font-size: 0.78rem; padding: 0.3rem 0.7rem;
    background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2);
    color: var(--green); border-radius: 99px; font-weight: 600;
}

/* Code Window */
.featured-visual { position: relative; }
.featured-visual-inner {
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.code-window {
    background: #0d1117; border-radius: var(--radius-lg);
    overflow: hidden; border: 1px solid rgba(255,255,255,0.07);
}
.code-dots { display: flex; gap: 6px; padding: 14px 16px 10px; }
.code-dots span {
    width: 11px; height: 11px; border-radius: 50%;
}
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }
.code-window pre {
    padding: 0 1.5rem 1.5rem;
    font-family: var(--font-mono); font-size: 0.82rem;
    line-height: 1.7; overflow-x: auto;
}
.code-window code { display: block; color: #c9d1d9; }
.code-comment { color: #6e7681; }
.code-keyword { color: #ff7b72; }
.code-class { color: #79c0ff; }
.code-string { color: #a5d6ff; }

/* ═══════════════════════════════════════════════════════
   PROJECTS — GRID CARDS
═══════════════════════════════════════════════════════ */
.projects-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem;
    display: flex; flex-direction: column;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.1s;
    position: relative; overflow: hidden;
}
.project-card::before {
    content: ''; position: absolute;
    bottom: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0; transition: opacity 0.3s;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 24px rgba(99,102,241,0.1);
}
.project-card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1.25rem;
}
.project-folder { color: var(--accent); transition: transform 0.3s; }
.project-card:hover .project-folder { transform: translateY(-4px); }
.project-card-title { font-size: 1.05rem; font-weight: 600; color: #fff; margin-bottom: 0.75rem; }
.project-card-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; flex: 1; margin-bottom: 1.25rem; }
.project-card-tech {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    font-family: var(--font-mono); margin-bottom: 1rem;
}
.project-card-tech li {
    font-size: 0.75rem; color: var(--accent-3);
    background: rgba(56,189,248,0.07); border: 1px solid rgba(56,189,248,0.15);
    border-radius: 6px; padding: 0.18rem 0.55rem;
}
.project-metrics { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-metrics span {
    font-size: 0.75rem; padding: 0.25rem 0.6rem;
    background: rgba(52,211,153,0.07); border: 1px solid rgba(52,211,153,0.15);
    color: var(--green); border-radius: 99px; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   EDUCATION
═══════════════════════════════════════════════════════ */
.edu-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.edu-col-title {
    font-size: 1rem; font-weight: 600; color: var(--accent);
    font-family: var(--font-mono); letter-spacing: 0.06em;
    margin-bottom: 1.5rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.edu-cards, .cert-cards { display: flex; flex-direction: column; gap: 1.25rem; }
.edu-card, .cert-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.1s;
}
.edu-card:hover, .cert-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 28px rgba(99,102,241,0.1);
}
.edu-year {
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--accent); margin-bottom: 0.5rem;
}
.edu-card h4, .cert-card h4 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 0.3rem; }
.edu-inst { font-size: 0.85rem; color: var(--accent-2); margin-bottom: 0.5rem; }
.edu-card p, .cert-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }
.cert-card { display: flex; gap: 1rem; align-items: flex-start; }
.cert-icon-wrap { font-size: 1.75rem; flex-shrink: 0; margin-top: 0.1rem; }

/* ═══════════════════════════════════════════════════════
   ACHIEVEMENTS
═══════════════════════════════════════════════════════ */
.achievements-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.achievement-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem 1.5rem;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.1s;
    position: relative; overflow: hidden;
}
.achievement-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 40px rgba(99,102,241,0.15);
}
.achievement-num {
    font-size: 3rem; font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem; line-height: 1;
    font-family: var(--font-mono);
}
.achievement-label { font-size: 0.85rem; color: var(--text-muted); }
.achievement-line {
    position: absolute; bottom: 0; left: 10%; right: 10%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.achievement-card:hover .achievement-line { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════ */
.contact-wrap { max-width: 780px; margin: 0 auto; text-align: center; }
.contact-text {
    color: var(--text-muted); font-size: 1.05rem; line-height: 1.8;
    margin-bottom: 3rem;
}
.contact-cards {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem 1.25rem;
    display: flex; flex-direction: column; align-items: center;
    gap: 0.75rem; text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}
.contact-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 12px 40px rgba(99,102,241,0.15);
    transform: translateY(-6px);
}
.contact-card-icon {
    width: 56px; height: 56px; border-radius: var(--radius);
    background: var(--accent-glow); border: 1px solid var(--border-glow);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}
.contact-card-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.contact-card-val { font-size: 0.82rem; color: var(--text); font-weight: 600; word-break: break-all; }

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.footer-credit { font-size: 0.85rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   BACK TO TOP
═══════════════════════════════════════════════════════ */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 100;
    width: 44px; height: 44px; border-radius: var(--radius);
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: all 0.3s var(--ease);
    transform: translateY(12px);
}
.back-to-top.visible { opacity: 1; visibility: visible; pointer-events: all; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-2); box-shadow: 0 8px 28px rgba(99,102,241,0.5); transform: translateY(-2px); }

/* ═══════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 5000;
    background: rgba(5,5,10,0.85); backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.open { opacity: 1; visibility: visible; pointer-events: all; }
.modal-panel {
    background: var(--surface);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg); width: 100%; max-width: 660px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 40px rgba(99,102,241,0.1);
    transform: scale(0.94) translateY(16px);
    transition: transform 0.35s var(--ease);
}
.modal-overlay.open .modal-panel { transform: scale(1) translateY(0); }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1.2rem; font-weight: 700; color: #fff; }
.modal-close { color: var(--text-muted); transition: color 0.2s, transform 0.2s; }
.modal-close:hover { color: #fff; transform: rotate(90deg); }
.modal-body { padding: 1.75rem; }
.modal-desc { color: var(--text-muted); line-height: 1.8; font-size: 0.95rem; margin-bottom: 1.75rem; white-space: pre-line; }
.modal-section h3 { font-size: 0.85rem; font-weight: 600; color: var(--accent); font-family: var(--font-mono); margin-bottom: 1rem; }
.modal-tech-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.modal-tech-list li {
    font-size: 0.82rem; padding: 0.35rem 0.8rem;
    background: var(--accent-glow); border: 1px solid var(--border-glow);
    color: var(--accent); border-radius: 99px;
}

/* ═══════════════════════════════════════════════════════
   GSAP INITIAL STATES (set by CSS so no flash)
═══════════════════════════════════════════════════════ */
[data-gsap="reveal"],
[data-gsap="reveal-left"],
[data-gsap="reveal-right"],
[data-gsap="skill-card"],
[data-gsap="timeline"],
[data-gsap="featured"],
[data-gsap="project-card"],
[data-gsap="achievement"],
[data-gsap="stat"] {
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Comprehensive
═══════════════════════════════════════════════════════ */

/* ── Tablet landscape ── */
@media (max-width: 1100px) {
    .about-grid          { grid-template-columns: 1fr; gap: 3rem; }
    .about-image-wrap    { max-width: 400px; margin: 0 auto; }
    .about-badge-1       { bottom: 0.5rem; left: 0; }
    .about-badge-2       { top: 0.5rem;  right: 0; }
    .skills-grid         { grid-template-columns: repeat(2, 1fr); }
    .achievements-grid   { grid-template-columns: repeat(2, 1fr); }
    .featured-card       { grid-template-columns: 1fr; }
    .featured-card-alt   { direction: ltr; }
    .featured-visual     { display: none; }
    .edu-grid            { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Tablet portrait ── */
@media (max-width: 768px) {
    :root                { --nav-h: 64px; }
    .nav-desktop         { display: none; }
    .hamburger           { display: flex; }
    .header-actions .btn-outline { display: none; } /* hide resume on small screens */

    .section             { padding: 4.5rem 0; }
    .section-header      { margin-bottom: 2.5rem; }
    .container           { padding: 0 1.25rem; }

    /* Hero */
    .hero-content        { padding-top: calc(var(--nav-h) + 1rem); }
    .hero-name           { font-size: clamp(2.4rem, 11vw, 4rem); }
    .hero-desc           { font-size: 0.97rem; }
    .hero-actions        { gap: 0.75rem; }

    /* About */
    .about-badge-1, .about-badge-2 { display: none; }
    .about-stats         { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

    /* Skills */
    .skills-grid         { grid-template-columns: 1fr; gap: 1rem; }
    .skill-card          { padding: 1.25rem; }

    /* Timeline */
    .timeline-track      { left: 12px; }
    .timeline-item       { padding-left: 42px; margin-bottom: 2rem; }
    .timeline-header     { flex-direction: column; gap: 0.5rem; }

    /* Projects */
    .projects-grid       { grid-template-columns: 1fr; }
    .featured-card       { padding: 1.5rem; gap: 1.5rem; }
    .featured-title      { font-size: 1.3rem; }

    /* Education */
    .edu-grid            { grid-template-columns: 1fr; gap: 2rem; }

    /* Achievements */
    .achievements-grid   { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .achievement-num     { font-size: 2.4rem; }

    /* Contact */
    .contact-cards       { grid-template-columns: 1fr; gap: 1rem; }
    .contact-wrap        { padding: 0 0.5rem; }

    /* Footer */
    .footer-inner        { flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
    .footer-links        { flex-wrap: wrap; justify-content: center; gap: 1rem; }

    /* Modal */
    .modal-panel         { border-radius: var(--radius); }
    .modal-header        { padding: 1.25rem; }
    .modal-body          { padding: 1.25rem; }

    /* Misc */
    .back-to-top         { bottom: 1.25rem; right: 1.25rem; }
    .scroll-indicator    { display: none; }
    .nav-pill            { display: none !important; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    :root                { --nav-h: 60px; }
    .container           { padding: 0 1rem; }

    .section             { padding: 3.5rem 0; }
    .hero-name           { font-size: clamp(2rem, 13vw, 3rem); }
    .hero-tag            { font-size: 0.75rem; padding: 0.35rem 0.85rem; }
    .hero-actions        { flex-direction: column; align-items: flex-start; width: 100%; }
    .hero-actions .btn   { width: 100%; justify-content: center; }
    .hero-socials        { gap: 0.5rem; }

    .about-stats         { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .stat-card           { padding: 1rem; }
    .stat-num            { font-size: 1.6rem; }

    .achievements-grid   { grid-template-columns: repeat(2, 1fr); }
    .achievement-num     { font-size: 2rem; }
    .achievement-card    { padding: 1.5rem 1rem; }

    .contact-card        { padding: 1.25rem 1rem; }
    .contact-card-val    { font-size: 0.78rem; }

    .featured-metrics    { gap: 0.35rem; }
    .metric              { font-size: 0.72rem; }

    .timeline-card       { padding: 1.25rem; }
    .edu-card, .cert-card { padding: 1.25rem; }

    .mobile-nav-link     { font-size: 2rem; }
    .preloader-logo      { font-size: 2.5rem; }

    .modal-panel         { max-height: 95vh; }
}

/* ── Very small screens ── */
@media (max-width: 360px) {
    .hero-name           { font-size: clamp(1.8rem, 14vw, 2.8rem); }
    .btn                 { padding: 0.65rem 1.25rem; font-size: 0.88rem; }
    .achievements-grid   { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   NOISE / GRAIN OVERLAY
   Fixed pseudo-element on body — adds premium film texture
═══════════════════════════════════════════════════════ */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 9990;
    pointer-events: none;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    animation: grain-shift 0.5s steps(2) infinite;
}
@keyframes grain-shift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-3%, -2%); }
    50%  { transform: translate(2%, 3%); }
    75%  { transform: translate(-1%, 2%); }
    100% { transform: translate(3%, -1%); }
}

/* ═══════════════════════════════════════════════════════
   GLITCH EFFECT ON HERO NAME
═══════════════════════════════════════════════════════ */
@keyframes glitch-skew {
    0%,100% { transform: skew(0deg); }
    20%     { transform: skew(-2deg); }
    40%     { transform: skew(1.5deg); }
    60%     { transform: skew(-1deg); }
    80%     { transform: skew(2.5deg); }
}
@keyframes glitch-clip-1 {
    0%,100% { clip-path: inset(0 0 95% 0); transform: translate(-3px, 0); opacity: 0.8; }
    20%     { clip-path: inset(40% 0 40% 0); transform: translate(3px, 0); }
    40%     { clip-path: inset(80% 0 0% 0);  transform: translate(-2px, 0); }
    60%     { clip-path: inset(20% 0 60% 0); transform: translate(4px, 0); }
    80%     { clip-path: inset(60% 0 20% 0); transform: translate(-3px, 0); }
}
@keyframes glitch-clip-2 {
    0%,100% { clip-path: inset(50% 0 30% 0); transform: translate(3px, 0); opacity: 0.6; color: #38bdf8; }
    20%     { clip-path: inset(10% 0 70% 0); transform: translate(-4px, 0); }
    40%     { clip-path: inset(70% 0 10% 0); transform: translate(2px, 0); }
    60%     { clip-path: inset(30% 0 50% 0); transform: translate(-3px, 0); }
    80%     { clip-path: inset(0% 0 80% 0);  transform: translate(4px, 0); }
}

.hero-name-line.glitching {
    animation: glitch-skew 0.25s linear;
    position: relative;
}
.hero-name-line.glitching::before,
.hero-name-line.glitching::after {
    content: attr(data-glitch);
    position: absolute; inset: 0;
    background: transparent;
    font-size: inherit; font-weight: inherit; font-family: inherit;
    pointer-events: none;
}
.hero-name-line.glitching::before {
    color: #f472b6;
    animation: glitch-clip-1 0.25s linear;
}
.hero-name-line.glitching::after {
    color: #38bdf8;
    animation: glitch-clip-2 0.25s linear;
}

/* ═══════════════════════════════════════════════════════
   NAV SLIDING PILL
═══════════════════════════════════════════════════════ */
.nav-list {
    position: relative;
}
.nav-pill {
    position: absolute;
    height: calc(100% - 8px);
    top: 4px;
    border-radius: 8px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.2);
    pointer-events: none;
    transition: left 0.35s cubic-bezier(0.16,1,0.3,1),
                width 0.35s cubic-bezier(0.16,1,0.3,1),
                opacity 0.3s;
    z-index: 0;
    opacity: 0;
}
.nav-pill.visible { opacity: 1; }
.nav-link { z-index: 1; }

/* ═══════════════════════════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════════════════════════ */
.toast {
    position: fixed; bottom: 2.5rem; left: 50%;
    transform: translateX(-50%) translateY(16px);
    z-index: 9997;
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: var(--surface-2);
    border: 1px solid var(--border-glow);
    border-radius: 99px;
    padding: 0.65rem 1.4rem;
    font-size: 0.88rem; font-weight: 600; color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(99,102,241,0.2);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
    white-space: nowrap;
}
.toast svg { color: var(--green); flex-shrink: 0; }
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

/* ═══════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    #hero-canvas { display: none; }
    body::before { display: none; }
}

/* ═══════════════════════════════════════════════════════
   READING PROGRESS BAR
═══════════════════════════════════════════════════════ */
.reading-progress {
    position: fixed; top: 0; left: 0; z-index: 9999;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(99,102,241,0.4);
    transition: width 0.1s linear;
    pointer-events: none;
    border-radius: 0 2px 2px 0;
}
/* Glowing trailing dot */
.reading-progress::after {
    content: '';
    position: absolute; right: 0; top: 50%;
    transform: translateY(-50%);
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 8px var(--accent-2), 0 0 16px rgba(167,139,250,0.6);
}

/* ═══════════════════════════════════════════════════════
   CURSOR SPOTLIGHT
═══════════════════════════════════════════════════════ */
.cursor-spotlight {
    position: fixed; z-index: 0;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(99,102,241,0.07) 0%,
        rgba(99,102,241,0.03) 40%,
        transparent 70%
    );
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s;
    mix-blend-mode: screen;
}

/* ═══════════════════════════════════════════════════════
   TYPED TEXT
═══════════════════════════════════════════════════════ */
.typed-text {
    color: var(--accent);
    font-family: var(--font-mono);
}
.typed-cursor {
    color: var(--accent);
    font-family: var(--font-mono);
    animation: cursor-blink 0.75s step-end infinite;
    margin-left: 1px;
}
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   MAGNETIC BUTTONS
═══════════════════════════════════════════════════════ */
.magnetic {
    /* JS drives the transform; we just make sure transition is smooth
       but fast so it doesn't feel laggy */
    will-change: transform;
}
.magnetic:not(:hover) {
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1),
                box-shadow 0.3s ease !important;
}
