/* ===== CSS RESET & VARIABLES ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #00f0ff;
    --primary-dim: #00f0ff44;
    --secondary: #ff2d75;
    --accent: #a855f7;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a2e;
    --text: #e0e0e0;
    --text-dim: #888;
    --border: #1e1e30;
    --glow-primary: 0 0 20px #00f0ff55, 0 0 40px #00f0ff22;
    --glow-secondary: 0 0 20px #ff2d7555, 0 0 40px #ff2d7522;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--primary) var(--bg-dark); }
body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 17px;
}

/* ===== ANIMATED BG GRID ===== */
.bg-grid {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
    background:
        linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.bg-grid::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, #00f0ff08 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, #ff2d7508 0%, transparent 50%);
}

/* ===== SCANLINE OVERLAY ===== */
.scanlines {
    position: fixed; inset: 0; z-index: 999; pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
}

/* ===== PARTICLES ===== */
#particles-canvas { position: fixed; inset: 0; z-index: -1; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed; top: 3px; left: 0; right: 0; z-index: 1000;
    padding: 0.8rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled { background: rgba(10,10,15,0.95); box-shadow: 0 4px 30px rgba(0,240,255,0.1); }
.nav-logo {
    font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700;
    color: var(--primary); text-decoration: none; letter-spacing: 2px;
}
.nav-logo span { color: var(--secondary); }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
    color: var(--text-dim); text-decoration: none; font-family: var(--font-mono);
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    transition: color 0.3s; position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 1002; }
.hamburger span { width: 28px; height: 2px; background: var(--primary); transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Nav CV button (smaller for navbar context) */
.nav-cv-btn {
    padding: 0.45rem 1.1rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px;
    white-space: nowrap;
}
.nav-cv-btn i { margin-right: 0.3rem; }

/* Mobile nav overlay */
.nav-overlay {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.nav-overlay.active { display: block; }

/* ===== XP BAR (top decoration) ===== */
.xp-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 1001;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    background-size: 300% 100%;
    animation: xpGlow 4s ease infinite;
}
@keyframes xpGlow { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

/* ===== SECTION DEFAULTS ===== */
section { padding: 2.2rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-header {
    text-align: center; margin-bottom: 1.6rem;
}
.section-tag {
    font-family: var(--font-mono); color: var(--secondary); font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 3px; margin-bottom: 0.5rem;
    display: inline-block;
}
.section-title {
    font-family: var(--font-heading); font-size: 2.2rem; color: #fff;
    text-transform: uppercase; letter-spacing: 2px;
}
.section-title .highlight { color: var(--primary); }
.section-line {
    width: 80px; height: 3px; margin: 1rem auto 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 8rem 2rem 4rem; position: relative;
}
.hero-content { display: flex; align-items: center; gap: 4rem; max-width: 1200px; width: 100%; }
.hero-text { flex: 1; }
.hero-greeting {
    font-family: var(--font-mono); color: var(--secondary); font-size: 1rem;
    margin-bottom: 0.5rem;
}
.hero-greeting .blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-name {
    font-family: var(--font-heading); font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900; line-height: 1.1; margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-roles {
    font-family: var(--font-mono); font-size: 1.1rem; color: var(--primary);
    margin-bottom: 1.5rem; min-height: 1.6em;
}
.hero-desc {
    color: var(--text-dim); font-size: 1.1rem; max-width: 500px; margin-bottom: 2rem; line-height: 1.8;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.8rem 1.8rem; border-radius: 4px; text-decoration: none;
    font-family: var(--font-mono); font-size: 0.9rem; text-transform: uppercase;
    letter-spacing: 1px; transition: all 0.3s; cursor: pointer; border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00b8d4);
    color: var(--bg-dark); font-weight: 700;
    box-shadow: var(--glow-primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 30px #00f0ff66, 0 0 60px #00f0ff33; }
.btn-outline {
    background: transparent; color: var(--primary);
    border: 1px solid var(--primary); font-weight: 600;
}
.btn-outline:hover { background: var(--primary-dim); transform: translateY(-2px); }
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #d4004c);
    color: #fff; font-weight: 700;
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: var(--glow-secondary); }

/* Hero image */
.hero-image-wrapper {
    flex-shrink: 0; position: relative;
}
.hero-avatar {
    width: 300px; height: 300px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: var(--glow-primary);
    position: relative; z-index: 2;
}
.hero-avatar-ring {
    position: absolute; inset: -15px; border-radius: 50%;
    border: 2px dashed var(--secondary);
    animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-avatar-ring2 {
    position: absolute; inset: -30px; border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0.3;
    animation: spin 30s linear infinite reverse;
}

/* Hero stats HUD */
.hero-stats {
    display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap;
}
.hero-stat {
    text-align: center;
}
.hero-stat-value {
    font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; color: var(--primary);
}
.hero-stat-value-text {
    font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--primary);
    letter-spacing: 1px;
}
.hero-stat-label {
    font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1px;
}

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-text p { color: var(--text-dim); margin-bottom: 1rem; line-height: 1.8; font-size: 1.05rem; }
.about-text p strong { color: #fff; }

.about-info-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    padding: 2rem; position: relative; overflow: hidden;
}
.about-info-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.info-row {
    display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row i { color: var(--primary); width: 20px; text-align: center; }
.info-row .label { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.85rem; min-width: 100px; }
.info-row .value { color: #fff; font-weight: 500; }

/* ===== SKILLS SLIDER ===== */
.skills-slider-wrapper {
    position: relative; overflow: hidden;
    margin: 0 -2rem; padding: 1rem 0;
    cursor: grab;
    user-select: none; -webkit-user-select: none;
}
.skills-slider-wrapper:active { cursor: grabbing; }
.skills-slider-track {
    display: flex; gap: 1.5rem;
    width: max-content;
    padding: 0 1rem;
    will-change: transform;
}
.skill-slide {
    flex-shrink: 0; width: 280px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.5rem 1.8rem; transition: all 0.3s;
    display: flex; align-items: center; gap: 1.2rem;
}
.skill-slide:hover {
    border-color: var(--primary); transform: translateY(-3px);
    box-shadow: var(--glow-primary);
}
.skill-slide-primary {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}
.skill-slide-primary .skill-slide-icon {
    background: var(--primary); color: var(--bg-dark);
}
.skill-slide-icon {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    background: var(--primary-dim); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--primary);
}
.skill-slide h3 {
    font-family: var(--font-heading); font-size: 0.85rem; color: #fff;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem;
}
.skill-slide p {
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim);
    line-height: 1.4;
}

/* Tech tags */
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tech-tag {
    padding: 0.3rem 0.8rem; border-radius: 20px; font-family: var(--font-mono);
    font-size: 0.75rem; border: 1px solid var(--border); color: var(--text-dim);
    transition: all 0.3s;
}
.tech-tag:hover { border-color: var(--primary); color: var(--primary); }
.tech-tag-primary {
    border-color: var(--primary); color: var(--primary);
    background: #00f0ff11; box-shadow: var(--glow-primary);
}

/* ===== EXPERIENCE TIMELINE (dates on left) ===== */
.timeline { position: relative; max-width: 1100px; margin: 0 auto; }
.timeline::before {
    content: ''; position: absolute; left: 220px; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--secondary), var(--accent));
}
.timeline-item {
    position: relative; margin-bottom: 2.5rem;
    display: grid; grid-template-columns: 200px 1fr; gap: 2.5rem;
    padding-left: 0;
}
.timeline-date-col {
    text-align: right; padding-top: 1.8rem; position: relative;
}
.timeline-date {
    font-family: var(--font-mono); font-size: 0.78rem; color: var(--secondary);
    text-transform: uppercase; letter-spacing: 1px; line-height: 1.5;
    white-space: nowrap;
}
.timeline-dot {
    position: absolute; right: -1.32rem; top: 2rem; width: 14px; height: 14px;
    border-radius: 50%; background: var(--primary); border: 3px solid var(--bg-dark);
    box-shadow: 0 0 10px var(--primary); z-index: 2;
}
.timeline-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    padding: 2rem; transition: all 0.3s; cursor: pointer;
}
.timeline-card:hover { border-color: var(--primary); box-shadow: var(--glow-primary); }
.timeline-title {
    font-family: var(--font-heading); font-size: 1.1rem; color: #fff;
    margin-bottom: 0.3rem;
}
.timeline-company {
    font-family: var(--font-mono); font-size: 0.9rem; color: var(--primary);
    margin-bottom: 0;
}
.timeline-desc {
    color: var(--text-dim); line-height: 1.8;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}
.timeline-card:hover .timeline-desc,
.timeline-card.touch-open .timeline-desc {
    max-height: 600px; opacity: 1; margin-top: 1rem;
}
.timeline-desc ul { list-style: none; padding: 0; }
.timeline-desc ul li { padding: 0.3rem 0; padding-left: 1.2rem; position: relative; }
.timeline-desc ul li::before {
    content: '>';  position: absolute; left: 0; color: var(--primary);
    font-family: var(--font-mono);
}
@media (max-width: 768px) {
    .timeline::before { left: 0; }
    .timeline-item { grid-template-columns: 1fr; gap: 0; padding-left: 1.5rem; }
    .timeline-date-col { text-align: left; padding-top: 0; padding-bottom: 0.5rem; }
    .timeline-dot { left: -1.5rem; right: auto; top: 0.2rem; }
}

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.project-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; transition: all 0.4s; position: relative;
}
.project-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: var(--glow-primary); }
.project-card.featured { grid-column: 1 / -1; }
.project-card.featured .project-inner { display: grid; grid-template-columns: 1fr 1fr; }

