/* CUSTOM CURSOR */
*, *::before, *::after { cursor: none !important; }

.cursor-dot {
    position: fixed;
    width: 7px; height: 7px;
    background: var(--text);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.3s;
}

.cursor-ring {
    position: fixed;
    width: 38px; height: 38px;
    border: 1.5px solid var(--muted);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.23,1,0.32,1),
                height 0.4s cubic-bezier(0.23,1,0.32,1),
                border-color 0.3s, opacity 0.3s;
}

/* Hover — ring expands, dot vanishes */
.cursor-dot.cur-hov  { transform: translate(-50%, -50%) scale(0); }
.cursor-ring.cur-hov { width: 56px; height: 56px; border-color: var(--blue); }

/* Click — ring snaps in, dot bursts out */
.cursor-dot.cur-clk  {
    transform: translate(-50%, -50%) scale(5);
    opacity: 0;
    transition: transform 0.45s ease, opacity 0.45s ease;
}
.cursor-ring.cur-clk { width: 14px; height: 14px; }

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
    *, *::before, *::after { cursor: auto !important; }
}

:root {
    --bg: #020610;
    --bg2: #060c1e;
    --card: rgba(255,255,255,0.04);
    --blue: #1a6bff;
    --purple: #e8001c;
    --pink: #c8a800;
    --grad: linear-gradient(135deg, #1a6bff 0%, #e8001c 55%, #c8a800 100%);
    --text: #eef2ff;
    --muted: rgba(200,215,255,0.52);
    --border: rgba(26,107,255,0.15);
    --nav-bg: rgba(2,6,16,0.88);
    --nav-scrolled: rgba(2,6,16,0.98);
    --surface: rgba(255,255,255,0.025);
    --bar-bg: rgba(255,255,255,0.06);
    --code-bg: rgba(255,255,255,0.06);
}

[data-theme="light"] {
    --bg: #f0f4ff;
    --bg2: #e6ecff;
    --card: rgba(255,255,255,0.75);
    --text: #08102e;
    --muted: rgba(20,50,130,0.62);
    --border: rgba(26,107,255,0.2);
    --nav-bg: rgba(240,244,255,0.88);
    --nav-scrolled: rgba(240,244,255,0.98);
    --surface: rgba(26,107,255,0.05);
    --bar-bg: rgba(0,0,0,0.08);
    --code-bg: rgba(26,107,255,0.1);
}

[data-theme="office"] {
    --bg: #f8fafc;
    --bg2: #f1f5f9;
    --card: #ffffff;
    --blue: #1e40af;
    --purple: #0369a1;
    --pink: #0891b2;
    --grad: linear-gradient(135deg, #1e40af 0%, #0369a1 50%, #0891b2 100%);
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --nav-bg: rgba(248,250,252,0.94);
    --nav-scrolled: rgba(255,255,255,0.99);
    --surface: rgba(30,64,175,0.04);
    --bar-bg: rgba(0,0,0,0.06);
    --code-bg: rgba(30,64,175,0.07);
}

/* Office mode — gridpaper background, no glow */
[data-theme="office"] body::before {
    background:
        linear-gradient(rgba(30,64,175,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,64,175,0.04) 1px, transparent 1px);
    background-size: 44px 44px;
}

/* Tone down hero particles in office */
[data-theme="office"] #hero-canvas { opacity: 0.05; }

/* Professional image border in office mode */
[data-theme="office"] .img-frame {
    box-shadow: 0 8px 40px rgba(30,64,175,0.1), 0 2px 8px rgba(0,0,0,0.08);
}
[data-theme="office"] .img-frame::before {
    background: conic-gradient(from 0deg, #1e40af, #0369a1, #0891b2, #1e40af);
}

/* Card shadows in office mode */
[data-theme="office"] .card,
[data-theme="office"] .tl-item,
[data-theme="office"] .stat,
[data-theme="office"] .resume-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(30,64,175,0.06);
    border-color: #e2e8f0;
}

/* Nav border in office mode */
[data-theme="office"] nav {
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'JetBrains Mono', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse 70% 60% at 5% 50%, rgba(26,107,255,0.07), transparent),
        radial-gradient(ellipse 50% 40% at 95% 30%, rgba(232,0,28,0.06), transparent),
        radial-gradient(ellipse 40% 30% at 50% 100%, rgba(200,168,0,0.04), transparent);
}
[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 70% 60% at 5% 50%, rgba(26,107,255,0.1), transparent),
        radial-gradient(ellipse 50% 40% at 95% 30%, rgba(232,0,28,0.08), transparent),
        radial-gradient(ellipse 40% 30% at 50% 100%, rgba(200,168,0,0.07), transparent);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* NAV */
nav {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 1.1rem 2.5rem;
    display: flex; justify-content: space-between; align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.theme-btn {
    background: none; border: 1px solid var(--border);
    border-radius: 50%; width: 36px; height: 36px;
    cursor: pointer; color: var(--muted); font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0; padding: 0;
}
.theme-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--surface); }
.logo {
    font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; font-weight: 700;
    background: var(--grad); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--muted); text-decoration: none; font-size: 0.88rem;
    font-weight: 500; transition: color 0.25s; position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--grad); transition: width 0.3s;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { width: 100%; }

