:root {
    --bg: #0b1020;
    --surface: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #22d3ee;
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(17, 24, 39, 0.72);
    --glass-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
    --media-bg: linear-gradient(135deg,
            rgba(34, 211, 238, 0.15),
            rgba(2, 6, 23, 0.95));
}

[data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #020617;
    --muted: #475569;
    --accent: #0284c7;
    --border: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    --media-bg: linear-gradient(135deg,
            rgba(2, 132, 199, 0.12),
            rgba(248, 250, 252, 0.95));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body.loading {
    overflow: hidden;
}

body.loading main,
body.loading header,
body.loading footer {
    opacity: 0;
}

#page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease;
}

#page-loader p {
    margin-top: 18px;
    font-size: 14px;
    color: var(--muted);
}

.loader-ring {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


html, body {
    transition:
        background-color 0.5s ease,
        color 0.4s ease;
}

body,
.site-header,
.project-card,
.btn-primary,
.btn-outline {
    transition:
        background-color 0.35s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}



body {
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    letter-spacing: 0.2px;

    --g1x: 10%;
    --g1y: 10%;
    --g2x: 90%;
    --g2y: 20%;
    --g3x: 50%;
    --g3y: 90%;

    background:
        radial-gradient(1200px 600px at var(--g1x) var(--g1y), rgba(34, 211, 238, 0.12), transparent 40%),
        radial-gradient(800px 500px at var(--g2x) var(--g2y), rgba(99, 102, 241, 0.10), transparent 45%),
        radial-gradient(1000px 600px at var(--g3x) var(--g3y), rgba(14, 165, 233, 0.08), transparent 50%),
        linear-gradient(180deg, #0b1020 0%, #050814 100%);
    background-attachment: scroll;
    transition:
        background 0.6s ease,
        color 0.4s ease;
}

[data-theme="light"] body {
    background:
        radial-gradient(1200px 600px at 10% 10%, rgba(2, 132, 199, 0.10), transparent 40%),
        radial-gradient(800px 500px at 90% 20%, rgba(59, 130, 246, 0.08), transparent 45%),
        radial-gradient(1000px 600px at 50% 90%, rgba(14, 165, 233, 0.06), transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    background-attachment: fixed;
}



p {
    text-wrap: pretty;
}

section {
    position: relative;
}

section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 80%;
    height: 2px;
    background: linear-gradient(to right,
            transparent,
            var(--border),
            transparent);
    transform: translateX(-50%);
}

.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}



/* ================= HEADER ================= */

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

[data-theme="dark"] .site-header {
    background: rgba(2, 6, 23, 0.75);
}


.header-inner {
    max-width: 1200px;
    margin: auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 24px;
}
.nav a {
    position: relative;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600; /* 🔥 stronger */
    letter-spacing: 0.2px;

    opacity: 0;
    transform: translateY(-10px);
    animation: navFade 0.4s ease forwards;
    animation-delay: calc(0.08s * var(--i));

    transition: color 0.25s ease;
}


@keyframes navFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.nav a:hover,
.nav a.active {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.nav a.active {
    color: var(--accent);
}



.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    transition:
        background-color 0.35s ease,
        transform 0.2s ease;
}

.theme-toggle .sun {
    display: none;
}

[data-theme="light"] .theme-toggle .sun {
    display: inline;
}

[data-theme="light"] .theme-toggle .moon {
    display: none;
}

[data-theme="light"] .nav a {
    color: #020617; /* strong dark text */
}

[data-theme="light"] .nav a.active {
    color: var(--accent);
}

.theme-transition * {
    transition: none !important;
}



.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}
.theme-toggle:active {
    transform: scale(0.92);
}

/* ================= HERO ================= */

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 90px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero-grid {
    max-width: 1200px;
    margin: auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 80px;
}

.hero-chip {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
}

.hero-title {
    font-size: 52px;
    line-height: 1.15;
    margin-bottom: 22px;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
    max-width: 540px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 18px;
}

.hero-actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


.profile-wrapper {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), transparent);
    animation: none;
}

.profile-wrapper::before {
    content: "";
    position: absolute;
    inset: 6px;
    background: var(--bg);
    border-radius: 50%;
}

.profile-wrapper::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0.4;
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.1;
    }
}


.profile-img {
    width: 92%;
    height: 92%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
}

