/* ═══ TOKENS — Vercel / Geist ═══ */
:root {
    --bg:        #000000;
    --bg-2:      #0a0a0a;
    --card:      #0a0a0a;
    --card-hov:  #111111;
    --border:    #1f1f1f;
    --border-hi: #3a3a3a;
    --fg:        #ededed;
    --fg-2:      #a1a1a1;
    --fg-3:      #6e6e6e;
    --white:     #ffffff;
    --link:      #4da3ff;
    --radius:    10px;
    --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 2.5px;
    background: linear-gradient(to right, #4da3ff, #ffffff, #4da3ff);
    background-size: 200% auto;
    width: 0%; z-index: 2000; pointer-events: none;
    animation: progressGlow 4s linear infinite;
    box-shadow: 0 0 8px rgba(77, 163, 255, 0.5);
}
@keyframes progressGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--white); color: #000; }

/* ═══ NAVBAR ═══ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}
.navbar.scrolled { border-bottom-color: var(--border); background: rgba(0,0,0,0.8); }

.nav-brand {
    display: flex; align-items: center; gap: 9px;
    font-weight: 600; font-size: .95rem; letter-spacing: -.02em;
}
.nav-brand .tri {
    width: 0; height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 16px solid var(--white);
}

.nav-links { display: flex; gap: 2px; }
.nav-links a {
    padding: 8px 14px; border-radius: 6px;
    font-size: .85rem; font-weight: 400;
    color: var(--fg-2);
    transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-2); }
.nav-links a.active { color: var(--fg); }

.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    padding: 8px; flex-direction: column; gap: 5px;
}
.hamburger span { width: 22px; height: 1.5px; background: var(--fg); transition: .3s; }

/* ═══ HERO ═══ */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 0 24px;
    overflow: hidden;
}
/* grid + glow backdrop */
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero::after {
    content: ''; position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
    width: 750px; height: 550px;
    background: radial-gradient(ellipse at center, rgba(80,120,255,.14), transparent 70%);
    filter: blur(25px); pointer-events: none;
    animation: floatGlow 18s ease-in-out infinite;
}
@keyframes floatGlow {
    0% { transform: translateX(-50%) translateY(0px) scale(1); }
    33% { transform: translateX(-48%) translateY(-25px) scale(1.06); }
    66% { transform: translateX(-53%) translateY(20px) scale(0.95); }
    100% { transform: translateX(-50%) translateY(0px) scale(1); }
}
.hero-content { position: relative; z-index: 2; max-width: 860px; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
    color: var(--fg-2); text-transform: uppercase;
    padding: 6px 14px; margin-bottom: 28px;
    border: 1px solid var(--border); border-radius: 50px;
    background: var(--bg-2);
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #3ad17b; box-shadow: 0 0 8px #3ad17b; }

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 700; line-height: 1.05; letter-spacing: -.045em;
    background: linear-gradient(180deg, #fff 30%, #999);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 26px;
}
.hero h2 {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 400; color: var(--fg-2);
    max-width: 620px; margin: 0 auto 40px; line-height: 1.65;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; border-radius: 8px;
    font-family: var(--sans); font-size: .9rem; font-weight: 500;
    cursor: pointer; border: 1px solid transparent; transition: all .2s;
}
.btn-primary { background: var(--white); color: #000; }
.btn-primary:hover { background: #d0d0d0; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border-hi); }
.btn-ghost:hover { border-color: var(--fg-2); background: var(--bg-2); }

/* ═══ SECTION SHELL ═══ */
.section { max-width: 1100px; margin: 0 auto; padding: 110px 24px; }
.sec-head { margin-bottom: 56px; }
.eyebrow {
    font-family: var(--mono); font-size: .74rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--fg-3); display: block; margin-bottom: 14px;
}
.sec-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600;
    letter-spacing: -.035em; line-height: 1.1;
}
.sec-head p { color: var(--fg-2); margin-top: 14px; max-width: 560px; font-size: 1rem; }

.topline { border-top: 1px solid var(--border); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.vis { opacity: 1; transform: none; }

/* ═══ ABOUT ═══ */
.about-wrapper {
    display: grid; grid-template-columns: 380px 1fr; gap: 60px; align-items: start;
}
.about-media {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); background: var(--bg-2);
}
.img-slot {
    width: 100%; aspect-ratio: 4/5;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    color: var(--fg-3); font-family: var(--mono); font-size: .72rem; text-align: center;
}
.img-slot .cam { font-size: 1.6rem; opacity: .5; }
/* Wide banner (leadership) & Slideshow */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 24px;
}
.banner {
    position: relative; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: var(--bg-2);
}
.slideshow-container {
    position: relative; width: 100%; aspect-ratio: 21/9; overflow: hidden;
}
.banner-grid .slideshow-container {
    aspect-ratio: 16/10;
}
.slideshow-container::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.85) 100%),
                linear-gradient(to right, rgba(0,0,0,0.6) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.6) 100%);
    pointer-events: none; z-index: 2;
}
.slideshow-container .slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
    filter: grayscale(40%) brightness(0.8);
    transition: opacity 1s ease-in-out, filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.03);
    z-index: 1;
}
.slideshow-container .slide.active {
    opacity: 1;
    transform: scale(1.00);
}
.banner:hover .slideshow-container .slide.active {
    filter: grayscale(0%) brightness(1.02);
    transform: scale(1.015);
}
.banner-cap { margin-top: 12px; color: var(--fg-2); font-size: .92rem; line-height: 1.7; max-width: 640px; }
@media (max-width: 860px) {
    .slideshow-container { aspect-ratio: 4/3; }
    .banner-grid { grid-template-columns: 1fr; gap: 24px; }
    .banner-grid .slideshow-container { aspect-ratio: 4/3; }
}

