/* =========================================================
   Aditya Kulkarni — portfolio styles
   Plain CSS, no build step. Colours live in the tokens below;
   change them once and the whole site follows.
   ========================================================= */

:root {
    --paper: #FBFAFE;
    --surface: #FFFFFF;
    --tint: #F3F0FC;
    --ink: #1C1638;
    --muted: #5F5A73;
    --line: #E4DFF2;
    --accent: #5B3FD6;
    --accent-hover: #4A2FC0;
    --accent-ink: #FFFFFF;
    --accent-soft: #ECE7FD;
    --gold: #9A6B00;
    --gold-soft: #FBF1D6;
    --footer-bg: #1C1638;
    --footer-ink: #EEEBF8;

    --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

    --wrap: 1320px;
    --gutter: clamp(1rem, 4vw, 2rem);
    --radius-s: 8px;
    --radius-m: 14px;
    --radius-l: 22px;
    --header-h: 64px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0F0B1E;
        --surface: #181330;
        --tint: #140F29;
        --ink: #EEEBF8;
        --muted: #A9A3C2;
        --line: #2C2550;
        --accent: #A996FF;
        --accent-hover: #BFB0FF;
        --accent-ink: #140E2C;
        --accent-soft: #241C48;
        --gold: #F0C45C;
        --gold-soft: #2E2410;
        --footer-bg: #0A0716;
        --footer-ink: #EEEBF8;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --paper: #0F0B1E;
    --surface: #181330;
    --tint: #140F29;
    --ink: #EEEBF8;
    --muted: #A9A3C2;
    --line: #2C2550;
    --accent: #A996FF;
    --accent-hover: #BFB0FF;
    --accent-ink: #140E2C;
    --accent-soft: #241C48;
    --gold: #F0C45C;
    --gold-soft: #2E2410;
    --footer-bg: #0A0716;
    --footer-ink: #EEEBF8;
    color-scheme: dark;
}

/* ---------- Base ---------- */
[hidden] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

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

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0;
}

button {
    font: inherit;
    color: inherit;
}

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

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    background: var(--accent);
    color: var(--accent-ink);
    padding: .6rem 1rem;
    border-radius: var(--radius-s);
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    padding: .6rem 1.1rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: border-color .2s, background-color .2s, color .2s;
}

.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--accent-ink);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .2s, color .2s;
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-row {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
}

.brand:hover {
    color: var(--ink);
}

.brand-mark {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: .95rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    white-space: nowrap;
}

.brand-role {
    font-size: .78rem;
    color: var(--muted);
    white-space: nowrap;
}

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

.nav a {
    padding: .45rem .7rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 500;
    font-size: .92rem;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}

.nav a:hover,
.nav a.is-current {
    color: var(--ink);
    background: var(--accent-soft);
}

.nav a.nav-cta {
    background: var(--accent);
    color: var(--accent-ink);
    margin-left: .35rem;
}

.nav a.nav-cta:hover {
    background: var(--accent-hover);
}

.header-actions {
    display: flex;
    gap: .5rem;
}

.menu-btn {
    display: none;
}

@media (max-width: 960px) {
    .menu-btn {
        display: inline-grid;
    }

    .nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
        padding: .75rem var(--gutter) 1.25rem;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px -18px rgba(28, 22, 56, .35);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s, transform .2s, visibility .2s;
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
    }

    .nav.is-open {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav a {
        padding: .85rem 1rem;
        font-size: 1.05rem;
        border-radius: var(--radius-s);
    }

    .nav a.nav-cta {
        margin: .5rem 0 0;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .brand-role {
        display: none;
    }
}

/* ---------- Hero ---------- */
.hero {
    padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 2vw, 1.5rem);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.hero-name {
    font-size: clamp(3.2rem, 10.5vw, 7.75rem);
    font-weight: 800;
    line-height: .92;
    letter-spacing: -0.035em;
    font-variation-settings: "opsz" 96;
}

.hero-role {
    margin: 1.4rem 0 0;
    font-weight: 600;
    color: var(--accent);
    max-width: 40ch;
}

.hero-lede {
    margin: 1rem 0 0;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: var(--muted);
    max-width: 52ch;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.8rem;
}

/* Portrait: an offset outline frame is the one decorative move on the page */
.hero-photo {
    position: relative;
    margin: 0;
    justify-self: end;
    width: min(100%, 380px);
    isolation: isolate;
}

.hero-photo::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 2px solid var(--accent);
    border-radius: var(--radius-l);
    background: linear-gradient(135deg,
            var(--accent) 0%,
            color-mix(in srgb, var(--accent) 45%, transparent) 60%,
            color-mix(in srgb, var(--accent) 15%, transparent) 100%);
}

