:root {
    --bg: #f9fafb;
    --ink: #030712;
    --muted: #4b5563;
    --line: rgba(212, 190, 203, 0.58);
    --panel: rgba(255, 255, 255, 0.68);
    --panel-strong: rgba(255, 255, 255, 0.84);
    --pastel-pink: #fbe2e3;
    --pastel-lilac: #dbd7fb;
    --pastel-mint: #e5f8ee;
    --pastel-blue: #e6f2ff;
    --primary: #1f6f68;
    --primary-dark: #164f4a;
    --accent: #d45538;
    --blue: #245c9c;
}

[data-theme="dark"] {
    --bg: #0d1117;
    --ink: #f8fafc;
    --muted: #cbd5e1;
    --line: rgba(255, 255, 255, 0.14);
    --panel: #151b23;
    --panel-strong: #1f2937;
    --primary: #4db6ac;
    --primary-dark: #31988f;
    --accent: #f0a18e;
    --blue: #93c5fd;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 16% 14%, rgba(251, 226, 227, 0.78), transparent 30rem),
        radial-gradient(circle at 84% 18%, rgba(219, 215, 251, 0.72), transparent 32rem),
        radial-gradient(circle at 18% 52%, rgba(229, 248, 238, 0.72), transparent 34rem),
        radial-gradient(circle at 86% 66%, rgba(230, 242, 255, 0.76), transparent 34rem),
        radial-gradient(circle at 42% 92%, rgba(251, 226, 227, 0.58), transparent 30rem),
        linear-gradient(135deg, #fffafa 0%, #f7fbff 36%, #fbfff8 68%, #fff7fb 100%);
    background-attachment: fixed;
    background-size: 100% 100%;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    transition: background 220ms ease, color 220ms ease;
}

[data-theme="dark"] {
    background:
        radial-gradient(circle at 18% 12%, rgba(83, 46, 95, 0.36), transparent 30rem),
        radial-gradient(circle at 82% 8%, rgba(28, 76, 97, 0.34), transparent 34rem),
        linear-gradient(135deg, #0d1117 0%, #111827 52%, #101820 100%);
    background-attachment: fixed;
    background-size: 100% 100%;
}

.root-layout {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.page-content {
    position: relative;
    z-index: 1;
}

.theme-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(21, 24, 29, 0.1);
    cursor: pointer;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    left: 1rem;
    padding: 0;
    position: fixed;
    top: 1rem;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
    width: 3rem;
    z-index: 1000;
    backdrop-filter: blur(0.5rem);
}

.theme-toggle:hover,
.theme-toggle:focus {
    transform: scale(1.06);
}

.theme-toggle-icon {
    background: #15181d;
    border-radius: 50%;
    display: block;
    height: 1.25rem;
    position: relative;
    width: 1.25rem;
}

.theme-toggle-icon::after {
    background: rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    content: "";
    height: 1.25rem;
    position: absolute;
    right: -0.38rem;
    top: -0.2rem;
    transition: opacity 180ms ease, transform 180ms ease;
    width: 1.25rem;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(21, 27, 35, 0.82);
    border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .theme-toggle-icon {
    background: #f8fafc;
}

[data-theme="dark"] .theme-toggle-icon::after {
    opacity: 0;
    transform: translate(0.5rem, -0.5rem);
}

a {
    color: inherit;
    text-decoration: none;
}

.floating-nav-list,
.intro-actions,
.social-buttons,
.section-heading {
    align-items: center;
    display: flex;
}

.button {
    border: 1px solid var(--ink);
    border-radius: 6px;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
}

.messages {
    margin: 5.5rem auto 0;
    max-width: 1120px;
    padding: 0 5vw;
}

.floating-header {
    position: relative;
    z-index: 999;
}

.header-glass {
    animation: header-drop 440ms ease-out both;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
    height: 4.5rem;
    left: 50%;
    position: fixed;
    top: 0;
    transform: translateX(-50%);
    width: 100%;
    backdrop-filter: blur(0.5rem);
}

[data-theme="dark"] .header-glass {
    background: rgba(21, 27, 35, 0.78);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.floating-nav {
    height: 3rem;
    left: 50%;
    padding: 0.5rem 0;
    position: fixed;
    top: 0.15rem;
    transform: translateX(-50%);
}

.floating-nav-list {
    color: var(--muted);
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 0 0.15rem;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 22rem;
}

.floating-nav-list li {
    align-items: center;
    animation: nav-item-drop 420ms ease-out both;
    display: flex;
    height: 75%;
    justify-content: center;
}

.floating-nav-list li:nth-child(2) {
    animation-delay: 60ms;
}

.floating-nav-list li:nth-child(3) {
    animation-delay: 120ms;
}

.floating-nav-list li:nth-child(4) {
    animation-delay: 180ms;
}

.floating-nav-list li:nth-child(5) {
    animation-delay: 240ms;
}

.floating-nav-list a {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.65rem 0.75rem;
    transition: color 160ms ease;
    width: 100%;
}

.floating-nav-list a:hover,
.floating-nav-list a:focus {
    color: var(--ink);
}

.message {
    background: rgba(229, 248, 238, 0.82);
    border: 1px solid rgba(183, 221, 204, 0.8);
    border-radius: 6px;
    color: #184f3a;
    margin: 0;
    padding: 0.85rem 1rem;
}

[data-theme="dark"] .message {
    background: rgba(25, 85, 61, 0.3);
    border-color: rgba(100, 200, 150, 0.28);
    color: #bbf7d0;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 5.6rem);
    line-height: 0.98;
    margin: 0;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1;
    margin: 0.25rem 0 0;
}

.section-title {
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    line-height: 1.15;
    margin: 0 0 1.6rem;
    text-align: center;
}

h3 {
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 0;
}

.button.primary {
    background: linear-gradient(135deg, var(--primary), #6aaea7);
    border-color: var(--primary);
    color: #fff;
}

.button.primary:hover {
    background: var(--primary-dark);
}

.button.ghost {
    background: transparent;
}

.button.ghost.dark {
    border-color: var(--line);
}

.button.compact {
    min-height: 40px;
    padding: 0.55rem 0.85rem;
}

.button.danger {
    background: linear-gradient(135deg, var(--accent), #f0a18e);
    border-color: var(--accent);
    color: #fff;
}

.section,
.about-section,
.contact-band {
    padding: clamp(3rem, 7vw, 6rem) 5vw;
}

.about-section {
    line-height: 2;
    margin: 0 auto clamp(1rem, 3vw, 2rem);
    max-width: 45rem;
    text-align: center;
}

.about-section p {
    color: #343942;
    margin: 0;
}

[data-theme="dark"] .about-section p {
    color: var(--muted);
}

.about-section p + p {
    margin-top: 0.75rem;
}

.text-medium {
    font-weight: 800;
}

.text-italic {
    font-style: italic;
}

.text-underline {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.section-heading {
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.academic-section {
    max-width: 1440px;
    margin: 0 auto;
}

.timeline-range {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 900;
    padding: 0.45rem 0.8rem;
}

.academic-timeline {
    list-style: none;
    margin: clamp(2rem, 5vw, 3.5rem) auto 0;
    max-width: min(1320px, 96vw);
    padding: 0;
    position: relative;
}

.academic-timeline::before,
.academic-timeline::after {
    content: "";
    left: 50%;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 3px;
}

.academic-timeline::before {
    background: rgba(75, 85, 99, 0.18);
    height: 100%;
}

.academic-timeline::after {
    animation: timeline-grow 1800ms ease-out both;
    background: linear-gradient(180deg, var(--accent), var(--primary), var(--blue));
    border-radius: 999px;
    height: 100%;
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
}

.timeline-item {
    animation: timeline-item-in 620ms ease-out both;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr);
    min-height: min(68vh, 36rem);
    padding: 7vh 0;
    position: relative;
}

.timeline-item:nth-child(even) {
    grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr);
}

.timeline-item:nth-child(1) {
    animation-delay: 120ms;
}

.timeline-item:nth-child(2) {
    animation-delay: 280ms;
}

.timeline-item:nth-child(3) {
    animation-delay: 440ms;
}

.timeline-item:nth-child(4) {
    animation-delay: 600ms;
}

.timeline-item:nth-child(5) {
    animation-delay: 760ms;
}

.timeline-item:nth-child(6) {
    animation-delay: 920ms;
}

.timeline-dot {
    align-self: start;
    background: var(--panel);
    border: 3px solid var(--primary);
    border-radius: 999px;
    box-shadow: 0 0 0 8px rgba(31, 111, 104, 0.12);
    grid-column: 2;
    height: 1.15rem;
    justify-self: center;
    margin-top: 1.3rem;
    position: relative;
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
    width: 1.15rem;
    z-index: 2;
}

.timeline-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(251, 226, 227, 0.5));
    border: 1px solid rgba(212, 190, 203, 0.58);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(21, 24, 29, 0.08);
    padding: 1.25rem;
    position: sticky;
    top: 34vh;
    transform: scale(0.96);
    transform-origin: center;
    transition: background 220ms ease, box-shadow 220ms ease, opacity 220ms ease, transform 260ms ease;
    z-index: 1;
    backdrop-filter: blur(0.45rem);
    width: min(100%, 24rem);
}

.timeline-item:nth-child(odd) .timeline-card {
    grid-column: 1;
    justify-self: end;
    margin-right: 2rem;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-card {
    grid-column: 3;
    justify-self: start;
    margin-left: 2rem;
}

.timeline-card time {
    color: var(--accent);
    display: block;
    font-size: 0.8rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
    transition: color 220ms ease, font-size 220ms ease;
}

.timeline-card h3 {
    font-size: 1.2rem;
    font-weight: 900;
}

.timeline-card p {
    color: var(--muted);
    margin: 0.6rem 0 0;
}

.year-projects {
    align-self: start;
    opacity: 0.58;
    position: sticky;
    top: 38vh;
    transform: translateY(0.75rem) scale(0.96);
    transition: opacity 260ms ease, transform 260ms ease;
    z-index: 1;
    width: min(31rem, 100%);
}

.timeline-item:nth-child(odd) .year-projects {
    grid-column: 3;
    justify-self: start;
    margin-left: 2rem;
    max-width: 100%;
}

.timeline-item:nth-child(even) .year-projects {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    margin-right: 2rem;
    max-width: 100%;
}

.year-projects-track {
    align-items: flex-start;
    display: flex;
    gap: 0.85rem;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.45rem 0.75rem 1.1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.timeline-item:nth-child(even) .year-projects-track {
    flex-direction: row-reverse;
}

.year-projects-track::-webkit-scrollbar {
    display: none;
}

.year-project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(230, 242, 255, 0.66));
    border: 1px solid rgba(212, 190, 203, 0.56);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(21, 24, 29, 0.08);
    cursor: pointer;
    flex: 0 0 min(15rem, 38%);
    height: 18rem;
    opacity: 0.46;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    transform: scale(0.82);
    transform-origin: center;
    transition:
        background 260ms ease,
        box-shadow 300ms ease,
        flex-basis 420ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 320ms ease,
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: flex-basis, opacity, transform, translate;
}

.year-project-card:focus {
    outline: 3px solid rgba(31, 111, 104, 0.28);
    outline-offset: 3px;
}

.year-project-card.is-selected {
    flex-basis: min(27rem, 86%);
    height: auto;
    min-height: 18rem;
    opacity: 1;
    transform: scale(1);
}

.year-project-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(219, 215, 251, 0.7));
    opacity: 0.78;
}

.year-project-card.is-selected:hover {
    opacity: 1;
}

.year-project-copy {
    display: flex;
    flex-direction: column;
    min-height: 18rem;
    max-width: 50%;
    padding: 1.8rem 1rem 1.35rem 1.6rem;
    position: relative;
    z-index: 2;
}

.year-project-card:nth-child(even) .year-project-copy {
    margin-left: auto;
    padding-left: 1rem;
    padding-right: 1.6rem;
}

.year-project-copy h4 {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 900;
    line-height: 1.18;
    margin: 0;
}

.year-project-copy p {
    color: #374151;
    line-height: 1.6;
    margin: 0.65rem 0 0;
}

.year-project-copy ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: auto 0 0;
    padding: 1rem 0 0;
}

.year-project-copy li {
    background: rgba(31, 111, 104, 0.78);
    border-radius: 999px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0;
    padding: 0.28rem 0.75rem;
    text-transform: uppercase;
}

.year-project-visual {
    align-items: center;
    background: linear-gradient(135deg, #d45538 0%, #6aaea7 54%, #8ba7d8 100%);
    border-radius: 16px;
    box-shadow: 0 24px 50px rgba(21, 24, 29, 0.22);
    color: #fff;
    display: flex;
    bottom: 3rem;
    min-height: 12rem;
    justify-content: center;
    position: absolute;
    right: -6rem;
    top: 3rem;
    transform-origin: center;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
    width: 19rem;
}

.year-project-visual strong {
    font-size: clamp(2rem, 6vw, 4.4rem);
    line-height: 1;
    opacity: 0.9;
}

.year-project-card:nth-child(even) .year-project-visual {
    left: -6rem;
    right: auto;
}

.year-project-card:hover .year-project-visual {
    transform: translate(-0.75rem, -0.75rem) rotate(-2deg) scale(1.04);
}

.year-project-card:nth-child(even):hover .year-project-visual {
    transform: translate(0.75rem, -0.75rem) rotate(2deg) scale(1.04);
}

.timeline-item.is-active .year-projects {
    opacity: 1;
    transform: translateY(0) scale(1.02);
}

.timeline-item.is-active .year-project-card {
    box-shadow: 0 20px 42px rgba(21, 24, 29, 0.13);
}

.timeline-item.is-active .year-project-card.is-selected {
    box-shadow: 0 22px 48px rgba(21, 24, 29, 0.16);
}

.timeline-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 260ms ease, opacity 220ms ease, padding-top 220ms ease;
}

.timeline-item.is-active {
    z-index: 3;
}

.timeline-item.is-active .timeline-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(229, 248, 238, 0.72));
    box-shadow: 0 24px 56px rgba(21, 24, 29, 0.15);
    opacity: 1;
    transform: scale(1.08);
}