.about-info .label { font-family: var(--mono); font-size: .78rem; color: var(--fg-3); margin-bottom: 10px; }
.about-info .name { font-size: 2rem; font-weight: 600; letter-spacing: -.03em; }
.about-info .title-role {
    display: inline-block; font-family: var(--mono); font-size: .8rem; color: var(--fg-2);
    margin: 12px 0 24px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 50px;
}
.about-info .bio { color: var(--fg-2); margin-bottom: 18px; font-size: 1rem; line-height: 1.75; }
.read-more, .link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--fg); font-size: .9rem; font-weight: 500; margin-top: 6px;
    border-bottom: 1px solid var(--border-hi); padding-bottom: 2px; transition: border-color .2s;
}
.read-more:hover, .link:hover { border-color: var(--fg); }

/* ═══ GENERIC CARD GRID ═══ */
.grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.academic-grid { grid-template-columns: repeat(3, 1fr); }
.leadership-grid { grid-template-columns: repeat(3, 1fr); }
.portfolio-grid { grid-template-columns: repeat(3, 1fr); }

/* Bento Skills Grid Configuration */
.skills-grid {
    grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 861px) {
    .skills-grid .cell-large {
        grid-column: span 2;
    }
    .skills-grid .cell-small {
        grid-column: span 1;
    }
}
.bento-content {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.bento-vis {
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.cell:hover .bento-vis {
    transform: translateY(-2px);
    border-color: var(--border-hi) !important;
}
@media (max-width: 768px) {
    .bento-content {
        flex-direction: column;
        align-items: stretch;
    }
    .bento-vis {
        width: 100% !important;
        margin-top: 16px;
    }
}

/* Vector SVG Icons */
.svg-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.cell:hover .svg-icon {
    transform: scale(1.15) rotate(2deg);
    filter: drop-shadow(0 0 6px currentColor);
}
.q-icon-svg {
    width: 24px;
    height: 24px;
    margin: 0 auto 14px;
    display: block;
    stroke: currentColor;
    fill: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}
.quality-box:hover .q-icon-svg {
    transform: scale(1.2) translateY(-2px);
    filter: drop-shadow(0 0 8px currentColor);
}

/* Span last cells on desktop (3-column layout) if they would leave empty spots */
.grid:not(.skills-grid) .cell:nth-child(3n+1):last-child {
    grid-column: span 3;
}
.grid:not(.skills-grid) .cell:nth-child(3n+2):last-child {
    grid-column: span 2;
}

.cell {
    background: var(--card); padding: 30px;
    transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative; overflow: hidden;
}
.cell:hover {
    background: var(--card-hov);
}
.cell::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(350px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 80%);
    opacity: 0; transition: opacity 0.3s ease; pointer-events: none; z-index: 0;
}
.cell:hover::before {
    opacity: 1;
}
.cell > * {
    position: relative; z-index: 1;
}

/* Academic & Leadership Logos */
.academic-logo, .leadership-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffffff;
    padding: 6px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.academic-logo img, .leadership-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.academic-card h4 { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; color: var(--fg-3); letter-spacing: .05em; margin-bottom: 18px; }
.academic-card .school { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.cgpa-badge {
    display: inline-block; font-family: var(--mono); font-size: .8rem; color: var(--fg);
    margin: 16px 0; padding: 5px 12px; border: 1px solid var(--border-hi); border-radius: 6px; background: var(--bg-2);
}
.academic-card .period { color: var(--fg-2); font-size: .9rem; line-height: 1.6; }

/* Leadership & Activities */
.leadership-card h4 { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; color: var(--fg-3); letter-spacing: .05em; margin-bottom: 18px; }
.leadership-card .org { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; margin-bottom: 12px; }
.leadership-card .desc { color: var(--fg-2); font-size: .9rem; line-height: 1.6; }

/* Portfolio */
.portfolio-card { display: flex; flex-direction: column; }
.portfolio-card .thumb {
    aspect-ratio: 16/10; border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg-2); margin-bottom: 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    color: var(--fg-3); font-family: var(--mono); font-size: .68rem; letter-spacing: .04em;
    overflow: hidden;
}
.portfolio-card .thumb .cam { font-size: 1.4rem; opacity: .5; }
.portfolio-card .thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-card:hover .thumb img {
    transform: scale(1.06);
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.card-tag {
    font-family: var(--mono); font-size: .68rem; color: var(--fg-2);
    padding: 3px 9px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-2);
}
.portfolio-card h5 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.portfolio-card p { color: var(--fg-2); font-size: .9rem; line-height: 1.6; margin-bottom: 14px; flex-grow: 1; }
.portfolio-card .link { font-size: .82rem; align-self: flex-start; }

/* Skills */
.skill-card h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 12px; }
.skill-card h4::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--white); margin-right: 10px; vertical-align: middle; transform: rotate(45deg); }
.skill-card p { color: var(--fg-2); font-size: .92rem; line-height: 1.7; }