/* HERO */
#hero {
    position: relative; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
#hero-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%; opacity: 0.7;
}.hero-inner {
    position: relative; z-index: 1;
    text-align: center; max-width: 860px; padding: 0 2rem;
}
.badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(26,107,255,0.08);
    border: 1px solid rgba(26,107,255,0.25);
    border-radius: 100px; padding: 0.45rem 1.1rem;
    font-size: 0.82rem; color: var(--blue);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2rem;
}
.badge-dot {
    width: 8px; height: 8px; background: var(--blue);
    border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(26,107,255,0.5); }
    50% { opacity: 0.7; transform: scale(1.3); box-shadow: 0 0 0 6px rgba(26,107,255,0); }
}
.hero-name {
    font-size: clamp(3.2rem, 8vw, 6.5rem); font-weight: 700;
    line-height: 1.05; margin-bottom: 1rem;
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.95rem, 2.2vw, 1.25rem);
    color: var(--muted); margin-bottom: 1.5rem; min-height: 2rem;
}
.cursor {
    display: inline-block; width: 2px; height: 1.1em;
    background: var(--blue); margin-left: 3px;
    vertical-align: middle; animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.hero-bio {
    font-size: 1.05rem; color: var(--muted);
    max-width: 580px; margin: 0 auto 2.8rem; line-height: 1.85;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-grad {
    padding: 0.85rem 1.9rem; background: var(--grad);
    border: none; border-radius: 8px; color: #fff;
    font-family: 'JetBrains Mono', sans-serif; font-size: 0.95rem;
    font-weight: 600; cursor: pointer; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 28px rgba(26,107,255,0.35);
}
.btn-grad:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(26,107,255,0.55); }
.btn-ghost {
    padding: 0.85rem 1.9rem; background: transparent;
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); font-family: 'JetBrains Mono', sans-serif;
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 20px rgba(26,107,255,0.2); }

.scroll-hint {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    color: var(--muted); font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    animation: bob 3s ease-in-out infinite;
}
@keyframes bob {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}
.scroll-arrow {
    width: 18px; height: 18px;
    border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
    transform: rotate(45deg);
}