/* soft glow around everything */
.hero-photo::after {
    content: "";
    position: absolute;
    inset: -8%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
    filter: blur(24px);
}

.hero-photo img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 20%;
    border-radius: var(--radius-l);
    border: 5px solid var(--surface);  /* thin white mat, like a print */
    background: var(--accent-soft);
    box-shadow:
        0 1px 2px rgba(28, 22, 56, .08),
        0 12px 24px -8px rgba(28, 22, 56, .22),
        0 32px 60px -24px rgba(91, 63, 214, .45);
    transition: transform .4s ease, box-shadow .4s ease;
}

/* small lift on hover (laptop only) */
@media (hover: hover) {
    .hero-photo:hover img {
        transform: translate(-4px, -4px);
        box-shadow:
            0 1px 2px rgba(28, 22, 56, .08),
            0 18px 32px -8px rgba(28, 22, 56, .25),
            0 40px 70px -24px rgba(91, 63, 214, .55);
    }
}

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

    .hero-photo {
        order: -1;
        justify-self: start;
        width: min(62%, 240px);
    }

    .hero-photo::before {
        inset: 12px -12px -12px 12px;
    }
}

/* ---------- Sections ---------- */
.section {
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section-tint {
    background: var(--tint);
    border-block: 1px solid var(--line);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

#about {
    padding-top: clamp(1rem, 2.5vw, 2rem);
}

.section-intro {
    margin: .6rem 0 0;
    color: var(--muted);
    max-width: 60ch;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.about-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.about-wide {
    grid-column: 1 / -1;
}

.about-block h3 {
    font-size: 1.15rem;
    margin-bottom: .8rem;
}

.about-block p {
    margin: 0;
    max-width: 75ch;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: .75rem;
    padding: .45rem 0 .45rem 1.1rem;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1.5rem;
    bottom: -.5rem;
    width: 1px;
    background: var(--line);
}

.tl-when {
    color: var(--muted);
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}

.plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .9rem;
}

.plain-list li {
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
    border-left: 3px solid var(--gold);
}

.plain-list span {
    color: var(--muted);
    font-size: .92rem;
}

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

@media (max-width: 420px) {
    .timeline li {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ---------- Tools & datasets ---------- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tool {
    display: flex;
    gap: 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 1.35rem;
    transition: border-color .2s;
}

.tool:hover {
    border-color: var(--accent);
}

.tool-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.35rem;
    overflow: hidden;
}

.tool-icon-img {
    background: #fff;
}

.tool-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tool h3 {
    font-size: 1.12rem;
}

.tool p {
    margin: .35rem 0 .8rem;
    color: var(--muted);
}

.tool-link {
    font-weight: 600;
    text-decoration: none;
}

.tool-link:hover {
    text-decoration: underline;
}

/* ---------- Publications ---------- */
.year-filter {
    margin-top: 1.75rem;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.chip {
    min-height: 40px;
    min-width: 64px;
    padding: .35rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: all .15s;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.pub-block {
    margin-top: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: clamp(1.1rem, 3vw, 1.75rem);
}

.pub-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.pub-block-head h3 {
    font-size: 1.3rem;
}

.pub-count {
    flex: none;
    font-weight: 700;
    font-size: .85rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
}

.pub-empty {
    margin: 1.5rem 0 0;
    color: var(--muted);
}

.pub-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.pub {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.pub-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px;
}

.pub-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.08rem;
    line-height: 1.35;
    color: var(--ink);
    text-decoration: none;
}

.pub-title:hover {
    color: var(--accent);
    text-decoration: underline;
}

.pub-authors,
.pub-venue {
    margin: .3rem 0 0;
    font-size: .92rem;
    color: var(--muted);
}

.pub-authors b {
    color: var(--ink);
    font-weight: 600;
}

.pub-venue a {
    color: inherit;
    font-style: italic;
}

.pub-venue a:hover {
    color: var(--accent);
}

.pub-tag {
    font-size: .78rem;
    font-weight: 600;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    white-space: nowrap;
}

.pub-tag-award {
    background: var(--gold-soft);
    color: var(--gold);
}

@media (max-width: 700px) {
    .pub {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .pub-logo {
        width: 44px;
        height: 44px;
    }

    .pub-tag {
        grid-column: 2;
        justify-self: start;
        margin-top: -.4rem;
    }
}

/* ---------- Milestones ---------- */
.milestones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.milestone {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
}

.milestone .zoomable img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.milestone figcaption {
    display: flex;
    flex-direction: column;
    padding: .9rem 1.1rem 1.1rem;
    align-items: center;
    text-align: center;
}

.milestone figcaption span {
    color: var(--muted);
    font-size: .9rem;
}

/* shared: image buttons that open the lightbox */
.zoomable {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    overflow: hidden;
}

.zoomable img {
    transition: transform .4s ease;
}

.zoomable:hover img {
    transform: scale(1.03);
}

/* ---------- Teaching ---------- */
.ta-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    margin: 1.5rem 0 0;
}

.ta-stats div {
    display: flex;
    flex-direction: column-reverse;
}

.ta-stats dt {
    color: var(--muted);
    font-size: .88rem;
}

.ta-stats dd {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.2;
}

.ta-group {
    margin-top: 2.25rem;
}

.ta-group-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.15rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--ink);
}

.ta-group-title i {
    color: var(--accent);
    font-size: 1rem;
}

.ta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem 1.5rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.ta-name {
    margin: 0;
    font-weight: 600;
    font-size: 1.02rem;
}

.ta-code {
    display: inline-block;
    margin-right: .6rem;
    padding: .05rem .5rem;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .8rem;
    font-weight: 700;
    vertical-align: .1em;
}

.ta-meta {
    margin: .2rem 0 0;
    color: var(--muted);
    font-size: .9rem;
}

.ta-terms {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
}

.ta-terms li {
    padding: .2rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: .84rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .ta-row {
        grid-template-columns: 1fr;
    }

    .ta-terms {
        justify-content: flex-start;
    }
}

/* ---------- Beyond research ---------- */
.interests {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.interests li {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--ink);
    font-weight: 600;
}

.interests i {
    color: var(--accent);
}

.sub-title {
    margin-top: 2.5rem;
    font-size: 1.35rem;
}

.sketch-empty {
    margin: 1rem 0 0;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--muted);
    border: 2px dashed var(--line);
    border-radius: var(--radius-m);
}