/* Qualities */
.qualities-grid { grid-template-columns: repeat(6, 1fr); margin-top: 1px; }
.quality-box { background: var(--card); padding: 26px 16px; text-align: center; transition: background .25s; }
.quality-box:hover { background: var(--card-hov); }
.q-icon { font-size: 1.4rem; margin-bottom: 10px; filter: grayscale(1) brightness(1.6); }
.q-title { font-weight: 600; font-size: .95rem; letter-spacing: -.01em; }
.q-desc { color: var(--fg-3); font-size: .76rem; margin-top: 6px; line-height: 1.45; }

/* ═══ CONTACT ═══ */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-list { display: flex; flex-direction: column; gap: 2px; }
.contact-item {
    display: flex; align-items: center; gap: 16px;
    padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
    transition: border-color .2s, background .2s;
}
.contact-item:hover { border-color: var(--border-hi); background: var(--card-hov); }
.ci-icon {
    font-size: 1.05rem; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 8px;
    filter: grayscale(1) brightness(1.6); transition: filter 0.3s ease, border-color 0.3s ease; flex-shrink: 0;
}
.contact-item:hover .ci-icon {
    filter: none;
    border-color: var(--border-hi);
}
.ci-icon img {
    width: 18px; height: 18px; object-fit: contain;
}
.ci-label { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; color: var(--fg-3); letter-spacing: .05em; }
.ci-value { font-size: .92rem; color: var(--fg); margin-top: 2px; word-break: break-word; }
.ci-value a:hover { color: var(--link); }

