:root {
    --bg: #070a12;
    --bg-soft: #0b101b;
    --surface: #0f1522;
    --surface-light: #141c2c;

    --text: #f5f7fb;
    --text-soft: #c5ccda;
    --muted: #8993a5;

    --accent: #6ea8fe;
    --accent-light: #8ab9ff;
    --purple: #8b5cf6;

    --border: rgba(255, 255, 255, 0.09);

    --max-width: 1180px;

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 26px;

    --transition: 0.3s ease;
}


/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);

    font-family:
        "Inter",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.7;
    overflow-x: hidden;
}

body,
button,
a {
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================
   BACKGROUND
========================= */

.background {
    position: fixed;
    inset: 0;

    z-index: -10;

    pointer-events: none;

    overflow: hidden;
}

.grid-background {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255,255,255,0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,0.025) 1px,
            transparent 1px
        );

    background-size: 70px 70px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 85%
    );
}

.gradient {
    position: absolute;

    border-radius: 50%;

    filter: blur(100px);

    opacity: 0.25;
}

.gradient-one {
    width: 500px;
    height: 500px;

    background: var(--accent);

    top: -250px;
    right: -150px;
}

.gradient-two {
    width: 400px;
    height: 400px;

    background: var(--purple);

    left: -250px;
    top: 45%;
}


/* =========================
   LOADER
========================= */

#loader {
    position: fixed;

    inset: 0;

    background: var(--bg);

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        opacity 0.6s ease,
        visibility 0.6s ease;
}

#loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: "Space Grotesk", sans-serif;

    font-size: 3rem;

    font-weight: 800;

    letter-spacing: -0.08em;
}

.loader-logo span {
    color: var(--accent);
}

.loader-line {
    width: 120px;

    height: 2px;

    margin: 20px auto 0;

    background: rgba(255,255,255,0.1);

    overflow: hidden;
}

.loader-line span {
    display: block;

    width: 40%;

    height: 100%;

    background: var(--accent);

    animation: loaderAnimation 1.2s infinite ease-in-out;
}

@keyframes loaderAnimation {

    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(350%);
    }

}


/* =========================
   NAVBAR
========================= */

.navbar {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    height: 78px;

    z-index: 1000;

    transition: var(--transition);

    background: rgba(7, 10, 18, 0.55);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    border-bottom-color: var(--border);

    background: rgba(7, 10, 18, 0.88);
}