/* Floating animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}


.animated-text {
    height: 35px;                 
    overflow: hidden;
    margin: 8px 0 22px;

    font-size: 25px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.4px;
}

.text-wrapper {
    display: block;
    animation: slideText 6s infinite ease-in-out;
}

.text-wrapper span {
    display: block;
    height: 35px;
    line-height: 35px;            
}

@keyframes slideText {
    0% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(0);
    }
    33% {
        transform: translateY(-35px);
    }
    63% {
        transform: translateY(-35px);
    }
    66% {
        transform: translateY(-70px);
    }
    96% {
        transform: translateY(-70px);
    }
    100% {
        transform: translateY(0);
    }
}


#about {
    padding: 100px 0;
}

.about-grid {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.section-title {
    font-size: 36px;
    margin-bottom: 24px;
}

.about-content p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 18px;
    max-width: 560px;
}

.about-tech {
    justify-content: flex-end;
}

.stack-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
}

.stack-header {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    font-family: "JetBrains Mono", monospace;

}

.stack-list {
    list-style: none;
    display: grid;
    gap: 14px;
    color: var(--accent);
}

.stack-list li {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
}


#skills {
    padding: 100px 0;
}

.skills-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.skills-header {
    max-width: 600px;
    margin-bottom: 60px;
}

.skills-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

.skills-domains {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.skills-domain h3 {
    font-size: 17px;
    margin-bottom: 16px;
    color: var(--accent);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-chip {
    padding: 8px 14px;
    border-radius: 999px;
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text);
    transition: background 0.25s ease, transform 0.25s ease;
}

.skill-chip:hover {
    background: rgba(34, 211, 238, 0.15);
    transform: translateY(-2px);
}

.skill-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    box-shadow: 0 0 0 transparent;
    transition: box-shadow 0.25s ease;
}

/* Project Section */

#projects {
    padding: 100px 0;
}

.projects-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.projects-header {
    max-width: 620px;
    margin-bottom: 60px;
}

.projects-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.project-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.project-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.project-tag.muted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.project-card h3 {
    font-size: 18px;
    margin-bottom: 14px;
}

.project-card p {
    font-size: 14.8px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 18px;
}

.project-tech {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.project-tech li {
    font-size: 12.5px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.project-actions {
    margin-top: auto;
    display: flex;
    gap: 16px;
}

.project-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.project-link.muted {
    color: var(--muted);
}




#achievements {
    padding: 100px 0;
}

.achievements-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.achievements-header {
    max-width: 620px;
    margin-bottom: 60px;
}

.achievements-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

/* Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* Card */
.achievement-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.achievement-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Badge */
.achievement-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.15);
    margin-bottom: 14px;
}

/* Text */
.achievement-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.achievement-card p {
    font-size: 14.8px;
    line-height: 1.7;
    color: var(--muted);
}



#achievements .achievement-card {
    position: relative;
    padding-bottom: 56px; /* space for buttons */
}

#achievements .project-actions {
    position: absolute;
    left: 28px;
    bottom: 24px;

    display: flex;
    gap: 14px;
}

#achievements .project-link {
    font-size: 13px;
    font-weight: 600;

    color: var(--accent);
    text-decoration: none;

    padding: 6px 0;
    border-bottom: 1px solid transparent;

    transition: border-color 0.2s ease, color 0.2s ease;
}

#achievements .project-link:hover {
    border-bottom-color: var(--accent);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .achievements-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Experience  */

#experience {
    padding: 100px 0;
}

.experience-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.experience-header {
    max-width: 620px;
    margin-bottom: 60px;
}

.experience-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

.experience-list {
    display: grid;
    gap: 36px;
}

.experience-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.experience-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.experience-duration {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 10px;
}

.experience-card h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.experience-card h4 {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 14px;
}

.experience-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 16px;
}

.experience-highlights {
    padding-left: 18px;
    font-size: 14px;
    color: var(--muted);
}

.experience-highlights li {
    margin-bottom: 8px;
}



/* Open Source */


#open-source {
    padding: 100px 0;
}

#open-source .section-title {
    margin-bottom: 28px;
}


.opensource-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.opensource-surface {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 56px;
    box-shadow: var(--glass-shadow);
}

.opensource-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.opensource-content {
    max-width: 520px;
}

.opensource-content p {
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--text);
    opacity: 0.82;
}

.opensource-content .btn-outline {
    margin-top: 22px;
    display: inline-block;
}


/* ================= IMAGE STRIP ================= */

.opensource-media {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}

.image-carousel {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

.image-frame {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.35s ease, transform 0.35s ease;
     pointer-events: none;
}

.carousel-image.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
    pointer-events: auto;
}

