/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── TOKENS ── */
:root {
    --bg:       #09090f;
    --bg2:      #0f0f1a;
    --bg3:      #141422;
    --surface:  #1a1a2e;
    --border:   rgba(255,255,255,0.07);
    --border2:  rgba(255,255,255,0.15);
    --text:     #eeeef5;
    --text2:    #8888a8;
    --text3:    #444460;
    --accent:   #5b7fff;
    --accent2:  #7c5bff;
    --glow:     rgba(91,127,255,0.18);
    --green:    #4ade80;
    --yellow:   #facc15;
    --radius:   14px;
    --ease:     cubic-bezier(.4,0,.2,1);
    --f-head:   'Syne', sans-serif;
    --f-mono:   'DM Mono', monospace;
    --f-body:   'DM Sans', sans-serif;
}

body.light {
    --bg:      #f5f5fc;
    --bg2:     #eeeef8;
    --bg3:     #e5e5f2;
    --surface: #ffffff;
    --border:  rgba(0,0,0,0.07);
    --border2: rgba(0,0,0,0.18);
    --text:    #0c0c1a;
    --text2:   #4a4a6a;
    --text3:   #9090b0;
    --glow:    rgba(91,127,255,0.12);
}

body {
    font-family: var(--f-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    transition: background .3s var(--ease), color .3s var(--ease);
}

/* ── CURSOR ── */
.cursor, .cursor-ring {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%,-50%);
}
.cursor { width: 8px; height: 8px; background: var(--accent); transition: opacity .3s; }
.cursor-ring {
    width: 30px; height: 30px;
    border: 1.5px solid rgba(91,127,255,.45);
    transition: width .25s, height .25s, background .25s, border-color .25s;
}
.cursor-ring.hov { width: 46px; height: 46px; background: rgba(91,127,255,.08); border-color: var(--accent); }
@media (pointer:coarse) { .cursor, .cursor-ring { display:none; } }

/* ── NAV ── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    transition: background .3s var(--ease), backdrop-filter .3s;
}
nav.scrolled {
    background: rgba(9,9,15,.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}
body.light nav.scrolled { background: rgba(245,245,252,.88); }

.nav-inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 68px; padding: 0 1.5rem;
}

.nav-logo {
    font-family: var(--f-head); font-size: 1.45rem; font-weight: 800;
    color: var(--text); text-decoration: none; letter-spacing: -.03em;
}
.dot { color: var(--accent); }

.nav-links {
    list-style: none; display: flex; align-items: center; gap: .25rem;
}
.nav-links li a {
    font-size: .875rem; font-weight: 500; color: var(--text2);
    text-decoration: none; padding: .45rem .85rem; border-radius: 7px;
    transition: color .2s, background .2s;
}
.nav-links li a:hover { color: var(--text); background: var(--surface); }

.resume-btn {
    font-family: var(--f-mono) !important;
    font-size: .78rem !important;
    color: var(--accent) !important;
    border: 1px solid rgba(91,127,255,.35) !important;
    margin-left: .5rem;
    transition: background .2s, border-color .2s !important;
}
.resume-btn:hover { background: var(--glow) !important; border-color: var(--accent) !important; }

.nav-controls { display: flex; align-items: center; gap: .75rem; }

.theme-btn {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text2); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color .2s, border-color .2s;
}
.theme-btn:hover { color: var(--text); border-color: var(--border2); }
.sun-icon { display: none; }
.moon-icon { display: block; }
body.light .sun-icon { display: block; }
body.light .moon-icon { display: none; }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 6px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── LAYOUT ── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 96px 0; }
.alt-bg { background: var(--bg2); }

.section-head {
    margin-bottom: 3.5rem;
    display: flex; align-items: baseline; gap: 1rem;
}
.sec-num {
    font-family: var(--f-mono); font-size: .72rem;
    color: var(--accent); letter-spacing: .15em;
}
.section-head h2 {
    font-family: var(--f-head); font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800; letter-spacing: -.035em; line-height: 1;
}

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── HERO ── */
.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    justify-content: center; position: relative; overflow: hidden;
}
.hero-grid-bg {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(91,127,255,.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(91,127,255,.04) 1px, transparent 1px);
    background-size: 72px 72px;
}
.hero-glow {
    position: absolute; top: -15%; right: -5%;
    width: 640px; height: 640px; border-radius: 50%;
    background: radial-gradient(circle, rgba(91,127,255,.09) 0%, transparent 65%);
    pointer-events: none;
}