.project-img-wrapper {
    position: relative; overflow: hidden; height: 220px;
    background: #0a0a12;
}
.project-card.featured .project-img-wrapper { height: 100%; min-height: 300px; }
.project-img {
    width: 100%; height: 100%; object-fit: contain;
    transition: transform 0.5s;
}
.project-card:hover .project-img { transform: scale(1.05); }
.project-badge {
    position: absolute; top: 1rem; left: 1rem;
    padding: 0.3rem 0.8rem; border-radius: 4px;
    font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 1px; font-weight: 700;
}
.badge-steam { background: #1b2838; color: #66c0f4; border: 1px solid #66c0f4; }
.badge-prototype { background: rgba(168,85,247,0.2); color: var(--accent); border: 1px solid var(--accent); }
.badge-vr { background: rgba(255,45,117,0.2); color: var(--secondary); border: 1px solid var(--secondary); }
.badge-ios { background: rgba(0,122,255,0.2); color: #5ac8fa; border: 1px solid #5ac8fa; }

.project-info { padding: 1.5rem; }
.project-genre { font-family: var(--font-mono); font-size: 0.75rem; color: var(--secondary); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.5rem; }
.project-title { font-family: var(--font-heading); font-size: 1.2rem; color: #fff; margin-bottom: 0.8rem; }
.project-desc { color: var(--text-dim); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.2rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.project-tech span {
    padding: 0.2rem 0.6rem; border-radius: 3px; font-family: var(--font-mono);
    font-size: 0.7rem; background: rgba(0,240,255,0.08); color: var(--primary);
    border: 1px solid rgba(0,240,255,0.15);
}
.project-links { display: flex; gap: 0.8rem; }
.project-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: 4px; text-decoration: none;
    font-family: var(--font-mono); font-size: 0.8rem; transition: all 0.3s;
    border: 1px solid var(--border); color: var(--text-dim);
}
.project-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }
.projects-show-more {
    text-align: center; margin-top: 2.5rem;
}
.projects-expand-btn i {
    transition: transform 0.3s;
}
.projects-expand-btn.expanded i {
    transform: rotate(180deg);
}
.project-card.hidden-project {
    display: none;
}
.project-card.hidden-project.show-all {
    display: block;
}

.project-card { cursor: pointer; }
.project-card .project-view-hint {
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim);
    margin-top: 0.8rem; opacity: 0; transition: opacity 0.3s;
}
.project-card:hover .project-view-hint { opacity: 1; }

/* ===== SIDE PROJECTS SLIDER ===== */
.side-projects-slider {
    position: relative; overflow: hidden;
    margin: 0 -2rem; padding: 1rem 0;
    cursor: grab;
    user-select: none; -webkit-user-select: none;
}
.side-projects-slider:active { cursor: grabbing; }
.side-projects-slider img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.side-projects-track {
    display: flex; gap: 1.5rem;
    width: max-content;
    padding: 0 1rem;
    will-change: transform;
}

.side-project-card {
    flex-shrink: 0; width: 300px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; transition: all 0.3s; cursor: pointer;
}
.side-project-card:hover {
    border-color: var(--primary); transform: translateY(-4px);
    box-shadow: var(--glow-primary);
}
.side-project-thumb {
    width: 100%; height: 140px; object-fit: contain; display: block;
    border-bottom: 1px solid var(--border);
    background: #0a0a12;
}
.side-project-body { padding: 1rem 1.2rem; }
.side-project-genre {
    font-family: var(--font-mono); font-size: 0.65rem; color: var(--secondary);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.3rem;
}
.side-project-title {
    font-family: var(--font-heading); font-size: 0.95rem; color: #fff;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.6rem;
}
.side-project-tech {
    display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.8rem;
}
.side-project-tech span {
    padding: 0.15rem 0.5rem; border-radius: 3px; font-family: var(--font-mono);
    font-size: 0.65rem; background: rgba(0,240,255,0.08); color: var(--primary);
    border: 1px solid rgba(0,240,255,0.15);
}
.side-project-itch {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.8rem; border-radius: 4px; text-decoration: none;
    font-family: var(--font-mono); font-size: 0.75rem; transition: all 0.3s;
    border: 1px solid var(--border); color: var(--text-dim);
}
.side-project-itch:hover {
    border-color: var(--primary); color: var(--primary); background: var(--primary-dim);
}

/* ===== PROJECT DETAIL MODAL ===== */
.project-modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    display: none; align-items: flex-start; justify-content: center;
    overflow-y: auto; padding: 3rem 1rem;
}
.project-modal-overlay.open { display: flex; }
.project-modal {
    background: var(--bg-dark); border: 1px solid var(--border); border-radius: 16px;
    max-width: 900px; width: 100%; position: relative;
    box-shadow: 0 0 60px rgba(0,240,255,0.15);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity:0; transform: translateY(30px); } to { opacity:1; transform: translateY(0); } }