/* SECTIONS */
section { padding: 7rem 2rem; }
.container { max-width: 1080px; margin: 0 auto; }
.sec-label {
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
    color: var(--blue); letter-spacing: 0.22em;
    text-transform: uppercase; margin-bottom: 0.7rem;
}
.sec-title {
    font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700;
    margin-bottom: 3.5rem; line-height: 1.2;
}
.sec-title span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* CARD */
.card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    background-image:
        linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.012) 3px, rgba(255,255,255,0.012) 6px);
    border: 1px solid var(--border);
    border-radius: 14px; padding: 2rem; backdrop-filter: blur(12px);
    transition: all 0.35s ease; position: relative; overflow: hidden;
}
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--grad); opacity: 0; transition: opacity 0.35s;
}
.card::after {
    content: ''; position: absolute; top: 0; left: -60px; width: 40px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(26,107,255,0.06), transparent);
    transform: skewX(-15deg); transition: left 0.6s ease; opacity: 0;
}
.card:hover::after { left: 110%; opacity: 1; }
.card:hover { border-color: rgba(26,107,255,0.35); transform: translateY(-5px); box-shadow: 0 20px 48px rgba(0,0,0,0.5), 0 0 30px rgba(26,107,255,0.18); }
.card:hover::before { opacity: 1; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 4rem; align-items: center; }
.img-frame {
    position: relative;
    border-radius: 20px;
    padding: 3px;
    overflow: hidden;
    animation: img-float 5s ease-in-out infinite;
    box-shadow:
        0 0 40px rgba(26,107,255,0.3),
        0 0 90px rgba(232,0,28,0.12);
}

/* Spinning conic-gradient border */
.img-frame::before {
    content: '';
    position: absolute;
    width: 300%;
    aspect-ratio: 1;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg, #1a6bff, #e8001c, #c8a800, #1a6bff);
    animation: img-spin 4s linear infinite;
    z-index: 0;
}

.img-frame img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 18px;
    display: block;
    filter: saturate(0.9);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.img-frame:hover img {
    filter: saturate(1.1) brightness(1.06);
    transform: scale(1.03);
}

@keyframes img-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

@keyframes img-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
.about-text h3 { font-size: 1.7rem; margin-bottom: 1rem; }
.about-text p { color: var(--muted); line-height: 1.85; margin-bottom: 1.2rem; font-size: 0.97rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.stat { text-align: center; padding: 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.stat-n { font-size: 2.2rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-l { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

/* EDUCATION */
#education { background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(26,107,255,0.06), transparent); }
.edu-inner { display: flex; gap: 2rem; align-items: flex-start; }
.edu-icon {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 0 24px rgba(26,107,255,0.4);
}
.edu-icon img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.edu-degree { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.3rem; }
.edu-school { color: var(--blue); font-size: 0.95rem; margin-bottom: 0.6rem; }
.edu-meta { display: flex; gap: 1rem; flex-wrap: wrap; }
.edu-meta span { font-family: 'JetBrains Mono', monospace; font-size: 0.77rem; color: var(--muted); }
.gpa { background: rgba(26,107,255,0.1); border: 1px solid rgba(26,107,255,0.3); padding: 0.2rem 0.75rem; border-radius: 100px; color: var(--blue) !important; }
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 2rem; }
.award {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative; overflow: hidden;
}
.award::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; border-radius: 3px 0 0 3px;
}
.award--gold::before { background: #f59e0b; }
.award--blue::before { background: #3b82f6; }
.award--green::before { background: #10b981; }
.award:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.15); }
.award-icon {
    font-size: 1.8rem; line-height: 1;
    flex-shrink: 0;
}
.award-title { font-size: 0.88rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.award-sub   { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* TIMELINE */
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.exp-head { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 2rem; }
.timeline { padding-left: 1.8rem; position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--blue), var(--purple), transparent); }
.tl-item { position: relative; margin-bottom: 2.5rem; }
.tl-item::before {
    content: ''; position: absolute; left: -2.3rem; top: 0.45rem;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--blue); border: 2px solid var(--bg);
    box-shadow: 0 0 14px rgba(26,107,255,0.7);
}
.tl-date { font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; color: var(--blue); margin-bottom: 0.35rem; }
.tl-role { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.2rem; }
.tl-org { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.7rem; }
.tl-ul { list-style: none; }
.tl-ul li { color: var(--muted); font-size: 0.88rem; line-height: 1.7; padding-left: 1.1rem; position: relative; margin-bottom: 0.3rem; }
.tl-ul li::before { content: '→'; position: absolute; left: 0; color: var(--purple); }

/* PROJECTS */
#projects { background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(26,107,255,0.04), transparent); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.5rem; }
.proj-img {
    width: 100%; height: 195px; object-fit: cover; border-radius: 12px;
    margin-bottom: 1.2rem; filter: saturate(0.75) brightness(0.85);
    transition: filter 0.35s; display: block;
}
.card:hover .proj-img { filter: saturate(1) brightness(1); }
.proj-img-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(26,107,255,0.14) 0%, rgba(232,0,28,0.10) 55%, rgba(200,168,0,0.10) 100%);
    font-size: 2.6rem;
}
.proj-date { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--blue); margin-bottom: 0.3rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.7rem; }
.tag {
    font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
    padding: 0.18rem 0.6rem; border-radius: 100px;
    background: rgba(26,107,255,0.1); border: 1px solid rgba(26,107,255,0.22);
    color: var(--purple);
}
.proj-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.proj-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.75; }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.5rem; }
.skill-cat { font-family: 'JetBrains Mono', monospace; font-size: 0.77rem; color: var(--blue); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 1.2rem; }
.skill-item { margin-bottom: 1.1rem; }
.skill-row { display: flex; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.88rem; }
.skill-row span:last-child { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }
.bar { height: 5px; background: var(--bar-bg); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--grad); width: 0; transition: width 1.4s cubic-bezier(0.4,0,0.2,1); }
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.5rem; }
.chip {
    padding: 0.4rem 0.9rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.84rem; color: var(--muted);
    transition: all 0.2s; cursor: default;
}
.chip:hover { border-color: var(--purple); color: var(--text); background: var(--surface); }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.domain-box { padding: 1.1rem; border-radius: 12px; }
.domain-box.blue { background: rgba(26,107,255,0.05); border: 1px solid rgba(26,107,255,0.14); }
.domain-box.purple { background: rgba(26,107,255,0.05); border: 1px solid rgba(26,107,255,0.14); }
.domain-box.pink { background: rgba(200,168,0,0.05); border: 1px solid rgba(200,168,0,0.14); }
.domain-head { font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.domain-box.blue .domain-head { color: var(--blue); }
.domain-box.purple .domain-head { color: var(--purple); }
.domain-box.pink .domain-head { color: var(--pink); }
.domain-box p { color: var(--muted); font-size: 0.86rem; line-height: 1.6; }

.gallery-wip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
}