.nav-container {
    max-width: var(--max-width);

    height: 100%;

    margin: auto;

    padding: 0 24px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


/* LOGO */

.logo {
    font-family: "Space Grotesk", sans-serif;

    font-size: 1.55rem;

    font-weight: 800;

    letter-spacing: -0.08em;
}

.logo span {
    color: var(--accent);
}


/* NAV MENU */

.nav-menu {
    display: flex;

    align-items: center;

    gap: 28px;
}

.nav-link {
    position: relative;

    color: var(--muted);

    font-size: 0.78rem;

    font-weight: 500;

    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -8px;

    width: 0;

    height: 1px;

    background: var(--accent);

    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}


/* NAV BUTTON */

.nav-button {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 9px 15px;

    border: 1px solid var(--border);

    border-radius: 999px;

    font-size: 0.76rem;

    transition: var(--transition);
}

.nav-button span {
    color: var(--accent);
}

.nav-button:hover {
    background: rgba(255,255,255,0.06);

    border-color: rgba(255,255,255,0.18);
}


/* MOBILE MENU */

.mobile-menu-button {
    display: none;

    width: 42px;
    height: 42px;

    background: transparent;

    border: 1px solid var(--border);

    border-radius: 10px;

    cursor: pointer;
}

.mobile-menu-button span {
    display: block;

    width: 19px;
    height: 2px;

    margin: 4px auto;

    background: var(--text);

    transition: var(--transition);
}


/* =========================
   COMMON
========================= */

.section {
    max-width: var(--max-width);

    margin: auto;

    padding: 125px 24px;
}

.section-header {
    margin-bottom: 60px;
}

.section-number {
    color: var(--muted);

    font-size: 0.68rem;

    font-weight: 600;

    letter-spacing: 0.18em;

    text-transform: uppercase;
}

.section-header h2 {
    margin-top: 14px;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(2.6rem, 5vw, 4.7rem);

    line-height: 1.02;

    letter-spacing: -0.07em;
}

.section-header h2 span {
    color: var(--accent);
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 100vh;

    padding-top: 150px;
}

.hero-container {
    min-height: calc(100vh - 150px);

    display: grid;

    grid-template-columns: 1.08fr 0.92fr;

    align-items: center;

    gap: 70px;
}


/* AVAILABILITY */

.availability {
    display: inline-flex;

    align-items: center;

    padding: 6px 11px;

    border: 1px solid var(--border);

    border-radius: 999px;

    background: rgba(255,255,255,0.025);

    color: var(--muted);

    font-size: 0.68rem;

    letter-spacing: 0.02em;
}

.availability-dot {
    width: 7px;
    height: 7px;

    margin-right: 8px;

    border-radius: 50%;

    background: #55d98b;

    box-shadow: 0 0 15px rgba(85,217,139,0.7);
}


/* HERO TEXT */

.hero-small-text {
    margin-top: 30px;

    color: var(--muted);

    font-size: 0.72rem;

    letter-spacing: 0.2em;

    font-weight: 600;
}

.hero h1 {
    margin-top: 7px;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(4rem, 8vw, 7.2rem);

    line-height: 0.94;

    letter-spacing: -0.09em;
}

.hero h1 span {
    color: var(--accent);
}

.hero h2 {
    margin-top: 24px;

    color: var(--text-soft);

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(1.2rem, 2vw, 1.7rem);

    line-height: 1.35;

    font-weight: 500;
}

.typing-text {
    color: var(--muted);

    font-size: 0.9em;
}

.hero-description {
    max-width: 620px;

    margin-top: 22px;

    color: var(--muted);

    font-size: 0.98rem;
}


/* HERO BUTTONS */

.hero-buttons {
    display: flex;

    gap: 12px;

    margin-top: 32px;

    flex-wrap: wrap;
}

.button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 11px;

    padding: 13px 19px;

    border-radius: var(--radius-sm);

    font-size: 0.78rem;

    font-weight: 700;

    border: 1px solid var(--border);

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.button:hover {
    transform: translateY(-3px);
}

.button-primary {
    color: #070a12;

    background: var(--text);

    border-color: var(--text);
}

.button-primary:hover {
    background: #ffffff;
}

.button-secondary {
    color: var(--text);

    background: transparent;
}

.button-secondary:hover {
    background: rgba(255,255,255,0.05);

    border-color: rgba(255,255,255,0.18);
}

.button span {
    color: var(--accent);
}


/* SOCIALS */

.hero-socials {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 30px;

    color: var(--muted);

    font-size: 0.76rem;
}

.hero-socials a {
    transition: var(--transition);
}

.hero-socials a:hover {
    color: var(--text);
}


/* =========================
   HERO PROFILE
========================= */

.hero-profile {
    position: relative;

    min-height: 520px;

    display: flex;

    align-items: center;

    justify-content: center;
}

.profile-glow {
    position: absolute;

    width: 350px;
    height: 350px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(110,168,254,0.18),
            transparent 65%
        );

    filter: blur(10px);
}

.profile-card {
    position: relative;

    width: min(420px, 100%);

    padding: 22px;

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            rgba(20,28,44,0.92),
            rgba(8,12,21,0.94)
        );

    box-shadow:
        0 40px 100px rgba(0,0,0,0.45);

    transform: rotate(2deg);

    transition: transform 0.5s ease;
}

.profile-card:hover {
    transform: rotate(0deg) translateY(-7px);
}

.profile-card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;
}