.modal-close {
    position: absolute; top: 1rem; right: 1rem; z-index: 10;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text); font-size: 1.2rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.modal-close:hover { border-color: var(--secondary); color: var(--secondary); }
.modal-hero { position: relative; border-radius: 16px 16px 0 0; overflow: hidden; }
.modal-hero { background: #0a0a12; }
.modal-hero img, .modal-hero video {
    width: 100%; max-height: 400px; object-fit: contain; display: block;
}
.modal-hero iframe {
    width: 100%; aspect-ratio: 16/9; max-height: 400px; display: block; border: none;
}
.modal-body { padding: 2rem; }
.modal-badge-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.modal-genre { font-family: var(--font-mono); font-size: 0.8rem; color: var(--secondary); text-transform: uppercase; letter-spacing: 2px; }
.modal-title { font-family: var(--font-heading); font-size: 1.8rem; color: #fff; margin-bottom: 0.5rem; }
.modal-meta { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.modal-meta-item { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); }
.modal-meta-item i { color: var(--primary); margin-right: 0.4rem; }
.modal-description { color: var(--text-dim); line-height: 1.9; margin-bottom: 2rem; font-size: 1.05rem; }
.modal-highlights { margin-bottom: 2rem; }
.modal-highlights h4 {
    font-family: var(--font-heading); font-size: 0.85rem; color: var(--primary);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.8rem;
}
.modal-highlights ul { list-style: none; padding: 0; }
.modal-highlights ul li {
    padding: 0.4rem 0 0.4rem 1.2rem; position: relative; color: var(--text-dim);
}
.modal-highlights ul li::before {
    content: '\25B8'; position: absolute; left: 0; color: var(--primary);
}
.modal-gallery { margin-bottom: 2rem; }
.modal-gallery h4 {
    font-family: var(--font-heading); font-size: 0.85rem; color: var(--primary);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.8rem;
}
.modal-gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem;
}
.modal-gallery-grid img {
    width: 100%; height: 180px; object-fit: contain; border-radius: 8px;
    border: 1px solid var(--border); cursor: pointer; transition: all 0.3s;
    background: #0a0a12;
}
.modal-gallery-grid img:hover { border-color: var(--primary); transform: scale(1.03); }
.modal-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.modal-links { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ===== PORTRAIT PROJECT SUPPORT ===== */
/* Card thumbnail: contain instead of cover, with dark bg */
.project-card.portrait .project-img {
    object-fit: contain;
    background: #0a0a12;
}
.project-card.portrait.featured .project-img-wrapper {
    max-width: 300px;
    margin: 0 auto;
}
.project-card.portrait.featured .project-inner {
    grid-template-columns: auto 1fr;
}
/* Modal hero: contain video/image with dark bg */
.project-modal.portrait .modal-hero {
    background: #000;
}
.project-modal.portrait .modal-hero img {
    object-fit: contain;
    max-height: 70vh;
}
/* Gallery: portrait screenshots use narrower columns */
.project-modal.portrait .modal-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
@media (max-width: 900px) {
    .project-card.portrait.featured .project-inner { grid-template-columns: 1fr; }
    .project-card.portrait.featured .project-img-wrapper { max-width: 250px; }
}

/* Lightbox / Gallery Viewer */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(0,0,0,0.97); display: none;
    align-items: center; justify-content: center;
    cursor: default;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay > img {
    width: calc(100vw - 120px); height: 95vh;
    object-fit: contain; user-select: none;
}
.lightbox-close {
    position: absolute; top: 1rem; right: 1.5rem; z-index: 10;
    background: none; border: none; color: #fff; font-size: 2.5rem;
    cursor: pointer; opacity: 0.7; transition: opacity 0.2s;
    line-height: 1;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 1.4rem; width: 48px; height: 48px;
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.7; transition: all 0.2s; z-index: 10;
}
.lightbox-arrow:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-counter {
    position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    font-family: var(--font-mono); font-size: 0.85rem; color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.5); padding: 0.4rem 1rem; border-radius: 20px;
    letter-spacing: 1px;
}
@media (max-width: 768px) {
    .lightbox-overlay > img { width: calc(100vw - 80px); height: 95vh; }
    .lightbox-arrow { width: 36px; height: 36px; font-size: 1rem; }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}
@media (max-width: 768px) {
    .modal-title { font-size: 1.3rem; }
    .modal-body { padding: 1.2rem; }
}

/* ===== EDUCATION ===== */
.education-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    padding: 2.5rem; display: flex; gap: 2rem; align-items: start;
    max-width: 750px; margin: 0 auto;
    transition: all 0.3s;
}
.education-card:hover { border-color: var(--primary); box-shadow: var(--glow-primary); }
.edu-icon {
    width: 60px; height: 60px; border-radius: 12px; flex-shrink: 0;
    background: var(--primary-dim); display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--primary);
}
.edu-info h3 { font-family: var(--font-heading); font-size: 1.1rem; color: #fff; margin-bottom: 0.3rem; }
.edu-info .edu-school { font-family: var(--font-mono); color: var(--primary); font-size: 0.9rem; margin-bottom: 0.3rem; }
.edu-info .edu-date { font-family: var(--font-mono); color: var(--text-dim); font-size: 0.8rem; }


/* ===== CONTACT ===== */
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info { }
.contact-info p { color: var(--text-dim); line-height: 1.8; margin-bottom: 2rem; }
.contact-method {
    display: flex; align-items: center; gap: 1rem; padding: 1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    margin-bottom: 1rem; transition: all 0.3s; text-decoration: none;
}
.contact-method:hover { border-color: var(--primary); transform: translateX(4px); }
.contact-method-icon {
    width: 45px; height: 45px; border-radius: 10px; flex-shrink: 0;
    background: var(--primary-dim); display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1.1rem;
}
.contact-method-text .cm-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.contact-method-text .cm-value { color: #fff; font-weight: 500; }

.contact-socials {
    display: flex; gap: 1rem; margin-top: 2rem;
}
.social-link {
    width: 48px; height: 48px; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); font-size: 1.2rem; text-decoration: none;
    transition: all 0.3s;
}
.social-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); box-shadow: var(--glow-primary); }