/* LIFE EVENTS GALLERY */
#gallery { background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(26,107,255,0.03), transparent); }

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 2.2rem;
    padding: 1rem 0.5rem 2rem;
}

.event-card {
    background: #fff;
    padding: 10px 10px 46px;
    border-radius: 2px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.22), 0 1px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), box-shadow 0.35s ease;
    position: relative;
    z-index: 1;
}
.event-card:nth-child(3n+1) { transform: rotate(-1.8deg); }
.event-card:nth-child(3n+2) { transform: rotate(1.3deg); }
.event-card:nth-child(3n)   { transform: rotate(-0.6deg); }
.event-card:hover {
    transform: rotate(0deg) translateY(-10px) scale(1.04) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}

.event-photo {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #d1d5db;
    position: relative;
}
.event-photo img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: filter 0.3s;
    filter: saturate(0.88);
}
.event-card:hover .event-photo img { filter: saturate(1.05); }

.event-actions {
    position: absolute; top: 6px; right: 6px;
    display: flex; gap: 5px;
    opacity: 0; transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.event-card:hover .event-actions { opacity: 1; transform: translateY(0); }
@media (hover: none) { .event-actions { opacity: 1; transform: none; } }
.event-action-btn {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(2,6,16,0.65); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2); color: #fff;
    font-size: 0.8rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.event-action-btn:hover { background: rgba(26,107,255,0.85); }
.event-delete-btn:hover { background: rgba(220,38,38,0.85); }

.event-info { padding-top: 10px; text-align: center; }
.event-title {
    font-size: 0.8rem; font-weight: 600;
    color: #111827; margin-bottom: 4px; line-height: 1.35;
}
.event-desc {
    font-size: 0.68rem; color: #111827; line-height: 1.4;
    margin: 0 0 4px; padding: 0 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.event-meta { font-size: 0.7rem; color: #6b7280; line-height: 1.7; }
.event-tag {
    display: inline-block; margin-top: 5px;
    font-size: 0.62rem; background: rgba(26,107,255,0.1);
    color: #1e40af; padding: 2px 8px; border-radius: 100px;
    font-weight: 500; letter-spacing: 0.03em;
}

/* Ghost placeholder cards */
.events-empty { text-align: center; padding: 1rem 0 2rem; }
.events-placeholder {
    display: flex; gap: 1.8rem; flex-wrap: wrap;
    justify-content: center; margin-bottom: 2.5rem;
}
.event-ghost {
    width: 180px;
    background: #fff;
    padding: 8px 8px 38px;
    border-radius: 2px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    opacity: 0.35;
}
.event-ghost:nth-child(odd)  { transform: rotate(-1.5deg); }
.event-ghost:nth-child(even) { transform: rotate(1.2deg); }
.event-ghost-photo {
    width: 100%; aspect-ratio: 4/3;
    background: #e5e7eb;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin-bottom: 8px;
}
.ghost-line {
    height: 8px; background: #e5e7eb;
    border-radius: 4px; margin: 0 auto 5px; width: 78%;
}
.ghost-line.short { width: 52%; }

/* LIGHTBOX */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(5,5,20,0.92); backdrop-filter: blur(12px);
    align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90vw; max-height: 88vh;
    border-radius: 14px; box-shadow: 0 0 60px rgba(0,0,0,0.8);
    object-fit: contain;
}
.lb-close {
    position: absolute; top: 1.5rem; right: 1.8rem;
    font-size: 1.8rem; color: rgba(255,255,255,0.6);
    cursor: pointer; transition: color 0.2s; background: none; border: none;
    font-family: monospace; line-height: 1;
}
.lb-close:hover { color: #fff; }
.lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s; color: #fff; font-size: 1.1rem;
}
.lb-nav:hover { background: rgba(255,255,255,0.16); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }
.lb-caption {
    position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
    max-width: min(70vw, 480px); max-height: 30vh; overflow-y: auto;
    text-align: center; color: #111827; font-size: 0.9rem;
    background: rgba(255,255,255,0.94); backdrop-filter: blur(6px);
    border-radius: 12px; padding: 0.85rem 1.3rem;
    box-shadow: 0 10px 34px rgba(0,0,0,0.4);
}
.lb-caption .lb-cap-title { font-weight: 600; margin-bottom: 0.3rem; color: #111827; }
.lb-caption .lb-cap-desc { color: #374151; font-size: 0.82rem; line-height: 1.5; }

/* ADD MEMORY BUTTON */
.add-memory-btn {
    position: fixed; right: 1.8rem; bottom: 1.8rem; z-index: 500;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--grad); border: none; color: #fff;
    font-size: 1.6rem; line-height: 1; cursor: pointer;
    box-shadow: 0 8px 28px rgba(26,107,255,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.add-memory-btn:hover { transform: scale(1.08) rotate(90deg); box-shadow: 0 10px 34px rgba(26,107,255,0.55); }

/* ADD MEMORY MODAL */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 10000;
    background: rgba(5,5,20,0.72); backdrop-filter: blur(10px);
    align-items: center; justify-content: center; padding: 1.2rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
    position: relative; width: 100%; max-width: 460px;
    max-height: 90vh; overflow-y: auto;
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 18px; padding: 2rem;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal-close {
    position: absolute; top: 1.1rem; right: 1.2rem;
    background: none; border: none; color: var(--muted);
    font-size: 1.2rem; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 1.3rem; margin-bottom: 0.3rem; }
.modal-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.4rem; }
.form-row { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-size: 0.78rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.form-row input, .form-row textarea {
    background: var(--card); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.65rem 0.8rem; color: var(--text); font-size: 0.9rem;
    font-family: inherit; resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.modal-error { color: #ff5c5c; font-size: 0.82rem; min-height: 1.1em; margin-bottom: 0.6rem; }
.modal-actions { display: flex; gap: 0.7rem; }
#memory-submit { flex: 1; text-align: center; border: none; }
#memory-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-danger {
    flex: 0 0 auto; padding: 0 1rem; border-radius: 999px;
    background: transparent; border: 1px solid rgba(220,38,38,0.5);
    color: #ff5c5c; font-size: 0.85rem; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.btn-danger:hover { background: rgba(220,38,38,0.12); border-color: #ff5c5c; }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

/* CONTACT */
#contact { text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(26,107,255,0.07), transparent); }
.contact-box {
    display: inline-block; max-width: 580px; width: 100%;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 24px; padding: 3.5rem; text-align: center;
    position: relative; overflow: hidden;
}
.contact-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); }
.contact-box h3 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.contact-box p { color: var(--muted); margin-bottom: 2rem; font-size: 0.95rem; }
.contact-links { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.clink {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.1rem; background: rgba(255,255,255,0.03);
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--muted); text-decoration: none;
    font-size: 0.86rem; transition: all 0.2s;
}
.clink:hover { border-color: var(--blue); color: var(--blue); }

/* FOOTER */
footer { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

[data-theme="light"] .card {
    background: rgba(255,255,255,0.8);
    box-shadow: 0 2px 24px rgba(26,107,255,0.07);
}
[data-theme="light"] .card:hover {
    box-shadow: 0 20px 48px rgba(26,107,255,0.15), 0 0 30px rgba(26,107,255,0.12);
}
[data-theme="light"] .contact-box {
    background: rgba(255,255,255,0.85);
    box-shadow: 0 4px 32px rgba(26,107,255,0.1);
}
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg); }

/* NAV ACTIONS */
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

/* HAMBURGER BUTTON */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px; height: 36px;
    cursor: pointer;
    padding: 7px 7px;
    transition: border-color 0.2s;
}
.menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--muted);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-btn:hover { border-color: var(--blue); }
.menu-btn:hover span { background: var(--blue); }

/* MOBILE MENU OVERLAY */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.mobile-menu ul li:last-child { border-bottom: none; }
.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--blue); }