/* ================= POPUP ================= */

.image-popup {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            circle at center,
            rgba(34, 211, 238, 0.08),
            rgba(2, 6, 23, 0.92) 60%
        );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 9999;
}

.image-popup.active {
    opacity: 1;
    pointer-events: auto;
}

.image-popup img {
    max-width: min(92vw, 1100px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: 18px;
    background: #020617;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255,255,255,0.08);
}

/* Close button */
.popup-close {
    position: fixed;
    top: 28px;
    right: 36px;
    font-size: 34px;
    color: #ffffff;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.popup-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ================= CERTIFICATES ================= */

#certificates {
    padding: 100px 0;
}

.certificates-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.certificates-header {
    max-width: 620px;
    margin-bottom: 60px;
}

.certificates-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

/* Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

/* Card */
.certificate-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.35);
}

/* Preview */
.certificate-preview {
    border-radius: 14px;
    overflow: hidden;
    background: #020617;
    margin-bottom: 18px;
}

.certificate-preview img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    display: block;
}

/* Text */
.certificate-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.certificate-org {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 18px;
}

/* Meta */
.certificate-meta {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}
/* 
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease;
} */

.btn-outline:hover {
    background: rgba(34, 211, 238, 0.12);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* ================= CERTIFICATE POPUP ================= */

.certificate-popup {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.certificate-popup.active {
    opacity: 1;
    pointer-events: auto;
}

.certificate-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 820px;
    width: 90%;
    padding: 28px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.certificate-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
    background: #020617;
}

.certificate-modal-content h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.cert-org {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 14px;
}

.certificate-modal-content p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}

/* Close button */
.certificate-popup-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 28px;
    color : var(--text);
    cursor: pointer;
}


/* ================= LEADERSHIP ================= */
/* ================= EXTRACURRICULAR / LEADERSHIP ================= */

#extracurricular {
    padding: 100px 0;
}

.extracurricular-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.extracurricular-header {
    max-width: 620px;
    margin-bottom: 60px;
}

.extracuricular-header p,
.extracurricular-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

/* ================= INDIVIDUAL LEADERSHIP CONTAINER ================= */

.leadership-surface {
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 48px;
    margin-bottom: 48px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Depth tuning per theme */
[data-theme="dark"] .leadership-surface:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .leadership-surface {
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.08);
}

/* ================= ROLE BADGE ================= */

.role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.15);
    margin-bottom: 14px;
}

.role-badge.accent {
    background: rgba(34, 211, 238, 0.10);
}

/* ================= GRID ================= */

.leadership-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

/* ================= IMAGE CONTAINER ================= */

.leadership-media {
    position: relative;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

/* Images */
.lead-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lead-image.active {
    opacity: 1;
    transform: scale(1);
}

/* ================= CONTENT ================= */

.leadership-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text);
}

.leadership-content p {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--muted);
    margin-bottom: 16px;
}

.role-points {
    padding-left: 18px;
    font-size: 14.5px;
    color: var(--muted);
}

.role-points li {
    margin-bottom: 8px;
}


/* ================= BLOGS ================= */

#blogs {
    padding: 100px 0;
}

.blogs-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.blogs-header {
    max-width: 620px;
    margin-bottom: 60px;
}

.blogs-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

/* ================= GRID ================= */

.blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

/* ================= BLOG CARD ================= */

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(0,0,0,0.35);
}

/* ================= IMAGE CAROUSEL ================= */

.blog-media {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.blog-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.blog-image.active {
    opacity: 1;
    transform: scale(1);
}

/* ================= CONTENT ================= */

.blog-content {
    padding: 32px;
}

.blog-content h3 {
    font-size: 20px;
    margin-bottom: 14px;
    color: var(--text);
}

.blog-text {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--muted);
    max-height: 5.6em; /* ~35–40 words */
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.blog-card.expanded .blog-text {
    max-height: 1000px;
}

.blog-actions {
    display: flex;
    gap: 20px;
    margin-top: 18px;
    align-items: center;
}



/* ================= BUTTONS ================= */

.blog-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.blog-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}


/* ================= CONTACT ================= */

#contact {
    padding: 120px 0;
}

.contact-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.contact-header {
    max-width: 640px;
    margin-bottom: 70px;
}