/* Contact form */
.contact-form {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    padding: 2rem;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block; font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 0.4rem;
}
.form-group input, .form-group textarea {
    width: 100%; padding: 0.8rem 1rem; background: var(--bg-dark);
    border: 1px solid var(--border); border-radius: 6px; color: #fff;
    font-family: var(--font-body); font-size: 1rem; transition: border-color 0.3s;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* ===== FOOTER ===== */
footer {
    text-align: center; padding: 3rem 2rem; border-top: 1px solid var(--border);
    margin-top: 2rem;
}
footer p { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.8rem; }
footer .footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1rem; }
footer .footer-links a { color: var(--text-dim); text-decoration: none; font-family: var(--font-mono); font-size: 0.8rem; transition: color 0.3s; }
footer .footer-links a:hover { color: var(--primary); }

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-avatar { width: 220px; height: 220px; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-content { grid-template-columns: 1fr; }
    .project-card.featured .project-inner { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }

    /* Mobile nav */
    .navbar { padding: 0.6rem 1.2rem; }
    .nav-links {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: 280px; background: rgba(10,10,15,0.98); flex-direction: column;
        padding: 5rem 2rem 2rem; gap: 1.2rem; z-index: 1001;
        border-left: 1px solid var(--border);
        transform: translateX(100%); transition: transform 0.35s ease;
        display: flex;
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links a { font-size: 1rem; }
    .nav-links .nav-cv-btn {
        margin-top: 0.5rem; text-align: center; display: inline-block;
        font-size: 0.9rem !important; padding: 0.6rem 1.4rem !important;
    }
    .hamburger { display: flex; }
}
@media (max-width: 768px) {
    section { padding: 1.7rem 1.2rem; }
    .section-title { font-size: 1.6rem; }
}
@media (max-width: 480px) {
    .hero-name { font-size: 2rem; }
    .hero-avatar { width: 180px; height: 180px; }
}

/* ===== LARGE SCREENS (1440p+) ===== */
@media (min-width: 1440px) {
    section { max-width: 1400px; padding: 2.6rem 3rem; }
    .hero-content { max-width: 1400px; }
    .hero-name { font-size: 4.5rem; }
    .hero-desc { font-size: 1.2rem; max-width: 600px; }
    .hero-greeting { font-size: 1.1rem; }
    .hero-roles { font-size: 1.2rem; }
    .hero-avatar { width: 350px; height: 350px; }
    .section-title { font-size: 2.6rem; }
    .timeline { max-width: 1300px; }
    .education-card { max-width: 900px; }
    .contact-content { gap: 4rem; }
    .project-card.featured .project-inner { gap: 0; }
    .project-card.featured .project-img-wrapper { min-height: 350px; }
    .modal-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .modal-gallery-grid img { height: 220px; }
    .project-modal { max-width: 1100px; }
}

/* ===== 2K SCREENS (1920p+) ===== */
@media (min-width: 1920px) {
    body { font-size: 18px; }
    section { max-width: 1600px; padding: 3rem 4rem; }
    .hero { padding: 10rem 4rem 6rem; }
    .hero-content { max-width: 1600px; gap: 6rem; }
    .hero-name { font-size: 5rem; }
    .hero-desc { font-size: 1.3rem; max-width: 650px; }
    .hero-avatar { width: 400px; height: 400px; }
    .hero-stat-value { font-size: 2.5rem; }
    .section-title { font-size: 3rem; }
    .section-tag { font-size: 0.95rem; }
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2.5rem; }
    .project-img-wrapper { height: 260px; }
    .side-project-card { width: 350px; }
    .side-project-thumb { height: 170px; }
    .timeline { max-width: 1500px; }
    .timeline-card { padding: 2rem 2.5rem; }
    .education-card { max-width: 1000px; padding: 3rem; }
    .contact-content { gap: 5rem; }
    .project-modal { max-width: 1200px; }
    .modal-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .modal-gallery-grid img { height: 250px; }
    .about-grid { gap: 4rem; }
}