/* RESUME SECTION */
#resume { background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(26,107,255,0.05), transparent); }
.resume-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.resume-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.resume-icon {
    font-size: 2rem;
    width: 56px; height: 56px;
    background: var(--grad);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 24px rgba(26,107,255,0.4);
}
.resume-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.resume-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
}
.resume-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* MOBILE */
@media (max-width: 768px) {
    /* Nav */
    .menu-btn { display: flex; }
    nav { padding: 1rem 1.2rem; }
    nav .nav-links { display: none; }

    /* Sections */
    section { padding: 4rem 1.2rem; }
    .sec-title { margin-bottom: 2rem; }

    /* Hero */
    .hero-bio { font-size: 0.95rem; }
    .scroll-hint { display: none; }

    /* About */
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .img-frame { max-width: 240px; margin: 0 auto; }
    .stats { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
    .stat { padding: 0.9rem 0.5rem; }
    .stat-n { font-size: 1.6rem; }

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

    /* Projects */
    .proj-grid { grid-template-columns: 1fr; }

    /* Skills */
    .skills-grid { grid-template-columns: 1fr; }
    .skills-grid .card[style] { grid-column: 1 !important; }
    .domain-grid { grid-template-columns: 1fr 1fr; }

    /* Gallery */
    .events-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    /* Resume */
    .resume-card { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .resume-actions { width: 100%; }
    .resume-actions a { flex: 1; text-align: center; }

    /* Contact */
    .contact-box { padding: 2rem 1.2rem; }
    .contact-links { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .domain-grid { grid-template-columns: 1fr; }
    .awards { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn-grad, .btn-ghost { width: 100%; text-align: center; }
    .stats { grid-template-columns: repeat(3, 1fr); }
}
