/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #03080f;
    --bg2:       #060d18;
    --bg3:       #0a1525;
    --accent:    #38bdf8;
    --accent2:   #0ea5e9;
    --text:      #dde6f0;
    --muted:     #5a7490;
    --border:    rgba(56,189,248,0.12);
    --glow:      rgba(56,189,248,0.2);
    --font-head: 'Bebas Neue', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding-top: 60px;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Particle Canvas ── */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: -1 !important;
    pointer-events: none;
    opacity: 0.32;
    filter: blur(1.6px);
}

/* ── Navigation ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 60px;
    background: rgba(3,8,15,0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    pointer-events: auto;
}
.nav-logo { font-family: var(--font-head); font-size: 1.45rem; color: var(--text); letter-spacing: 0.06em; flex-shrink: 0; }
.nav-logo .dot { color: var(--accent); }
.nav-links { display: flex; gap: 30px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a { font-size: 0.85rem; font-weight: 400; color: var(--muted); text-decoration: none; transition: color 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width 0.25s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { font-size: 0.82rem; font-weight: 600; padding: 8px 20px; background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; text-decoration: none; transition: background 0.2s, color 0.2s; flex-shrink: 0; }
.nav-cta:hover { background: var(--accent); color: #000; }

/* ── Hero ── */
header, section { position: relative; z-index: 10; }