/* ===== 4K SCREENS (2560p+) ===== */
@media (min-width: 2560px) {
    body { font-size: 20px; }
    section { max-width: 2000px; padding: 3.5rem 5rem; }
    .hero { padding: 12rem 5rem 8rem; }
    .hero-content { max-width: 2000px; gap: 8rem; }
    .hero-name { font-size: 6rem; }
    .hero-desc { font-size: 1.4rem; max-width: 750px; }
    .hero-greeting { font-size: 1.2rem; }
    .hero-roles { font-size: 1.3rem; }
    .hero-avatar { width: 450px; height: 450px; }
    .hero-stat-value { font-size: 3rem; }
    .section-title { font-size: 3.5rem; }
    .section-tag { font-size: 1rem; letter-spacing: 4px; }
    .section-header { margin-bottom: 3rem; }
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 3rem; }
    .project-img-wrapper { height: 300px; }
    .project-info { padding: 2rem; }
    .project-title { font-size: 1.5rem; }
    .project-desc { font-size: 1.1rem; }
    .side-project-card { width: 400px; }
    .side-project-thumb { height: 200px; }
    .timeline { max-width: 1800px; }
    .timeline-card { padding: 2.5rem 3rem; }
    .timeline-title { font-size: 1.3rem; }
    .education-card { max-width: 1200px; padding: 3.5rem; gap: 3rem; }
    .edu-info h3 { font-size: 1.3rem; }
    .contact-content { gap: 6rem; }
    .contact-method { padding: 1.5rem; }
    .about-grid { gap: 5rem; }
    .about-text p { font-size: 1.1rem; }
    .project-modal { max-width: 1500px; }
    .modal-title { font-size: 2.2rem; }
    .modal-description { font-size: 1.15rem; }
    .modal-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; }
    .modal-gallery-grid img { height: 280px; }
    .navbar { padding: 1rem 3rem; }
    .nav-logo { font-size: 1.3rem; }
    .nav-links a { font-size: 1rem; }
}