.hero-layout {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr auto;
    gap: 3rem; align-items: center;
    padding-top: 100px; padding-bottom: 60px;
}

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--f-mono); font-size: .78rem; color: var(--text2);
    margin-bottom: 1.25rem; letter-spacing: .05em;
}
.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    animation: pulse 2.2s infinite;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.45); }
    50%      { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
}

.hero-text h1 {
    font-family: var(--f-head);
    font-size: clamp(2.75rem, 5.5vw, 5.5rem);
    font-weight: 800; letter-spacing: -.05em; line-height: .9;
    margin-bottom: 1.25rem;
}
.hero-text h1 em {
    font-style: normal;
    -webkit-text-stroke: 2px var(--text);
    color: transparent;
    transition: color .3s, -webkit-text-stroke-color .3s;
}
.hero-text h1:hover em { color: var(--accent); -webkit-text-stroke-color: var(--accent); }

.hero-sub {
    font-size: 1.1rem; color: var(--text2); margin-bottom: 2rem;
    max-width: 440px; line-height: 1.7;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

.hero-btns { display: flex; gap: .875rem; margin-bottom: 2rem; flex-wrap: wrap; }

.btn-accent {
    display: inline-flex; align-items: center;
    padding: .85rem 1.65rem; background: var(--accent);
    color: #fff; font-family: var(--f-body); font-size: .9rem; font-weight: 600;
    border-radius: 8px; text-decoration: none; border: none; cursor: pointer;
    box-shadow: 0 4px 22px var(--glow);
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--glow); background: #6b8fff; }

.btn-outline {
    display: inline-flex; align-items: center;
    padding: .85rem 1.5rem; background: transparent;
    color: var(--text2); font-family: var(--f-body); font-size: .9rem; font-weight: 500;
    border-radius: 8px; text-decoration: none; border: 1px solid var(--border);
    transition: color .2s, border-color .2s, background .2s;
}
.btn-outline:hover { color: var(--text); border-color: var(--border2); background: var(--surface); }

.hero-socials { display: flex; gap: .625rem; flex-wrap: wrap; }
.social-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .35rem .85rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: 50px;
    color: var(--text2); font-size: .78rem; font-weight: 500;
    text-decoration: none; transition: color .2s, border-color .2s, transform .2s;
}
.social-chip:hover { color: var(--text); border-color: var(--border2); transform: translateY(-1px); }