header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 5% 60px;
}
.hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--accent); background: rgba(56,189,248,0.07); border: 1px solid var(--border); padding: 5px 16px; border-radius: 99px; margin-bottom: 32px; letter-spacing: 0.06em; animation: fadeUp 0.8s ease both; }
.hero-name { font-family: var(--font-head); font-size: clamp(6rem, 20vw, 16rem); line-height: 0.9; letter-spacing: 0.04em; animation: fadeUp 0.9s 0.15s ease both; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1em; }
.hero-name .line { color: #fff; }
.hero-name .accent { color: var(--accent); }
.hero-sub { margin-top: 20px; font-size: clamp(0.78rem, 2vw, 1rem); color: var(--muted); font-weight: 300; letter-spacing: 0.1em; text-transform: uppercase; animation: fadeUp 1s 0.3s ease both; }
.hero-btns { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; animation: fadeUp 1s 0.45s ease both; position: relative; z-index: 20; }
.scroll-hint { position: absolute; bottom: 32px; display: flex; flex-direction: column; align-items: center; }
.scroll-line { width: 1px; height: 50px; background: linear-gradient(to bottom, var(--accent), transparent); animation: scrollPulse 2s ease-in-out infinite; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 12px 28px; border-radius: 6px; font-family: var(--font-body); font-weight: 600; font-size: 0.87rem; text-decoration: none; transition: all 0.25s ease; cursor: pointer; letter-spacing: 0.03em; position: relative; z-index: 10; }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #7dd3fc; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(56,189,248,0.25); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.18); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── Section Base ── */
section { padding: 100px 10%; }
.section-tag { display: inline-block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
h2 { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 400; color: #fff; letter-spacing: 0.04em; margin-bottom: 40px; }

/* ── About ── */
#about { background: var(--bg2); }

.about-top {
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: start;
    gap: 60px;
    margin-bottom: 70px;
}

.about-photo-wrap {
    position: relative;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}
.about-photo-wrap.visible { opacity: 1; transform: translateY(0); }

/* ── BIGGER PROFILE PHOTO ── */
.profile-pic {
    width: 260px;
    height: 320px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--border);
    display: block;
    position: relative;
    z-index: 1;
}
.photo-glow { position: absolute; inset: -16px; border-radius: 24px; background: radial-gradient(circle, var(--glow) 0%, transparent 70%); z-index: 0; pointer-events: none; }

.about-bio { font-size: 0.97rem; line-height: 1.8; color: var(--muted); font-weight: 300; margin-bottom: 12px; }

.role-hint { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.08em; margin-bottom: 12px; }

/* Role Tabs as links */
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.role-tab {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
    display: inline-block;
}
.role-tab:hover:not(.locked) { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.role-tab.locked { opacity: 0.25; cursor: default; pointer-events: none; }

/* Stats */
.stats-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat-card { background: rgba(56,189,248,0.06); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.stat-val { font-family: var(--font-head); font-size: 2rem; color: var(--accent); letter-spacing: 0.04em; line-height: 1; }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text); letter-spacing: 0.05em; }
.stat-sub { font-size: 0.72rem; color: var(--muted); }

/* About sub-blocks */
.about-block { margin-top: 60px; padding-top: 50px; border-top: 1px solid var(--border); opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.about-block.visible { opacity: 1; transform: translateY(0); }
.about-block .section-tag { display: block; margin-bottom: 18px; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row.large .chip { font-size: 0.85rem; padding: 7px 16px; }
.chip { font-size: 0.75rem; font-weight: 600; color: var(--text); background: rgba(255,255,255,0.05); border: 1px solid var(--border); padding: 5px 13px; border-radius: 99px; letter-spacing: 0.03em; transition: border-color 0.2s, color 0.2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Achievements */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ach-card { display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; transition: border-color 0.2s, transform 0.2s; }
.ach-card:hover:not(.ach-empty) { border-color: rgba(56,189,248,0.3); transform: translateY(-3px); }
.ach-card.ach-empty { opacity: 0.35; }
.ach-icon { font-size: 1.6rem; flex-shrink: 0; width: 40px; text-align: center; }
.ach-info { display: flex; flex-direction: column; gap: 3px; }
.ach-title { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.ach-sub { font-size: 0.74rem; color: var(--muted); }

/* ── Skills ── */
#skills { background: var(--bg); }
.skills-list { max-width: 520px; display: flex; flex-direction: column; gap: 28px; }
.skill-header { display: flex; justify-content: space-between; font-size: 0.88rem; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.skill-pct { font-family: var(--font-head); font-size: 1rem; color: var(--accent); letter-spacing: 0.06em; }
.skill-bar { background: rgba(255,255,255,0.05); height: 5px; border-radius: 99px; overflow: hidden; }
.skill-level { height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--accent2), var(--accent)); }

/* ── Projects ── */
#tech-projects { background: var(--bg2); }
#outside-projects { background: var(--bg); }
.projects-container { display: flex; gap: 20px; flex-wrap: wrap; }
.project-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); padding: 28px; border-radius: 12px; width: 290px; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; position: relative; z-index: 1; }
.project-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top left, rgba(56,189,248,0.05), transparent 70%); pointer-events: none; z-index: -1; border-radius: 12px; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.6); border-color: rgba(56,189,248,0.35); }
.card-tag { display: inline-block; font-size: 0.67rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); background: rgba(56,189,248,0.08); padding: 3px 10px; border-radius: 99px; margin-bottom: 14px; }
.project-card h3 { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.04em; color: #fff; margin-bottom: 10px; }
.project-card p { font-size: 0.86rem; line-height: 1.7; color: var(--muted); margin-bottom: 20px; }

/* ── Gallery ── */
#gallery { background: var(--bg2); }
.gallery-intro { font-size: 0.9rem; color: var(--muted); font-weight: 300; margin-bottom: 24px; margin-top: -20px; }
.gallery-tabs { display: flex; gap: 10px; margin-bottom: 24px; }
.gtab { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; padding: 7px 18px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.gtab:hover { color: var(--text); border-color: rgba(56,189,248,0.3); }
.gtab.active { background: var(--accent); color: #000; border-color: var(--accent); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery-item { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; position: relative; }
.gallery-item img, .gallery-item video { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; transition: transform 0.4s; }
.gallery-item:hover img, .gallery-item:hover video { transform: scale(1.05); }
.gallery-item::after { content: '&#128269;'; position: absolute; inset: 0; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; opacity: 0; transition: all 0.3s; border-radius: 10px; }
.gallery-item:hover::after { background: rgba(0,0,0,0.35); opacity: 1; }

.gallery-ph { width: 100%; height: 100%; background: rgba(255,255,255,0.03); border: 1px dashed rgba(56,189,248,0.2); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); cursor: default; }
.gallery-ph span { font-size: 1.8rem; }
.gallery-ph p { font-size: 0.75rem; letter-spacing: 0.05em; }

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.93);
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lb-content { display: flex; align-items: center; justify-content: center; }
.lb-content img, .lb-content video { border-radius: 8px; box-shadow: 0 0 60px rgba(0,0,0,0.8); }
.lb-close {
    position: fixed;
    top: 20px; right: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.2rem;
    width: 42px; height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 1001;
}
.lb-close:hover { background: rgba(255,255,255,0.2); }
.lb-arrow {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.4rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 1001;
}
.lb-arrow:hover { background: rgba(255,255,255,0.18); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* ── Contact ── */
#contact { background: var(--bg); }
.contact-email { font-family: var(--font-head); font-size: clamp(1.4rem, 4vw, 2.2rem); color: var(--accent); letter-spacing: 0.06em; }

/* ── Footer ── */
footer { text-align: center; padding: 26px; background: #020509; color: var(--muted); font-size: 0.78rem; border-top: 1px solid var(--border); position: relative; z-index: 10; }

/* ── Keyframes ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scrollPulse { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* ── Responsive ── */
@media (max-width: 768px) {
    nav { padding: 0 5%; }
    .nav-links { display: none; }
    .hero-name { font-size: clamp(4.5rem, 22vw, 7rem); }
    section { padding: 70px 6%; }
    .about-top { grid-template-columns: 1fr; gap: 32px; }
    .about-photo-wrap { width: fit-content; margin: 0 auto; }
    .profile-pic { width: 200px; height: 240px; }
    .stats-row { flex-direction: column; }
    .lb-arrow { display: none; }
}