/* ===== ACHIEVEMENT TOAST ===== */
.achievement-toast {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 10000;
    background: var(--bg-card); border: 1px solid var(--primary);
    border-radius: 12px; padding: 1rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: var(--glow-primary);
    transform: translateX(400px); transition: transform 0.5s ease;
}
.achievement-toast.show { transform: translateX(0); }
.achievement-toast .ach-icon { font-size: 2rem; }
.achievement-toast .ach-text .ach-title {
    font-family: var(--font-heading); font-size: 0.7rem; color: var(--primary);
    text-transform: uppercase; letter-spacing: 2px;
}
.achievement-toast .ach-text .ach-desc { color: #fff; font-weight: 500; font-size: 0.95rem; }

/* ===== CUSTOM CURSOR DOT ===== */
.cursor-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); position: fixed; z-index: 99999;
    pointer-events: none; transition: transform 0.1s;
    box-shadow: 0 0 10px var(--primary);
    display: none;
}
@media (hover: hover) { .cursor-dot { display: block; } }

/* ===== ANIMATED 6->7 JUSTICE-SCALE ICON ===== */
.yrs-scale {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.6rem; height: 3.1rem; vertical-align: -1.1rem; margin: 0 0.15em;
}
.yrs-scale-svg { width: 100%; height: 100%; overflow: visible; }
.ys-post, .ys-arm, .ys-chain {
    stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round; fill: none;
}
.ys-base { fill: var(--primary); }
.ys-pivot { fill: var(--primary); }
.ys-pan-l { fill: rgba(0,240,255,0.16); stroke: var(--primary); stroke-width: 2; }
.ys-pan-r { fill: rgba(255,45,117,0.16); stroke: var(--secondary); stroke-width: 2; }
.ys-num {
    font-family: var(--font-mono); font-weight: 700; font-size: 14px;
    text-anchor: middle; dominant-baseline: central;
    transform-box: fill-box; transform-origin: center;
    paint-order: stroke; stroke-width: 0.9px; stroke-linejoin: round;
}
.ys-num-l { fill: var(--secondary); stroke: var(--secondary); }
.ys-num-r { fill: var(--primary); stroke: var(--primary); }
.ys-beam {
    transform-box: view-box; transform-origin: 40px 14px;
    animation: ysTilt 2.4s ease-in-out infinite;
}
.ys-num-l, .ys-num-r { animation: ysNum 2.4s ease-in-out infinite; }
@keyframes ysTilt { 0%,100% { transform: rotate(-11deg); } 50% { transform: rotate(11deg); } }
@keyframes ysNum  { 0%,100% { transform: rotate(11deg); }  50% { transform: rotate(-11deg); } }