.contact-form { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; background: var(--card); }
.contact-form h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; letter-spacing: -.02em; }
.contact-form input, .contact-form textarea {
    width: 100%; margin-bottom: 12px; padding: 12px 14px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    color: var(--fg); font-family: var(--sans); font-size: .9rem; transition: border-color .2s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--fg-3); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--fg-2); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.send-btn { width: 100%; background: var(--white); color: #000; border: none; padding: 12px; border-radius: 8px; font-family: var(--sans); font-size: .9rem; font-weight: 500; cursor: pointer; transition: background .2s; }
.send-btn:hover { background: #d0d0d0; }

/* ═══ FOOTER ═══ */
footer { border-top: 1px solid var(--border); padding: 48px 24px; text-align: center; }
.footer-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; margin-bottom: 20px; }
.footer-name .tri { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 13px solid var(--white); }
.footer-nav { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-nav a { color: var(--fg-2); font-size: .82rem; padding: 5px 12px; border-radius: 6px; transition: color .2s, background .2s; }
.footer-nav a:hover { color: var(--fg); background: var(--bg-2); }
.footer-copy { color: var(--fg-3); font-family: var(--mono); font-size: .72rem; }

/* Back to top */
.btt {
    position: fixed; bottom: 24px; right: 24px; width: 42px; height: 42px; border-radius: 8px;
    background: var(--bg-2); color: var(--fg); border: 1px solid var(--border-hi);
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer;
    opacity: 0; transform: translateY(16px); transition: all .3s; z-index: 999;
}
.btt.show { opacity: 1; transform: none; }
.btt:hover { background: var(--card-hov); border-color: var(--fg-2); }

/* Loader */
.loader { position: fixed; inset: 0; background: var(--bg); z-index: 10000; display: flex; align-items: center; justify-content: center; transition: opacity .5s; }
.loader.done { opacity: 0; pointer-events: none; }
.loader .tri { width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 28px solid var(--white); animation: lPulse 1.1s ease-in-out infinite; }
@keyframes lPulse { 0%,100%{opacity:.25} 50%{opacity:1} }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-links.open { display: flex; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.97); padding: 16px; gap: 2px; z-index: 999; }
    .nav-links.open a { font-size: 1rem; padding: 14px; }
    .section { padding: 80px 20px; }
    .about-wrapper { grid-template-columns: 1fr; gap: 32px; }
    .about-media { max-width: 320px; }
    .academic-grid, .leadership-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .qualities-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-wrapper { grid-template-columns: 1fr; gap: 28px; }
}
@media (min-width: 861px) and (max-width: 1024px) {
    .academic-grid, .leadership-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .qualities-grid { grid-template-columns: repeat(3, 1fr); }
    
    /* Span last cells on tablet (2-column layout) if they are odd to fill the row */
    .grid .cell:nth-child(odd):last-child {
        grid-column: span 2;
    }
}

/* Blinking terminal cursor */
@keyframes termBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.term-cursor {
    animation: termBlink 1s step-end infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 2px;
    color: #4da3ff;
}

/* ═══ RESPONSIVE HERO & META GRIDS ═══ */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    max-width: 1100px;
    width: 100%;
    align-items: center;
    text-align: left;
    position: relative;
    z-index: 2;
}
.hero-grid h1 { text-align: left; }
.hero-grid h2 { text-align: left; margin-left: 0; }
.hero-grid .hero-actions { justify-content: flex-start; }

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: center;
        padding-top: 20px;
    }
    .hero-grid h1 { text-align: center !important; }
    .hero-grid h2 { text-align: center !important; margin: 0 auto 32px !important; }
    .hero-grid .hero-actions { justify-content: center !important; }
    
    .project-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 861px) and (max-width: 1024px) {
    .project-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