/* Photo */
.hero-photo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.photo-wrap {
    width: 240px;
    height: 240px;
    position: relative; border-radius: 22px; overflow: hidden;
    flex-shrink: 0;
}
.photo-wrap::before {
    content: ''; position: absolute; inset: -2px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 24px; z-index: 0;
}
.photo-wrap img {
    position: relative; z-index: 1; width: 100%; height: 100%;
    object-fit: cover; object-position: top center;
    border-radius: 20px; display: block;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px;
    padding: .6rem .9rem; display: flex; flex-direction: column;
}
.card-a, .card-b { position: static; animation: none; }
.hero-photo .stat-row {
    display: flex; gap: .75rem; justify-content: center;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.stat-n { font-family: var(--f-head); font-size: 1.5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-l { font-family: var(--f-mono); font-size: .65rem; color: var(--text2); margin-top: .2rem; }

.scroll-cue {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    color: var(--text3); font-family: var(--f-mono); font-size: .65rem;
    letter-spacing: .12em; z-index: 1;
}
.scroll-bar { width: 1px; height: 38px; background: linear-gradient(to bottom, var(--accent), transparent); animation: scb 2s ease-in-out infinite; }
@keyframes scb { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ── ABOUT ── */
.about-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4.5rem; }

.lead-text { font-size: 1.15rem; font-weight: 500; margin-bottom: .875rem; line-height: 1.6; }
.body-text { color: var(--text2); font-size: .94rem; margin-bottom: .875rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.tag-row span {
    padding: .35rem .85rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: 50px;
    font-size: .8rem; font-weight: 500; color: var(--text2);
}

.block-title { font-family: var(--f-head); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

.edu-stack { display: flex; flex-direction: column; gap: 1rem; }
.edu-card {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.1rem 1.25rem;
    transition: border-color .2s;
}
.edu-card:hover { border-color: var(--border2); }

.edu-badge {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-mono); font-size: .6rem; font-weight: 700;
    color: #fff; letter-spacing: .04em;
}
.edu-info h4 { font-size: .92rem; font-weight: 600; margin-bottom: .2rem; }
.edu-info p { font-size: .8rem; color: var(--text2); margin-bottom: .25rem; }

.date-tag { font-family: var(--f-mono); font-size: .68rem; color: var(--accent); display: block; }

.course-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.course-tags span {
    font-size: .75rem; padding: .28rem .72rem;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 5px; color: var(--text2);
}

/* ── EXPERIENCE ── */
.exp-list { display: flex; flex-direction: column; gap: 1.25rem; max-width: 860px; }

.exp-card {
    display: grid; grid-template-columns: 160px 1fr;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: border-color .2s, transform .2s;
}
.exp-card:hover { border-color: var(--border2); transform: translateX(4px); }

.exp-left {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: .75rem;
    padding: 1.5rem 1rem; background: var(--surface);
    border-right: 1px solid var(--border); text-align: center;
}
.exp-logo {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.exp-meta { display: flex; flex-direction: column; gap: .2rem; }
.exp-co { font-size: .8rem; font-weight: 700; color: var(--text); }
.exp-date { font-family: var(--f-mono); font-size: .65rem; color: var(--text3); }

.exp-right { padding: 1.5rem; position: relative; }
.exp-badge {
    display: inline-block; font-family: var(--f-mono); font-size: .63rem;
    padding: .2rem .6rem; border-radius: 4px; margin-bottom: .6rem;
    background: rgba(74,222,128,.12); color: var(--green);
    border: 1px solid rgba(74,222,128,.25); letter-spacing: .06em;
}
.exp-right h3 {
    font-family: var(--f-head); font-size: 1.1rem; font-weight: 700;
    letter-spacing: -.01em; margin-bottom: .6rem;
}
.exp-right p { font-size: .88rem; color: var(--text2); line-height: 1.7; }

/* ── PROJECTS ── */
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.f-btn {
    padding: .45rem 1.1rem; background: transparent;
    border: 1px solid var(--border); border-radius: 6px;
    cursor: pointer; font-family: var(--f-mono); font-size: .76rem;
    color: var(--text2); letter-spacing: .05em;
    transition: all .2s;
}
.f-btn:hover { color: var(--text); border-color: var(--border2); }
.f-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; }

.proj-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    display: flex; flex-direction: column; gap: .65rem;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    position: relative; overflow: hidden;
    animation: fadeUp .35s var(--ease) both;
}
.proj-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    opacity: 0; transition: opacity .2s;
}
.proj-card:hover { border-color: var(--border2); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.28); }
.proj-card:hover::after { opacity: 1; }
@keyframes fadeUp { from { opacity:0; transform: translateY(14px); } to { opacity:1; transform: none; } }

.proj-label {
    font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em;
    display: flex; align-items: center; gap: .35rem;
}
.proj-label-dot { width: 6px; height: 6px; border-radius: 50%; }

.proj-card h3 {
    font-family: var(--f-head); font-size: .97rem; font-weight: 700;
    letter-spacing: -.01em; color: var(--text);
}
.proj-card p { font-size: .83rem; color: var(--text2); line-height: 1.65; flex: 1; }

.proj-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.proj-tag {
    font-family: var(--f-mono); font-size: .65rem;
    padding: .18rem .55rem; background: var(--bg3);
    border: 1px solid var(--border); border-radius: 4px; color: var(--text3);
}

.proj-links {
    display: flex; gap: .75rem; padding-top: .65rem;
    border-top: 1px solid var(--border);
}
.proj-link {
    font-size: .8rem; font-weight: 500; color: var(--accent);
    text-decoration: none; transition: opacity .2s;
}
.proj-link:hover { opacity: .7; }

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }

.skill-card {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
}
.skill-card h3 {
    font-family: var(--f-head); font-size: .92rem; font-weight: 700;
    letter-spacing: .01em; margin-bottom: 1.1rem; color: var(--text);
}