/* Hero stat 6<->7 flip */
.hero-stat-value { display: inline-block; transform-origin: center; }
.hero-stat-value.flip { animation: statFlip 0.5s ease; }
@keyframes statFlip {
    0% { transform: rotateX(90deg); opacity: 0; }
    60% { transform: rotateX(-12deg); opacity: 1; }
    100% { transform: rotateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .ys-beam { animation: none; transform: rotate(0); }
    .ys-num-l, .ys-num-r { animation: none; transform: rotate(0); }
    .hero-stat-value.flip { animation: none; }
}

/* ===== GITHUB CONTRIBUTIONS HEATMAP ===== */
.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.activity-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}
.activity-card-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap;
}
.activity-card-header h3 {
    font-family: var(--font-heading); font-size: 1.05rem; color: #fff;
    text-transform: uppercase; letter-spacing: 1.5px;
    display: flex; align-items: center; gap: 0.6rem;
}
.activity-card-header h3 i { color: var(--primary); }
.activity-card-meta {
    font-family: var(--font-mono); color: var(--text-dim);
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px;
}
.activity-loading {
    color: var(--text-dim); font-family: var(--font-mono);
    font-size: 0.9rem; padding: 1rem 0; text-align: center;
}
.heatmap-scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.heatmap-scroll::-webkit-scrollbar { height: 6px; }
.heatmap-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.heatmap-wrapper { min-width: 760px; }
.heatmap-layout {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}
.heatmap-main { display: flex; flex-direction: column; gap: 4px; }
.heatmap-months {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 12px;
    gap: 3px;
    height: 14px;
    margin-left: 0;
}
.hm-month-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 14px;
}
.heatmap-days {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    gap: 3px;
    margin-top: 18px;
    padding-right: 4px;
}
.hm-day-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 12px;
    text-align: right;
}
.heatmap-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 12px);
    grid-auto-columns: 12px;
    gap: 3px;
}
.hm-cell {
    width: 12px; height: 12px; border-radius: 2px;
    background: #1a1a2e; border: 1px solid #1e1e30;
    display: inline-block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hm-cell:hover { transform: scale(1.35); z-index: 2; box-shadow: var(--glow-primary); }
.hm-cell.lvl-0 { background: #15151f; }
.hm-cell.lvl-1 { background: rgba(0, 240, 255, 0.20); border-color: rgba(0, 240, 255, 0.25); }
.hm-cell.lvl-2 { background: rgba(0, 240, 255, 0.45); border-color: rgba(0, 240, 255, 0.50); }
.hm-cell.lvl-3 { background: rgba(0, 240, 255, 0.70); border-color: rgba(0, 240, 255, 0.75); }
.hm-cell.lvl-4 {
    background: var(--primary); border-color: var(--primary);
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}
.heatmap-legend {
    display: flex; align-items: center; gap: 0.4rem; justify-content: flex-end;
    margin-top: 0.9rem; color: var(--text-dim);
    font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
}
.heatmap-legend .hm-cell { width: 11px; height: 11px; }
