:root {
    color-scheme: dark;
    --ink: #f4f7fb;
    --ink-soft: #c1cada;
    --muted: #8e9bb0;
    --paper: #080d17;
    --surface: #111927;
    --line: #273248;
    --navy: #0b1220;
    --blue: #8296ff;
    --blue-dark: #acb8ff;
    --cyan: #53d6d0;
    --violet: #a78bfa;
    --amber: #f6b84b;
    --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.42);
    --radius: 22px;
    --content: 1120px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 138px;
}

body {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
    color: var(--ink-soft);
    background:
        radial-gradient(circle at 8% 14%, rgba(130, 150, 255, 0.12), transparent 22rem),
        radial-gradient(circle at 92% 38%, rgba(83, 214, 208, 0.09), transparent 24rem),
        var(--paper);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.32;
    background-image: radial-gradient(rgba(188, 201, 224, 0.14) 0.7px, transparent 0.7px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

::selection {
    color: white;
    background: var(--blue);
}

a {
    color: inherit;
}

/* NAVIGATION */
#navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 2rem;
    color: white;
    background: rgba(11, 18, 32, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav-container {
    width: min(100%, var(--content));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-name {
    position: relative;
    color: #ffffff;
    font-size: 0.93rem;
    font-weight: 760;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.nav-name::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 5px rgba(83, 214, 208, 0.12);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    position: relative;
    padding: 0.55rem 0.75rem;
    color: #aab4c7;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 10px;
    transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    bottom: 0.28rem;
    left: 0.75rem;
    height: 2px;
    border-radius: 10px;
    background: var(--cyan);
}

/* LAYOUT */
main {
    width: min(calc(100% - 3rem), var(--content));
    margin: 0 auto;
    padding: 1.5rem 0 7rem;
}

section {
    position: relative;
    padding: 6.5rem 0;
    scroll-margin-top: 138px;
}

section:not(#about) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

section:last-child {
    border-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.25rem;
    color: var(--ink);
    font-family: Georgia, Cambria, Times New Roman, serif;
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.045em;
}

.section-title::after {
    content: "";
    width: min(10vw, 90px);
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

/* HERO */
#about {
    min-height: calc(100vh - 100px);
    margin-top: 0.5rem;
    padding: clamp(3.5rem, 8vw, 7rem);
    display: grid;
    align-items: center;
    color: #dce4f1;
    background:
        radial-gradient(circle at 14% 28%, rgba(83, 214, 208, 0.2), transparent 25%),
        radial-gradient(circle at 88% 78%, rgba(167, 139, 250, 0.2), transparent 30%),
        linear-gradient(135deg, #111b31 0%, #0b1220 55%, #182440 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    isolation: isolate;
}

#about::before,
#about::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

#about::before {
    width: 370px;
    height: 370px;
    top: -190px;
    right: -90px;
    box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.018), 0 0 0 120px rgba(255, 255, 255, 0.012);
}

#about::after {
    width: 210px;
    height: 210px;
    bottom: -145px;
    left: 42%;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.65fr);
    gap: clamp(3rem, 7vw, 6rem);
    align-items: center;
}

.about-photo {
    position: relative;
    justify-self: center;
}

.about-photo::before {
    content: "";
    position: absolute;
    inset: -15px;
    border: 1px solid rgba(83, 214, 208, 0.5);
    border-radius: 50%;
    animation: slow-spin 18s linear infinite;
}

.about-photo::after {
    content: "";
    position: absolute;
    right: 2%;
    bottom: 10%;
    width: 22px;
    height: 22px;
    border: 5px solid #111b31;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 25px rgba(83, 214, 208, 0.7);
}

.about-photo img {
    width: clamp(210px, 26vw, 295px);
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
    border: 8px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    filter: saturate(0.86) contrast(1.04);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.about-info::before {
    content: "ALGORITHMICS · GRAPH OPTIMIZATION";
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.1rem;
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.about-info h1 {
    max-width: 700px;
    margin-bottom: 0.65rem;
    color: #ffffff;
    font-family: Georgia, Cambria, Times New Roman, serif;
    font-size: clamp(3rem, 7vw, 5.9rem);
    font-weight: 500;
    line-height: 0.92;
    letter-spacing: -0.065em;
}

.position {
    margin-bottom: 0.15rem;
    color: #ffffff;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 630;
}

.institution {
    margin-bottom: 1.5rem;
    color: #9eaac0;
    font-size: 0.92rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.7rem;
}

.contact-links a {
    padding: 0.56rem 0.85rem;
    color: #e5eaf3;
    font-size: 0.75rem;
    font-weight: 650;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.contact-links a:hover {
    transform: translateY(-2px);
    color: #ffffff;
    background: rgba(83, 214, 208, 0.13);
    border-color: rgba(83, 214, 208, 0.55);
}

.contact-links a:last-child {
    color: #111827;
    background: var(--cyan);
    border-color: var(--cyan);
}

.bio {
    max-width: 710px;
    color: #bcc7d9;
    font-size: 0.98rem;
    line-height: 1.8;
}

.bio strong {
    color: #ffffff;
    font-weight: 650;
}

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

/* RESEARCH */
#research {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

#research .section-title,
.research-interests {
    grid-column: 1 / -1;
}

.research-item {
    position: relative;
    min-height: 290px;
    margin: 0;
    padding: 2rem;
    background: rgba(17, 25, 39, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.research-item::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -70px;
    bottom: -70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(82, 108, 255, 0.2), rgba(83, 214, 208, 0.16));
}

.research-item:hover {
    transform: translateY(-6px);
    border-color: rgba(82, 108, 255, 0.28);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.32);
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.research-tag {
    padding: 0.35rem 0.7rem;
    color: #bdc7ff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    background: rgba(130, 150, 255, 0.14);
    border-radius: 999px;
}

.research-tag.project {
    color: #82ede3;
    background: rgba(83, 214, 208, 0.12);
}

.research-year {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 620;
}

.research-item h3 {
    margin-bottom: 0.65rem;
    color: var(--ink);
    font-family: Georgia, Cambria, Times New Roman, serif;
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.research-item p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.research-item .advisor {
    margin-bottom: 0.8rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.research-interests {
    margin-top: 0.8rem;
    padding: 1.6rem 1.8rem;
    background: #0d1523;
    border-radius: 18px;
}

.research-interests h3 {
    margin-bottom: 0.9rem;
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.research-interests ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    list-style: none;
}

.research-interests li {
    padding: 0.42rem 0.78rem;
    color: #c8d2e2;
    font-size: 0.76rem;
    font-weight: 650;
    background: #151f30;
    border: 1px solid #2b3850;
    border-radius: 999px;
}

/* PUBLICATION */
#publications {
    padding-top: 5.5rem;
}

.pub-item {
    position: relative;
    padding: clamp(2rem, 5vw, 3.5rem);
    color: #d8e1ef;
    background: linear-gradient(120deg, #111b31, #182440);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.pub-item::after {
    content: "↗";
    position: absolute;
    right: clamp(1.5rem, 5vw, 3.5rem);
    top: clamp(1.5rem, 5vw, 3rem);
    color: rgba(255, 255, 255, 0.13);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
}

.pub-venue {
    margin-bottom: 1rem;
    color: var(--cyan);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.pub-title {
    max-width: 760px;
    margin-bottom: 1rem;
    color: white;
    font-family: Georgia, Cambria, Times New Roman, serif;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.pub-authors {
    margin-bottom: 0.35rem;
    color: #c3ccdb;
    font-size: 0.88rem;
}

.pub-details {
    max-width: 750px;
    margin-bottom: 1.25rem;
    color: #8f9db4;
    font-size: 0.8rem;
    font-style: italic;
}

.pub-links a,
.project-link {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    color: #c8d0ff;
    font-size: 0.76rem;
    font-weight: 750;
    text-decoration: none;
    background: rgba(130, 150, 255, 0.14);
    border-radius: 999px;
    transition: transform 180ms ease, background 180ms ease;
}

.pub-links a {
    color: #072b2a;
    background: var(--cyan);
}

.pub-links a:hover,
.project-link:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.pub-links a:hover {
    background: #85eee6;
}

.project-link:hover {
    background: rgba(130, 150, 255, 0.28);
}

/* EXPERIENCE TIMELINE */
#academic-experience,
#engineering-experience {
    --timeline-x: 15px;
}

.exp-item {
    position: relative;
    margin: 0 0 1.15rem 0;
    padding: 1.8rem 2rem 1.8rem 3.5rem;
    background: rgba(17, 25, 39, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.exp-item::before {
    content: "";
    position: absolute;
    top: 2.2rem;
    left: var(--timeline-x);
    width: 11px;
    height: 11px;
    background: #0a101b;
    border: 3px solid var(--blue);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(130, 150, 255, 0.13);
}

.exp-item::after {
    content: "";
    position: absolute;
    top: 3rem;
    bottom: -1.5rem;
    left: 21px;
    width: 1px;
    background: #2d3950;
}

.exp-item:last-child::after {
    display: none;
}

.exp-item:hover {
    transform: translateX(6px);
    border-color: rgba(82, 108, 255, 0.22);
    box-shadow: var(--shadow-sm);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1rem;
}

.exp-item h3 {
    margin-bottom: 0.1rem;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 760;
    line-height: 1.4;
}

.exp-role {
    color: var(--blue-dark);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 700;
}

.exp-meta {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 620;
    line-height: 1.55;
    text-align: right;
}

.exp-meta span {
    display: block;
}

.exp-item ul {
    padding-left: 1.1rem;
    font-size: 0.86rem;
    line-height: 1.75;
}

.exp-item li {
    margin-bottom: 0.4rem;
    padding-left: 0.2rem;
}

.exp-item li::marker {
    color: var(--blue);
}

.exp-item a {
    color: var(--blue-dark);
    font-weight: 700;
    text-underline-offset: 3px;
}

.exp-item ul li.tech-stack {
    display: inline-flex;
    margin: 0.55rem 0 0 -1.1rem;
    padding: 0.42rem 0.72rem;
    color: #aeb9cb;
    font-size: 0.74rem;
    background: #1a2536;
    border-radius: 8px;
    list-style: none;
}

/* PROJECTS */
#projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

#projects .section-title {
    grid-column: 1 / -1;
}

.project-item {
    position: relative;
    min-height: 330px;
    margin: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.project-item::before {
    content: "0" counter(project);
    margin-bottom: auto;
    color: #354158;
    font-family: Georgia, Cambria, Times New Roman, serif;
    font-size: 3rem;
    line-height: 1;
}

#projects {
    counter-reset: project;
}

.project-item {
    counter-increment: project;
}

.project-item:hover {
    transform: translateY(-8px) rotate(-0.3deg);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.project-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0;
}

.project-item h3 {
    margin: 1.5rem 0 0.75rem;
    color: var(--ink);
    font-family: Georgia, Cambria, Times New Roman, serif;
    font-size: 1.28rem;
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: -0.02em;
}

.project-header h3 {
    margin-top: 1.5rem;
}

.project-grade {
    padding: 0.33rem 0.62rem;
    color: #82ede3;
    font-size: 0.66rem;
    font-weight: 800;
    background: rgba(83, 214, 208, 0.12);
    border-radius: 999px;
}

.project-item p {
    margin-bottom: 1.35rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.72;
}

.project-item .project-link {
    align-self: flex-start;
    margin-top: auto;
}

/* EDUCATION */
#education {
    display: grid;
    grid-template-columns: 1.5fr 0.85fr;
    gap: 1.25rem;
}

#education .section-title {
    grid-column: 1 / -1;
}

.edu-item {
    min-height: 220px;
    margin: 0;
    padding: 2rem;
    background: linear-gradient(145deg, #141d2d, #0e1624);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.edu-header {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.3rem;
}

.edu-item h3 {
    margin-bottom: 0.35rem;
    color: var(--ink);
    font-family: Georgia, Cambria, Times New Roman, serif;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.edu-degree {
    margin-bottom: 0.9rem;
    color: var(--blue-dark);
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 680;
}

.edu-details {
    margin-bottom: 0.65rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.65;
}

.edu-courses {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.65;
}

.edu-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
    border-top: 1px solid var(--line);
}

.edu-meta span {
    display: block;
}

/* SKILLS AND AWARD */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.skills-block {
    padding: 1.5rem;
    background: #111927;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.skills-block h3 {
    margin-bottom: 0.6rem;
    color: var(--blue-dark);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skills-block p {
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.68;
}

.award-item {
    position: relative;
    padding: 1.7rem 2rem 1.7rem 5rem;
    color: #fff5d9;
    background: linear-gradient(105deg, #8a4b08, #bf741e 55%, #d99a38);
    border-radius: 18px;
    box-shadow: 0 18px 35px rgba(138, 75, 8, 0.2);
    overflow: hidden;
}

.award-item::before {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 2rem;
    color: #ffe8a3;
    font-size: 2rem;
    transform: translateY(-50%);
}

.award-item strong {
    display: block;
    margin-bottom: 0.2rem;
    color: white;
    font-size: 0.94rem;
}

.award-item p {
    color: #ffe8bd;
    font-size: 0.8rem;
}

/* FOOTER */
footer {
    position: relative;
    padding: 3.5rem 2rem;
    color: #8f9db4;
    text-align: center;
    font-size: 0.78rem;
    background: var(--navy);
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    top: -310px;
    left: calc(50% - 180px);
    border: 1px solid rgba(83, 214, 208, 0.25);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(83, 214, 208, 0.025), 0 0 0 110px rgba(83, 214, 208, 0.018);
}

footer a {
    color: var(--cyan);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* REVEAL MOTION */
.reveal-ready {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

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

:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 4px;
}

/* TABLET */
@media (max-width: 900px) {
    main {
        width: min(calc(100% - 2rem), var(--content));
    }

    #about {
        min-height: auto;
        padding: 4rem 2.5rem;
    }

    .about-grid {
        grid-template-columns: 190px 1fr;
        gap: 2.5rem;
    }

    .about-photo img {
        width: 190px;
    }

    .about-info h1 {
        font-size: clamp(3rem, 7vw, 4.5rem);
    }

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

    .project-item:last-child {
        grid-column: 1 / -1;
        min-height: 270px;
    }

    #education {
        grid-template-columns: 1fr;
    }

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

    .skills-block:last-child {
        grid-column: 1 / -1;
    }
}

/* MOBILE */
@media (max-width: 680px) {
    body {
        font-size: 15px;
    }

    #navbar {
        padding: 0 1rem;
    }

    .nav-container {
        height: auto;
        min-height: 0;
        padding: 0.65rem 0 0.25rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        overflow: hidden;
    }

    .nav-name {
        padding-left: 0.55rem;
    }

    .nav-links {
        width: 100%;
        max-width: none;
        padding: 0.15rem 0 0.35rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex: 0 0 auto;
        padding-inline: 0.58rem;
        font-size: 0.7rem;
    }

    main {
        width: min(calc(100% - 1.1rem), var(--content));
        padding-top: 0.55rem;
    }

    section {
        padding: 4.5rem 0;
    }

    .section-title {
        font-size: 2.25rem;
    }

    #about {
        margin-top: 0;
        padding: 3rem 1.3rem;
        text-align: center;
        border-radius: 24px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.3rem;
    }

    .about-photo img {
        width: 180px;
    }

    .about-info::before {
        font-size: 0.62rem;
    }

    .about-info h1 {
        font-size: clamp(3rem, 16vw, 4.3rem);
    }

    .position {
        font-size: 0.95rem;
    }

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

    .bio {
        font-size: 0.88rem;
        text-align: left;
    }

    #research,
    #projects,
    #education,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    #research .section-title,
    .research-interests,
    #projects .section-title,
    .project-item:last-child,
    #education .section-title,
    .skills-block:last-child {
        grid-column: auto;
    }

    .research-item,
    .project-item {
        min-height: auto;
    }

    .project-item::before {
        margin-bottom: 1.2rem;
    }

    .exp-item {
        padding: 1.45rem 1.25rem 1.45rem 2.8rem;
    }

    .exp-item::before {
        left: 13px;
    }

    .exp-item::after {
        left: 19px;
    }

    .exp-header,
    .research-header {
        flex-direction: column;
        gap: 0.4rem;
    }

    .exp-meta {
        display: flex;
        gap: 0.7rem;
        text-align: left;
    }

    .edu-meta {
        flex-direction: column;
        gap: 0.2rem;
    }

    .award-item {
        padding: 4rem 1.4rem 1.5rem;
    }

    .award-item::before {
        top: 1rem;
        left: 1.4rem;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }

    .reveal-ready {
        opacity: 1;
        transform: none;
    }
}


/* THEME SWITCHER */
.nav-container {
    position: relative;
}

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

.theme-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: #ffd875;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
    color: #ffe7a3;
    background: rgba(255, 216, 117, 0.13);
    border-color: rgba(255, 216, 117, 0.45);
    transform: rotate(12deg) scale(1.06);
}

.theme-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-moon {
    display: none;
}

html[data-theme="light"] {
    color-scheme: light;
    --ink: #101828;
    --ink-soft: #344054;
    --muted: #667085;
    --paper: #f5f7fb;
    --surface: #ffffff;
    --line: #e4e7ec;
    --blue: #526cff;
    --blue-dark: #3346c8;
    --shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 30px 80px rgba(16, 24, 40, 0.16);
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at 8% 14%, rgba(82, 108, 255, 0.08), transparent 22rem),
        radial-gradient(circle at 92% 38%, rgba(83, 214, 208, 0.08), transparent 24rem),
        var(--paper);
}

html[data-theme="light"] body::before {
    background-image: radial-gradient(rgba(16, 24, 40, 0.18) 0.7px, transparent 0.7px);
}

html[data-theme="light"] section:not(#about) {
    border-bottom-color: rgba(16, 24, 40, 0.1);
}

html[data-theme="light"] .research-item {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(16, 24, 40, 0.09);
}

html[data-theme="light"] .research-item:hover {
    border-color: rgba(82, 108, 255, 0.28);
    box-shadow: 0 22px 50px rgba(16, 24, 40, 0.1);
}

html[data-theme="light"] .research-tag {
    color: #3346c8;
    background: #edf0ff;
}

html[data-theme="light"] .research-tag.project,
html[data-theme="light"] .project-grade {
    color: #04726e;
    background: #e1f8f6;
}

html[data-theme="light"] .research-interests {
    background: #eef1f8;
}

html[data-theme="light"] .research-interests li {
    color: #36405a;
    background: #ffffff;
    border-color: #dce1ea;
}

html[data-theme="light"] .exp-item {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(16, 24, 40, 0.08);
    box-shadow: 0 5px 18px rgba(16, 24, 40, 0.035);
}

html[data-theme="light"] .exp-item:hover {
    border-color: rgba(82, 108, 255, 0.22);
    box-shadow: var(--shadow-sm);
}

html[data-theme="light"] .exp-item::before {
    background: #ffffff;
    box-shadow: 0 0 0 6px #edf0ff;
}

html[data-theme="light"] .exp-item::after {
    background: #d9deeb;
}

html[data-theme="light"] .exp-item ul li.tech-stack {
    color: #4f5d75;
    background: #eef1f7;
}

html[data-theme="light"] .project-item,
html[data-theme="light"] .skills-block {
    border-color: rgba(16, 24, 40, 0.09);
}

html[data-theme="light"] .project-item::before {
    color: #d9deeb;
}

html[data-theme="light"] .project-item:hover {
    box-shadow: 0 24px 55px rgba(16, 24, 40, 0.12);
}

html[data-theme="light"] .project-link {
    color: #3346c8;
    background: #edf0ff;
}

html[data-theme="light"] .project-link:hover {
    background: #e2e6ff;
}

html[data-theme="light"] .edu-item {
    background: linear-gradient(145deg, #ffffff, #f4f6fb);
    border-color: rgba(16, 24, 40, 0.09);
}

html[data-theme="light"] .skills-block {
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(16, 24, 40, 0.035);
}

html[data-theme="light"] .theme-toggle {
    color: #cbd5ff;
}

html[data-theme="light"] .theme-toggle:hover {
    color: #ffffff;
    background: rgba(130, 150, 255, 0.16);
    border-color: rgba(130, 150, 255, 0.45);
    transform: rotate(-10deg) scale(1.06);
}

html[data-theme="light"] .theme-icon-sun {
    display: none;
}

html[data-theme="light"] .theme-icon-moon {
    display: block;
}

@media (max-width: 680px) {
    .theme-toggle {
        position: absolute;
        top: 0.52rem;
        right: 0.35rem;
        width: 35px;
        height: 35px;
        z-index: 2;
    }

    .nav-name {
        padding-right: 3.25rem;
    }
}


@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}


/* LIGHT THEME HERO */
html[data-theme="light"] #about {
    color: var(--ink-soft);
    background:
        radial-gradient(circle at 14% 28%, rgba(83, 214, 208, 0.2), transparent 27%),
        radial-gradient(circle at 88% 78%, rgba(130, 150, 255, 0.18), transparent 31%),
        linear-gradient(135deg, #ffffff 0%, #f5f8ff 55%, #edf2ff 100%);
    border-color: rgba(16, 24, 40, 0.09);
    box-shadow: 0 30px 80px rgba(48, 63, 105, 0.14);
}

html[data-theme="light"] #about::before,
html[data-theme="light"] #about::after {
    border-color: rgba(82, 108, 255, 0.13);
}

html[data-theme="light"] #about::before {
    box-shadow: 0 0 0 60px rgba(82, 108, 255, 0.025), 0 0 0 120px rgba(82, 108, 255, 0.015);
}

html[data-theme="light"] .about-photo::before {
    border-color: rgba(51, 70, 200, 0.38);
}

html[data-theme="light"] .about-photo::after {
    border-color: #f5f8ff;
}

html[data-theme="light"] .about-photo img {
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 24px 60px rgba(48, 63, 105, 0.2);
}

html[data-theme="light"] .about-info::before {
    color: #3346c8;
}

html[data-theme="light"] .about-info h1,
html[data-theme="light"] .position,
html[data-theme="light"] .bio strong {
    color: var(--ink);
}

html[data-theme="light"] .institution {
    color: var(--muted);
}

html[data-theme="light"] .bio {
    color: #4d5a70;
}

html[data-theme="light"] .contact-links a {
    color: #334054;
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(16, 24, 40, 0.11);
    box-shadow: 0 4px 12px rgba(48, 63, 105, 0.05);
}

html[data-theme="light"] .contact-links a:hover {
    color: #243466;
    background: #ffffff;
    border-color: rgba(82, 108, 255, 0.36);
}

html[data-theme="light"] .contact-links a:last-child {
    color: #111827;
    background: var(--cyan);
    border-color: var(--cyan);
}


/* LIGHT THEME PUBLICATION */
html[data-theme="light"] .pub-item {
    color: var(--ink-soft);
    background:
        radial-gradient(circle at 92% 18%, rgba(83, 214, 208, 0.14), transparent 24%),
        linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
    border-color: rgba(16, 24, 40, 0.09);
    box-shadow: 0 24px 60px rgba(48, 63, 105, 0.13);
}

html[data-theme="light"] .pub-item::after {
    color: rgba(51, 70, 200, 0.13);
}

html[data-theme="light"] .pub-venue {
    color: #167b78;
}

html[data-theme="light"] .pub-title {
    color: var(--ink);
}

html[data-theme="light"] .pub-authors {
    color: var(--ink-soft);
}

html[data-theme="light"] .pub-details {
    color: var(--muted);
}


/* SECTION NAVIGATION RAIL */
.section-nav {
    position: sticky;
    top: 68px;
    z-index: 90;
    width: fit-content;
    max-width: 100%;
    margin: 1.25rem auto 0;
    padding: 0.38rem;
    background: rgba(17, 25, 39, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.section-nav .nav-links {
    max-width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.section-nav .nav-links::-webkit-scrollbar {
    display: none;
}

.section-nav .nav-links a {
    flex: 0 0 auto;
    scroll-snap-align: center;
    padding: 0.65rem 0.9rem;
    color: #aeb9cb;
}

.section-nav .nav-links a:hover,
.section-nav .nav-links a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .section-nav {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(16, 24, 40, 0.1);
    box-shadow: 0 12px 35px rgba(48, 63, 105, 0.13);
}

html[data-theme="light"] .section-nav .nav-links a {
    color: #667085;
}

html[data-theme="light"] .section-nav .nav-links a:hover,
html[data-theme="light"] .section-nav .nav-links a.active {
    color: #1d2a55;
    background: rgba(82, 108, 255, 0.1);
}

@media (max-width: 680px) {
    .nav-container {
        height: 62px;
        min-height: 62px;
        padding: 0;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        overflow: visible;
    }

    .section-nav {
        top: 62px;
        width: 100%;
        margin-top: 0.75rem;
        border-radius: 14px;
    }

    .section-nav .nav-links {
        width: 100%;
        max-width: none;
        justify-content: flex-start;
        padding: 0;
    }

    .section-nav .nav-links a {
        padding: 0.62rem 0.82rem;
        font-size: 0.72rem;
    }
}


/* TABBED SECTION PANELS */
body.has-section-tabs main > section:not(#about):not(.is-active-panel) {
    display: none;
}

body.has-section-tabs main > section.is-active-panel {
    animation: panel-enter 420ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes panel-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-arrow {
    position: fixed;
    top: 54%;
    z-index: 80;
    width: 50px;
    height: 96px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #d8e0ef;
    background: rgba(17, 25, 39, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.92);
    transition: opacity 180ms ease, transform 180ms ease, color 180ms ease, background 180ms ease;
}

.section-arrow-prev {
    left: 0;
    border-left: 0;
    border-radius: 0 18px 18px 0;
}

.section-arrow-next {
    right: 0;
    border-right: 0;
    border-radius: 18px 0 0 18px;
}

.section-arrow svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.show-section-arrows .section-arrow {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

body.show-section-arrows .section-arrow:hover {
    color: #ffffff;
    background: rgba(82, 108, 255, 0.9);
    transform: translateY(-50%) scale(1.05);
}

body.show-section-arrows .section-arrow:disabled {
    opacity: 0.22;
    pointer-events: none;
}

html[data-theme="light"] .section-arrow {
    color: #3346c8;
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(16, 24, 40, 0.1);
    box-shadow: 0 14px 36px rgba(48, 63, 105, 0.16);
}

html[data-theme="light"] body.show-section-arrows .section-arrow:hover {
    color: #ffffff;
    background: rgba(82, 108, 255, 0.94);
}

@media (max-width: 680px) {
    .section-arrow {
        top: 55%;
        width: 36px;
        height: 76px;
    }

    .section-arrow-prev {
        border-radius: 0 13px 13px 0;
    }

    .section-arrow-next {
        border-radius: 13px 0 0 13px;
    }

    .section-arrow svg {
        width: 21px;
        height: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.has-section-tabs main > section.is-active-panel {
        animation: none;
    }
}


/* EXPERIENCE CATEGORY NOTE */
.experience-note {
    max-width: 680px;
    margin: -1.15rem 0 1.5rem;
    color: var(--muted);
    font-size: 0.8rem;
}