.profile-label {
    color: var(--muted);

    font-size: 0.62rem;

    letter-spacing: 0.16em;
}

.profile-status {
    color: #67d99b;

    font-size: 0.62rem;

    letter-spacing: 0.08em;
}


/* PROFILE IMAGE */

.profile-image-wrapper {
    position: relative;

    width: 100%;

    aspect-ratio: 4 / 4.6;

    overflow: hidden;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            #182236,
            #080c15
        );
}

.profile-image {
    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position: center;

    transition: transform 0.6s ease;
}

.profile-card:hover .profile-image {
    transform: scale(1.035);
}


/* PROFILE INFO */

.profile-info {
    padding: 20px 3px 10px;
}

.profile-info h3 {
    font-family: "Space Grotesk", sans-serif;

    font-size: 1.5rem;

    letter-spacing: -0.04em;
}

.profile-info p {
    margin-top: 3px;

    color: var(--muted);

    font-size: 0.76rem;
}


/* PROFILE TAGS */

.profile-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 10px;
}

.profile-tags span {
    padding: 5px 9px;

    border: 1px solid var(--border);

    border-radius: 999px;

    color: var(--muted);

    font-size: 0.61rem;
}


/* =========================
   MARQUEE
========================= */

.marquee-section {
    overflow: hidden;

    padding: 17px 0;

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);
}

.marquee-track {
    width: max-content;

    display: flex;

    align-items: center;

    gap: 32px;

    animation: marquee 28s linear infinite;

    color: #778195;

    font-size: 0.65rem;

    font-weight: 600;

    letter-spacing: 0.16em;

    white-space: nowrap;
}

.marquee-track b {
    color: var(--accent);

    font-size: 0.8rem;
}

@keyframes marquee {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

}


/* =========================
   ABOUT
========================= */

.about-grid {
    display: grid;

    grid-template-columns: 1.55fr 0.75fr;

    gap: 80px;

    align-items: start;
}

.about-content {
    color: var(--muted);

    font-size: 0.96rem;
}

.about-content p {
    margin-bottom: 20px;
}

.about-content strong {
    color: var(--text);

    font-weight: 600;
}

.about-lead {
    color: var(--text) !important;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(1.4rem, 3vw, 1.9rem);

    line-height: 1.3;

    letter-spacing: -0.04em;

    margin-bottom: 30px !important;
}


/* STATS */

.about-stats {
    display: grid;

    gap: 1px;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--border);
}

.stat-card {
    padding: 25px;

    background: var(--surface);
}

.stat-card span {
    color: var(--accent);

    font-family: monospace;

    font-size: 0.68rem;
}

.stat-card strong {
    display: block;

    margin-top: 25px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 1.35rem;
}

.stat-card p {
    margin-top: 4px;

    color: var(--muted);

    font-size: 0.72rem;
}


/* =========================
   SKILLS
========================= */

.skills-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;
}

.skill-card {
    min-height: 210px;

    padding: 27px;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: rgba(15,21,34,0.72);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.skill-card:hover {
    transform: translateY(-6px);

    border-color: rgba(110,168,254,0.35);

    background: var(--surface-light);
}

.skill-number {
    color: var(--accent);

    font-family: monospace;

    font-size: 0.68rem;
}

.skill-card h3 {
    margin-top: 55px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 1.12rem;

    letter-spacing: -0.02em;
}

.skill-card p {
    margin-top: 8px;

    color: var(--muted);

    font-size: 0.76rem;
}


/* =========================
   EXPERIENCE
========================= */

.timeline {
    position: relative;

    margin-left: 12px;

    border-left: 1px solid var(--border);
}

.timeline-item {
    position: relative;

    display: grid;

    grid-template-columns: 140px 1fr;

    gap: 25px;

    padding:
        0
        0
        70px
        50px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;

    left: -5px;

    top: 4px;

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--accent);

    box-shadow:
        0 0 0 5px rgba(110,168,254,0.08),
        0 0 20px rgba(110,168,254,0.5);
}