/* ---------- Sketchbook: one compact scrolling row of thumbnails ---------- */
.sketch-strip {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
}

.sketch-grid {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: .85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: .25rem .1rem .75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

.sketch {
    flex: 0 0 150px;
    margin: 0;
    scroll-snap-align: start;
}

.sketch .zoomable {
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    background: #fff;
}

.sketch img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.sketch figcaption {
    padding-top: .45rem;
    font-size: .85rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-items: center;
    text-align: center;
}

.strip-btn {
    flex: none;
    width: 38px;
    height: 38px;
    margin-bottom: 1.6rem;
}

/* phones and tablets: swipe instead of arrows, slightly smaller thumbnails */
@media (hover: none), (max-width: 640px) {
    .strip-btn {
        display: none;
    }

    .sketch {
        flex-basis: 120px;
    }
}

/* ---------- Gallery carousel ---------- */
.carousel {
    margin-top: 2rem;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: var(--radius-m);
    touch-action: pan-y;          /* vertical page scroll still works on phones */
    cursor: grab;
}

.carousel-viewport.is-dragging {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    will-change: transform;
}

.carousel-track.is-animating {
    transition: transform .65s cubic-bezier(.22, .61, .36, 1);
}

.slide {
    flex: 0 0 100%;
    margin: 0;
    opacity: .45;
    transition: opacity .5s;
    user-select: none;
    -webkit-user-select: none;
}

.slide.is-current {
    opacity: 1;
}

.slide img {
    -webkit-user-drag: none;
    pointer-events: none;
}

/* on wide screens the neighbours peek in on both sides */
@media (min-width: 900px) {
    .slide {
        flex-basis: 60%;
    }
}

.slide-frame {
    aspect-ratio: 2 / 1;
    border-radius: var(--radius-m);
    background: var(--surface);
    border: 1px solid var(--line);
}

/* contain = whole photo always visible, whatever the screen shape */
.slide-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* caption sits below the photo, never on top of it */
.slide figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    text-align: center;
    gap: .25rem .6rem;
    padding: .8rem .25rem 0;
}