.bar-list { display: flex; flex-direction: column; gap: .65rem; }
.bar-item { display: grid; grid-template-columns: 108px 1fr; align-items: center; gap: .875rem; }
.bar-item span { font-family: var(--f-mono); font-size: .76rem; color: var(--text2); }
.bar-track { height: 3px; background: var(--surface); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 2px; transition: width 1s var(--ease); }

.chip-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
    font-size: .76rem; padding: .32rem .72rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text2); cursor: default;
    transition: color .2s, border-color .2s;
}
.chip:hover { color: var(--text); border-color: var(--border2); }
.chip.hi { color: var(--accent); border-color: rgba(91,127,255,.28); }

.cert-list { display: flex; flex-direction: column; gap: .65rem; }
.cert-row { display: flex; align-items: center; gap: .65rem; font-size: .85rem; color: var(--text2); }
.cert-badge {
    font-family: var(--f-mono); font-size: .62rem; letter-spacing: .05em;
    padding: .18rem .52rem; border-radius: 4px; white-space: nowrap;
}
.cert-row.progress .cert-badge { background: rgba(250,204,21,.12); color: var(--yellow); border: 1px solid rgba(250,204,21,.25); }
.cert-row.planned  .cert-badge { background: var(--surface); color: var(--text3); border: 1px solid var(--border); }

/* ── LEADERSHIP ── */
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

.lead-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    display: flex; gap: 1rem; align-items: flex-start;
    transition: border-color .2s, transform .2s;
}
.lead-card:hover { border-color: var(--border2); transform: translateY(-3px); }

.lead-icon { font-size: 1.65rem; line-height: 1; flex-shrink: 0; }
.lead-card h3 { font-family: var(--f-head); font-size: .92rem; font-weight: 700; margin-bottom: .25rem; }
.lead-card p { font-size: .82rem; color: var(--text2); line-height: 1.6; margin-top: .4rem; }

/* ── CONTACT ── */
.contact-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: 4rem; align-items: start; }

.contact-links { display: flex; flex-direction: column; gap: .875rem; margin-top: 1.5rem; }
.contact-link {
    display: flex; align-items: center; gap: .875rem;
    padding: .9rem 1.1rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; transition: border-color .2s, transform .2s;
}
.contact-link:hover { border-color: var(--border2); transform: translateX(4px); }

.cl-icon {
    width: 38px; height: 38px; background: var(--bg3); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); flex-shrink: 0;
}
.cl-label { font-family: var(--f-mono); font-size: .65rem; color: var(--text3); letter-spacing: .08em; display: block; margin-bottom: .15rem; }
.cl-value { font-size: .88rem; font-weight: 500; color: var(--text); display: block; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-family: var(--f-mono); font-size: .72rem; color: var(--text2); letter-spacing: .05em; }
.form-group input, .form-group textarea {
    padding: .8rem 1rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); font-family: var(--f-body); font-size: .9rem;
    outline: none; resize: vertical; transition: border-color .2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text3); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }

.form-msg { display: none; font-size: .85rem; padding: .7rem 1rem; border-radius: 8px; margin-top: .25rem; }
.form-msg.ok { display: block; background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3); color: var(--green); }
.form-msg.err { display: block; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: #f87171; }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--border); padding: 1.75rem 0; background: var(--bg); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--f-head); font-weight: 800; font-size: .95rem; }
.footer-copy { font-family: var(--f-mono); font-size: .7rem; color: var(--text3); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: .8rem; color: var(--text2); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .hero-layout { grid-template-columns: 1fr; }
    .hero-photo { display: none; }
    .about-layout { grid-template-columns: 1fr; gap: 3rem; }
    .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
    .exp-card { grid-template-columns: 1fr; }
    .exp-left { flex-direction: row; justify-content: flex-start; border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; position: fixed; inset: 68px 0 0 0;
        background: var(--bg); flex-direction: column;
        align-items: center; justify-content: center; gap: 1.25rem; z-index: 199;
    }
    .nav-links.open { display: flex; }
    .nav-links li a { font-size: 1.2rem; }
    .hamburger { display: flex; }
    section { padding: 64px 0; }
    .hero-text h1 { font-size: 3.5rem; }
    .section-head h2 { font-size: 2rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 2.75rem; }
    .hero-btns { flex-direction: column; }
    .btn-accent, .btn-outline { width: 100%; justify-content: center; }
    .projects-grid { grid-template-columns: 1fr; }
}