.timeline-meta span {
    color: var(--accent);

    font-family: monospace;

    font-size: 0.67rem;

    letter-spacing: 0.08em;
}

.experience-type {
    color: var(--muted);

    font-size: 0.62rem;

    letter-spacing: 0.16em;

    margin-bottom: 7px;
}

.timeline-content h3 {
    max-width: 700px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 1.25rem;

    line-height: 1.3;
}

.timeline-content h4 {
    margin-top: 6px;

    color: var(--muted);

    font-size: 0.78rem;

    font-weight: 500;
}

.timeline-content > p:last-child {
    max-width: 700px;

    margin-top: 15px;

    color: var(--muted);

    font-size: 0.82rem;
}


/* =========================
   PROJECTS
========================= */

.projects-grid {
    display: grid;

    grid-template-columns: 1.2fr 1fr;

    gap: 14px;
}

.project-card {
    min-height: 350px;

    padding: 28px;

    display: flex;

    flex-direction: column;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--surface);

    transition:
        transform var(--transition),
        border-color var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);

    border-color: rgba(110,168,254,0.35);
}

.project-featured {
    grid-row: span 2;

    min-height: 500px;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(110,168,254,0.12),
            transparent 35%
        ),
        var(--surface);
}

.project-top {
    display: flex;

    justify-content: space-between;

    color: var(--accent);

    font-family: monospace;

    font-size: 0.65rem;
}

.project-top span:last-child {
    color: var(--muted);

    font-family: "Inter", sans-serif;

    letter-spacing: 0.12em;
}

.project-content {
    margin-top: auto;
}

.project-content h3 {
    margin-bottom: 10px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 1.75rem;

    letter-spacing: -0.04em;
}

.project-content p {
    max-width: 600px;

    color: var(--muted);

    font-size: 0.8rem;
}

.project-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin: 20px 0;
}

.project-tags span {
    padding: 4px 9px;

    border: 1px solid var(--border);

    border-radius: 999px;

    color: var(--muted);

    font-size: 0.62rem;
}

.project-link {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    font-size: 0.76rem;

    font-weight: 700;

    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent);
}


/* =========================
   RESEARCH
========================= */

.research-panel {
    display: grid;

    grid-template-columns: 1.15fr 0.85fr;

    gap: 60px;

    padding: 48px;

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            130deg,
            rgba(20,28,44,0.85),
            rgba(8,12,21,0.85)
        );
}

.research-intro > p {
    color: var(--accent);

    font-size: 0.63rem;

    letter-spacing: 0.16em;
}

.research-intro h3 {
    margin-top: 15px;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(1.6rem, 3vw, 2.55rem);

    line-height: 1.2;

    letter-spacing: -0.05em;
}

.research-topics {
    display: flex;

    flex-wrap: wrap;

    align-content: flex-start;

    gap: 8px;
}

.research-topics span {
    padding: 8px 12px;

    border: 1px solid var(--border);

    border-radius: 999px;

    color: var(--muted);

    font-size: 0.68rem;

    transition: var(--transition);
}

.research-topics span:hover {
    color: var(--text);

    border-color: rgba(110,168,254,0.35);
}


/* =========================
   ACHIEVEMENTS
========================= */

.achievement-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;
}

.achievement-card {
    min-height: 250px;

    padding: 28px;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--surface);

    transition:
        transform var(--transition),
        border-color var(--transition);
}

.achievement-card:hover {
    transform: translateY(-6px);

    border-color: rgba(110,168,254,0.35);
}

.achievement-card > span {
    color: var(--accent);

    font-family: monospace;

    font-size: 0.67rem;
}

.achievement-card h3 {
    margin-top: 65px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 1.1rem;
}

.achievement-card p {
    margin-top: 8px;

    color: var(--muted);

    font-size: 0.76rem;
}


/* =========================
   CONTACT
========================= */