.contact-header p {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

/* Main surface */
.contact-surface {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 56px;
    box-shadow: 0 40px 90px rgba(0,0,0,0.45);
}

/* LEFT */
.contact-direct {
    display: grid;
    gap: 22px;
}

.contact-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-card i {
    font-size: 18px;
    color: var(--accent);
    margin-top: 4px;
}

.contact-card span {
    font-size: 13px;
    color: var(--muted);
    display: block;
}

.contact-card a {
    font-size: 15.5px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--accent);
}

/* Social links */
.contact-links {
    display: flex;
    gap: 14px;
    margin-top: 12px;
}

.contact-links a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 17px;
    transition: all 0.25s ease;
    text-decoration: none;
}

.contact-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(34,211,238,0.35);
}

/* RIGHT: FORM */
.contact-form {
    display: grid;
    gap: 18px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    font-size: 14.5px;
    color: var(--text);
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(34,211,238,0.15);
}

.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 28px;
    border-radius: 999px;

    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.3px;

    color: #020617;
    background: linear-gradient(
        135deg,
        var(--accent),
        color-mix(in srgb, var(--accent) 70%, white)
    );

    border: none;
    cursor: pointer;
    text-decoration: none;

    box-shadow:
        0 8px 22px rgba(34, 211, 238, 0.35),
        inset 0 -1px 0 rgba(0,0,0,0.15);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 36px rgba(34, 211, 238, 0.45),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 6px 14px rgba(34, 211, 238, 0.35),
        inset 0 2px 4px rgba(0,0,0,0.25);
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.35),
        0 12px 30px rgba(34, 211, 238, 0.45);
}


.btn-outline {
    padding: 11px 26px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;

    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    text-decoration: none;

    transition: all 0.2s ease;
}


.site-footer {
    margin-top: 120px;
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    background: transparent;
}

.footer-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;

    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 60px;
}

/* Brand */
.footer-brand h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 360px;
}

/* Nav & Social */
.footer-nav span,
.footer-social span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer-nav a {
    display: block;
    font-size: 14.5px;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 8px;
}

.footer-nav a:hover {
    color: var(--accent);
}

/* Social icons */
.social-links {
    display: flex;
    gap: 14px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-decoration: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);

    font-size: 16px;
    transition: all 0.25s ease;
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 26px rgba(34,211,238,0.35);
}

/* Bottom */
.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 13px;
    color: var(--muted);
}



/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .profile-wrapper {
        margin: 0 auto;
        width: 240px;
        height: 240px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .about-content {
        text-align: center;
    }

    .about-content p {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }

    .about-tech {
        justify-content: center;
    }

    .skills-domains {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .skills-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .experience-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }



    .image-track {
        animation-duration: 40s;
    }

    .image-track img {
        height: 220px;
    }


    .opensource-surface {
       padding: 32px 20px;
    }

    .opensource-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .opensource-content {
        text-align: center;
        max-width: 100%;
    }
    .certificates-grid {
        grid-template-columns: 1fr;
    }

    .certificates-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .leadership-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .leadership-surface {
        padding: 32px 22px;
    }

    .extracurricular-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .leadership-content {
        text-align: center;
    }


    .leadership-media {
        height: 220px;
    }
    .role-points {
        text-align: left;
        max-width: 480px;
        margin: auto;
    }
     .blogs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-media {
        height: 200px;
    }

    .blog-content {
        padding: 24px;
    }
    .contact-surface {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 24px;
    }

    .contact-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand p {
        margin: auto;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}


@media (max-width: 768px) {
    .nav {
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--surface);
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 20px 0;
        display: none;
    }

    .nav a {
        opacity: 0;
        transform: translateY(-10px);
    }

    .nav.active {
        display: flex;
    }


    .nav.active a {
        animation: navFade 0.4s ease forwards;
        animation-delay: calc(0.1s * var(--i));
    }


    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 40px;
    }

     .certificate-modal {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .certificate-modal-img img {
        max-height: 240px;
    }

    .certificate-modal-content {
        text-align: center;
    }
    .contact-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-surface {
        padding: 36px 24px;
        margin: auto;
    }

    .contact-form .btn-primary {
        align-self: center;
    }
    .contact-icons {
        justify-content: center;
    }
    .section-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}


@media (max-width: 600px) {
    .blogs-grid {
        grid-template-columns: 1fr;
    }

    .blog-content {
        padding: 24px;
    }

    .blog-media {
        height: 200px;
    }
}


@media (max-width: 480px) {
    .hero-title {
        font-size: 38px;
    }

    .profile-wrapper {
        width: 200px;
        height: 200px;
    }
}