.timeline-item.is-active .timeline-dot {
    border-color: var(--accent);
    box-shadow: 0 0 0 10px rgba(212, 85, 56, 0.14), 0 0 26px rgba(31, 111, 104, 0.35);
    transform: scale(1.25);
}

.timeline-item.is-active time {
    color: var(--primary);
    font-size: clamp(1.55rem, 4vw, 2.25rem);
    line-height: 1;
}

.timeline-item.is-active .timeline-details {
    max-height: 12rem;
    opacity: 1;
    padding-top: 0.2rem;
}

[data-theme="dark"] .academic-timeline::before {
    background: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .timeline-card {
    background: rgba(21, 27, 35, 0.78);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .timeline-item.is-active .timeline-card {
    background: rgba(21, 27, 35, 0.94);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] .timeline-dot {
    background: var(--panel);
    box-shadow: 0 0 0 8px rgba(77, 182, 172, 0.13);
}

[data-theme="dark"] .timeline-item.is-active .timeline-dot {
    box-shadow: 0 0 0 10px rgba(240, 161, 142, 0.13), 0 0 28px rgba(77, 182, 172, 0.32);
}

[data-theme="dark"] .year-project-card {
    background: rgba(21, 27, 35, 0.78);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .year-project-card:hover {
    background: rgba(31, 41, 55, 0.96);
}

[data-theme="dark"] .year-project-card:focus {
    outline-color: rgba(77, 182, 172, 0.34);
}

[data-theme="dark"] .year-project-copy p {
    color: var(--muted);
}

[data-theme="dark"] .year-project-copy li {
    background: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .year-project-visual {
    background: linear-gradient(135deg, #05070a 0%, #164f4a 100%);
}

[data-theme="dark"] .timeline-item.is-active .year-project-card {
    background: rgba(21, 27, 35, 0.94);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

.tag {
    background: rgba(251, 226, 227, 0.9);
    border-radius: 999px;
    color: #87321f;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0.25rem 0.55rem;
}

[data-theme="dark"] .tag {
    background: rgba(240, 161, 142, 0.18);
    color: #fecaca;
}

.contact-band {
    background: var(--ink);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
}

[data-theme="dark"] .contact-band {
    background: #05070a;
}

.contact-band p {
    color: #cdd4dd;
    margin-bottom: 0;
}

.social-buttons {
    align-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-buttons a {
    align-items: center;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    display: inline-flex;
    font-weight: 900;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.65rem 0.9rem;
}

[data-theme="dark"] .social-buttons a {
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--ink);
}

.social-buttons span {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), #8ba7d8);
    color: #fff;
    display: inline-flex;
    font-size: 0.74rem;
    height: 30px;
    justify-content: center;
    width: 34px;
}

button {
    cursor: pointer;
    font: inherit;
}

.intro-hero {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(6rem, 10vw, 8rem) 5vw 4rem;
    text-align: center;
}

.portrait-wrap {
    position: relative;
}

.portrait {
    aspect-ratio: 1;
    border: 0.35rem solid #fff;
    border-radius: 50%;
    box-shadow: 0 18px 40px rgba(21, 24, 29, 0.18);
    display: block;
    height: 9rem;
    object-fit: cover;
    width: 9rem;
}

.portrait-badge {
    align-items: center;
    background: var(--accent);
    border: 3px solid #fff;
    border-radius: 999px;
    bottom: 0;
    color: #fff;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    height: 2.7rem;
    justify-content: center;
    position: absolute;
    right: 0;
    width: 2.7rem;
}

.intro-title {
    font-size: clamp(1.7rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.35;
    margin: 1.2rem auto 2.5rem;
    max-width: 50rem;
}

.intro-title strong {
    font-weight: 900;
}

.intro-actions {
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    max-width: 50rem;
}

.pill-button,
.icon-pill {
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 800;
    gap: 0.5rem;
    justify-content: center;
    min-height: 3.25rem;
    outline: none;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.pill-button {
    padding: 0.8rem 1.55rem;
}

.icon-pill {
    background: #fff;
    color: var(--ink);
    min-width: 3.25rem;
    padding: 0 1rem;
}

.dark-pill {
    background: linear-gradient(135deg, #15181d, #1f6f68);
    color: #fff;
}

.dark-pill:hover,
.dark-pill:focus {
    background: #05070a;
    transform: scale(1.08);
}

.dark-pill:hover span,
.dark-pill:focus span {
    transform: translateX(0.25rem);
}

.light-pill {
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
}

[data-theme="dark"] .light-pill,
[data-theme="dark"] .icon-pill {
    background: var(--panel);
    border-color: var(--line);
    color: var(--ink);
}

.light-pill:hover,
.light-pill:focus,
.icon-pill:hover,
.icon-pill:focus {
    background: rgba(219, 215, 251, 0.64);
    transform: scale(1.06);
}

.github-pill {
    font-size: 0.95rem;
}

.pill-button span {
    display: inline-block;
    transition: transform 160ms ease;
}

.light-pill:hover span,
.light-pill:focus span {
    transform: translateY(0.18rem);
}

.reveal-scale {
    animation: reveal-scale 220ms ease-out both;
}

.reveal-up {
    animation: reveal-up 520ms ease-out both;
}

.delay-1 {
    animation-delay: 120ms;
}

.delay-2 {
    animation-delay: 175ms;
}

@keyframes reveal-scale {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

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

@keyframes header-drop {
    from {
        opacity: 0;
        transform: translate(-50%, -100px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes nav-item-drop {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }

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

@keyframes timeline-grow {
    from {
        transform: translateX(-50%) scaleY(0);
    }

    to {
        transform: translateX(-50%) scaleY(1);
    }
}

@keyframes timeline-item-in {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }

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

@media (max-width: 1180px) {
    .academic-timeline {
        max-width: min(860px, 94vw);
    }

    .academic-timeline::before,
    .academic-timeline::after {
        left: 1.5rem;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        grid-template-columns: 3rem minmax(0, 1fr);
        min-height: 72vh;
        padding: 6vh 0;
    }

    .timeline-dot {
        grid-column: 1;
    }

    .timeline-item:nth-child(odd) .timeline-card,
    .timeline-item:nth-child(even) .timeline-card {
        grid-column: 2;
        justify-self: stretch;
        margin-left: 1rem;
        margin-right: 0;
        text-align: left;
        width: min(100%, 28rem);
    }

    .timeline-item:nth-child(odd) .year-projects,
    .timeline-item:nth-child(even) .year-projects {
        grid-column: 2;
        grid-row: auto;
        justify-self: stretch;
        margin-left: 1rem;
        margin-right: 0;
        position: relative;
        top: auto;
    }

    .year-projects-track {
        max-width: 100%;
    }

    .timeline-item:nth-child(even) .year-projects-track {
        flex-direction: row;
    }

    .year-projects {
        width: min(100%, 31rem);
    }

    .year-project-card {
        flex-basis: min(15rem, 38%);
    }

    .year-project-card.is-selected {
        flex-basis: min(27rem, 86%);
    }
}

@media (max-width: 820px) {
    .contact-band {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .intro-actions {
        align-items: stretch;
        flex-direction: column;
        width: min(100%, 24rem);
    }

    .icon-pill {
        width: 100%;
    }

    .academic-timeline::before,
    .academic-timeline::after {
        left: 0.55rem;
    }

    .timeline-item {
        grid-template-columns: 1.2rem minmax(0, 1fr);
        min-height: 62vh;
        padding: 5vh 0;
    }

    .timeline-dot {
        grid-column: 1;
        margin-top: 1.2rem;
    }

    .timeline-item:nth-child(odd) .timeline-card,
    .timeline-item:nth-child(even) .timeline-card {
        grid-column: 2;
        margin-left: 1rem;
        margin-right: 0;
        position: sticky;
        top: 24vh;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .year-projects,
    .timeline-item:nth-child(even) .year-projects {
        grid-column: 2;
        grid-row: auto;
        margin-left: 1rem;
        margin-right: 0;
        position: relative;
        top: auto;
    }

    .year-projects-track {
        max-width: calc(100vw - 5rem);
    }

    .year-project-card {
        display: flex;
        flex-direction: column;
        flex-basis: min(15rem, 56%);
        height: 24rem;
        min-height: 0;
    }

    .year-project-card.is-selected {
        flex-basis: min(22rem, 84%);
        height: auto;
        min-height: 24rem;
    }

    .year-project-copy,
    .year-project-card:nth-child(even) .year-project-copy {
        max-width: 100%;
        min-height: 13rem;
        padding: 1.4rem;
    }

    .year-project-visual,
    .year-project-card:nth-child(even) .year-project-visual {
        bottom: 1rem;
        height: 9.5rem;
        left: 1rem;
        right: 1rem;
        top: auto;
        width: calc(100% - 2rem);
    }

    .timeline-item.is-active .timeline-card {
        transform: scale(1.02);
    }
}

@media (min-width: 640px) {
    .header-glass {
        border-radius: 999px;
        height: 3.25rem;
        top: 1.5rem;
        width: min(36rem, calc(100vw - 2rem));
    }

    .floating-nav {
        height: auto;
        padding: 0;
        top: 1.7rem;
    }

    .floating-nav-list {
        flex-wrap: nowrap;
        gap: 0.85rem;
        width: auto;
    }
}