.contact-box {
    padding: 85px 45px;

    text-align: center;

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    background:
        radial-gradient(
            circle at center,
            rgba(110,168,254,0.11),
            transparent 60%
        );
}

.contact-box h2 {
    margin-top: 18px;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(3rem, 6vw, 5.8rem);

    line-height: 1;

    letter-spacing: -0.08em;
}

.contact-box h2 span {
    color: var(--accent);
}

.contact-box > p:not(.section-number) {
    max-width: 600px;

    margin: 24px auto 30px;

    color: var(--muted);

    font-size: 0.85rem;
}

.contact-buttons {
    display: flex;

    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;
}

.contact-connect-title {
    margin: 0 0 14px !important;
    color: var(--accent) !important;
    font-size: 0.68rem !important;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.contact-social-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-social-buttons .button {
    min-width: 190px;
    padding: 15px 22px;
    color: #e9f1ff;
    background: #091527;
    border-color: #17345b;
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-social-buttons .contact-email-button {
    width: min(330px, 100%);
    min-width: 0;
}

.contact-social-buttons .button:hover {
    background: #10213a;
    border-color: var(--accent);
}

.contact-social-buttons .button span {
    margin-left: 2px;
    color: inherit;
}

.contact-social-buttons + .contact-buttons {
    display: none;
}

body.light-theme .contact-social-buttons .button {
    color: #172033;
    background: #ffffff;
    border-color: #cbd7e8;
}

footer {
    justify-content: center;
}

footer .footer-logo,
footer .footer-links {
    display: none;
}

footer .footer-left {
    justify-content: center;
}

footer .footer-left p {
    font-size: 0;
}

footer .footer-left p::after {
    content: "\00A9 2026 Tapu Mondal. All rights reserved.";
    font-size: 0.7rem;
}


/* =========================
   FOOTER
========================= */

footer {
    max-width: var(--max-width);

    margin: auto;

    padding:
        32px
        24px
        45px;

    border-top: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    color: var(--muted);

    font-size: 0.7rem;
}

.footer-left {
    display: flex;

    align-items: center;

    gap: 18px;
}

.footer-logo {
    color: var(--text);

    font-family: "Space Grotesk", sans-serif;

    font-size: 1.2rem;

    font-weight: 800;

    letter-spacing: -0.07em;
}

.footer-logo span {
    color: var(--accent);
}

.footer-links {
    display: flex;

    align-items: center;

    gap: 22px;
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text);
}


/* =========================
   REVEAL ANIMATION
========================= */

.reveal {
    opacity: 0;

    transform: translateY(25px);

    transition:
        opacity 0.75s ease,
        transform 0.75s ease;
}

.reveal.show {
    opacity: 1;

    transform: translateY(0);
}


/* =========================
   SELECTION
========================= */

::selection {
    color: #070a12;

    background: var(--accent);
}


/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #252d3d;

    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #39445a;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 950px) {

    .nav-menu {
        gap: 18px;
    }

    .hero-container {
        grid-template-columns: 1fr;

        gap: 60px;
    }

    .hero-profile {
        min-height: 480px;
    }

    .about-grid {
        grid-template-columns: 1fr;

        gap: 45px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-featured {
        grid-row: auto;

        min-height: 380px;
    }

    .research-panel {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .achievement-grid {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 760px) {

    .navbar {
        height: 72px;
    }

    .nav-container {
        padding: 0 20px;
    }

    .nav-menu {
        position: absolute;

        top: 72px;
        left: 0;
        right: 0;

        display: none;

        flex-direction: column;

        align-items: flex-start;

        gap: 0;

        padding: 18px 22px 24px;

        background: rgba(7,10,18,0.97);

        border-bottom: 1px solid var(--border);

        backdrop-filter: blur(18px);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        width: 100%;

        padding: 12px 0;

        font-size: 0.85rem;
    }

    .nav-link::after {
        display: none;
    }

    .nav-button {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .hero {
        padding-top: 125px;
    }

    .hero-container {
        min-height: auto;
    }

    .hero h1 {
        font-size: clamp(3.6rem, 18vw, 6rem);
    }

    .hero-profile {
        min-height: 430px;
    }

    .section {
        padding:
            95px
            20px;
    }

    .section-header {
        margin-bottom: 45px;
    }

    .timeline-item {
        grid-template-columns: 1fr;

        gap: 8px;

        padding-left: 32px;
    }

    .timeline-meta {
        order: 1;
    }

    .timeline-content {
        order: 2;
    }

    .achievement-grid {
        grid-template-columns: 1fr;
    }

    footer {
        flex-direction: column;

        align-items: flex-start;
    }
}


@media (max-width: 520px) {

    .hero h1 {
        font-size: 3.8rem;
    }

    .hero h2 {
        font-size: 1.15rem;
    }

    .hero-description {
        font-size: 0.88rem;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: stretch;
    }

    .button {
        width: 100%;
    }

    .hero-socials {
        flex-wrap: wrap;
    }

    .hero-profile {
        min-height: 360px;
    }

    .profile-card {
        transform: none;

        padding: 15px;
    }

    .profile-card:hover {
        transform: translateY(-4px);
    }

    .profile-image-wrapper {
        aspect-ratio: 4 / 4.8;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-card {
        min-height: 180px;
    }

    .skill-card h3 {
        margin-top: 40px;
    }

    .research-panel {
        padding: 30px 22px;
    }

    .contact-box {
        padding:
            60px
            20px;
    }

    .contact-box h2 {
        font-size: 3.15rem;
    }

    .footer-left {
        flex-direction: column;

        align-items: flex-start;

        gap: 5px;
    }

    .footer-links {
        flex-wrap: wrap;

        gap: 15px;
    }
}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}

.footer-links a:not(:last-child) {
    display: none;
}

/* =========================
   LIGHT THEME & TOGGLE
========================= */

body.light-theme {
    --bg: #f6f8fc;
    --bg-soft: #eef3fa;
    --surface: #ffffff;
    --surface-light: #f1f5fb;
    --text: #172033;
    --text-soft: #46536b;
    --muted: #66738a;
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --purple: #7c3aed;
    --border: rgba(23, 32, 51, 0.12);
}

body.light-theme .navbar { background: rgba(246, 248, 252, 0.72); }
body.light-theme .navbar.scrolled { background: rgba(246, 248, 252, 0.94); }
body.light-theme .nav-menu { background: rgba(246, 248, 252, 0.97); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.76rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--surface-light); }

@media (max-width: 760px) {
    .theme-toggle-text { display: none; }
    .theme-toggle { width: 42px; height: 42px; justify-content: center; padding: 0; }
}

/* Final alignment overrides */
.contact-connect-title {
    width: 100%;
    text-align: center;
}

footer {
    justify-content: center;
    text-align: center;
}

footer .footer-left {
    width: 100%;
    justify-content: center;
    align-items: center;
}

/* Mobile layout refinements */
@media (max-width: 760px) {
    html {
        scroll-padding-top: 82px;
    }

    .nav-container {
        gap: 10px;
    }

    .nav-actions {
        margin-left: auto;
    }

    .nav-menu {
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .hero-buttons,
    .contact-social-buttons {
        width: 100%;
    }

    .profile-tags {
        gap: 6px;
    }

    .profile-tags span {
        font-size: 0.58rem;
    }

    .research-topics,
    .project-tags {
        gap: 6px;
    }

    footer,
    footer .footer-left {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 680px) {
    .contact-social-buttons .button {
        width: 100%;
        min-width: 0;
    }

    .contact-social-buttons .contact-email-button {
        font-size: 0.78rem;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 380px) {
    .nav-container,
    .section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero h1 {
        font-size: 3.25rem;
    }

    .contact-box {
        padding-left: 16px;
        padding-right: 16px;
    }
}