.slide figcaption span {
    color: var(--muted);
    font-size: .92rem;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.carousel-dots {
    display: flex;
    gap: .15rem;
}

.carousel-dots button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.carousel-dots button::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--line);
    transition: width .25s, background-color .25s;
}

.carousel-dots button[aria-selected="true"]::before {
    width: 22px;
    background: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding-block: clamp(3rem, 7vw, 4.5rem) 2rem;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.footer-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.footer-text {
    margin: .6rem 0 1.4rem;
    color: color-mix(in srgb, var(--footer-ink) 70%, transparent);
    max-width: 48ch;
}

.site-footer .btn-primary {
    background: #A996FF;
    border-color: #A996FF;
    color: #140E2C;
    word-break: break-all;
}

.site-footer .btn-primary:hover {
    background: #BFB0FF;
    border-color: #BFB0FF;
}

.footer-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.social {
    display: flex;
    gap: .6rem;
}

.social a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    color: var(--footer-ink);
    font-size: 1.1rem;
    transition: background-color .2s, border-color .2s;
}

.social a:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .4);
    color: #fff;
}

.footer-small {
    margin: 0;
    font-size: .85rem;
    color: color-mix(in srgb, var(--footer-ink) 55%, transparent);
}

@media (max-width: 640px) {
    .footer-side {
        align-items: flex-start;
    }
}

/* ---------- Back to top ---------- */
.to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 40;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: var(--accent);
    color: var(--accent-ink);
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(91, 63, 214, .55);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .25s, transform .25s;
}

.to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* ---------- Lightbox ---------- */
.lightbox {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 7, 22, .94);
    color: #fff;
}

.lightbox::backdrop {
    background: rgba(10, 7, 22, .6);
}

.lightbox[open] {
    display: grid;
    place-items: center;
}

.lightbox-figure {
    margin: 0;
    padding: 4.5rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .9rem;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-figure img {
    max-width: min(92vw, 1400px);
    max-height: calc(100dvh - 9rem);
    object-fit: contain;
    border-radius: var(--radius-s);
}

.lightbox-figure figcaption {
    text-align: center;
    font-size: .95rem;
    color: #D8D2F0;
}

.lb-btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
}

.lb-btn:hover {
    background: rgba(255, 255, 255, .2);
}

.lb-close {
    top: 1rem;
    right: 1rem;
}

.lb-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lb-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 640px) {

    .lb-prev,
    .lb-next {
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .lightbox-figure {
        padding-bottom: 5rem;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

}

/* ---------- Print (for a quick CV-style printout) ---------- */
@media print {

    .site-header,
    .to-top,
    .carousel-controls,
    .year-filter,
    #gallery,
    #sketchbook,
    .lightbox {
        display: none !important;
    }

    .section-tint {
        background: none;
    }
}


.tl-what a,
.about-block p a.inst {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 3px;
}

.tl-what a:hover,
.about-block p a.inst:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.tl-sub {
    display: block;
    font-size: .88rem;
    color: var(--muted);
}

.about-closing {
    margin-top: .9rem !important;
    color: var(--muted);
}

.about-wide p {
    max-width: none;
    text-align: justify;
    hyphens: auto;
}