/* ---------------------------------------------------------
   Design tokens
--------------------------------------------------------- */
:root {
    --color-bg: #f6f4fb;
    --color-surface: #ffffff;
    --color-primary: #6d28d9;
    --color-primary-dark: #4c1d95;
    --color-primary-light: #a78bfa;
    --color-accent: #ede9fe;
    --color-text: #27272a;
    --color-text-muted: #52525b;

    --font-sans: 'Poppins', system-ui, -apple-system, Segoe UI, Arial, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --space-5: 4rem;

    --shadow-sm: 0 4px 14px rgba(76, 29, 149, 0.08);
    --shadow-md: 0 12px 32px rgba(76, 29, 149, 0.14);

    --max-width: 1100px;
}

/* ---------------------------------------------------------
   Reset & base
--------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.65;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-3);
}

/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */
header {
    position: relative;
    background-image:
        linear-gradient(160deg, rgba(76, 29, 149, 0.88), rgba(109, 40, 217, 0.78)),
        url("../images/Designer (1) bg.jpeg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: white;
    padding: var(--space-5) var(--space-3);
    text-align: center;
}

header h1 {
    font-size: clamp(2.1rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
}

.header-tagline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.25em;
    font-size: clamp(0.95rem, 2.4vw, 1.3rem);
    font-weight: 300;
    opacity: 0.95;
}

.header-tagline span:not(:last-child)::after {
    content: '|';
    margin: 0 0.6em;
    opacity: 0.6;
    font-weight: 300;
}

/* ---------------------------------------------------------
   Navigation
--------------------------------------------------------- */
nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--color-primary-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-list a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: var(--space-2) var(--space-3);
    display: block;
    transition: background 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
    background: var(--color-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    margin: 0 var(--space-2);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

/* ---------------------------------------------------------
   Section basics
--------------------------------------------------------- */
section {
    padding: var(--space-5) var(--space-3);
    max-width: var(--max-width);
    margin: 0 auto;
}

h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: var(--space-4);
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: var(--color-primary-light);
    margin: var(--space-2) auto 0;
    border-radius: 10px;
}

/* ---------------------------------------------------------
   About / home
--------------------------------------------------------- */
#about {
    text-align: center;
}

.about-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    text-align: left;
}

.about-photo img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    object-position: 50% 18%;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    border: 6px solid var(--color-surface);
}

.about-text {
    max-width: 560px;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.about-text .lead {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: var(--space-2);
}

.cv-download {
    margin-top: var(--space-4);
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------
   Cards (research / music items)
--------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    color: var(--color-primary-dark);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.card img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto var(--space-3);
    box-shadow: var(--shadow-sm);
}

.card p {
    color: var(--color-text-muted);
}

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

.card-wide .card-body {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: flex-start;
}

.card-wide .card-text {
    flex: 1 1 320px;
    color: var(--color-text-muted);
}

.card-wide .card-image {
    flex: 1 1 280px;
}

.card-wide .card-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------
   Media / gallery
--------------------------------------------------------- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
    align-items: start;
}

.media-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-3);
}

.media-card h3 {
    color: var(--color-primary-dark);
    margin-bottom: var(--space-2);
    text-align: center;
}

.media-card img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.media-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #000;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-3);
    align-items: center;
}

.media-card--wide {
    grid-column: 1 / -1;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-2);
}

.photo-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

[data-lightbox] {
    cursor: zoom-in;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.lab-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-align: center;
}

.spotify-embed {
    display: flex;
    justify-content: center;
}

.spotify-embed iframe {
    width: 100%;
    border-radius: var(--radius-md);
}

/* ---------------------------------------------------------
   Contact
--------------------------------------------------------- */
.contact-intro {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 460px;
    margin: 0 auto var(--space-4);
}

.contact-primary {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.contact-primary a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.9rem 2rem;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-primary a:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.contact-primary img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

.contact-icon-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    max-width: 480px;
    margin: 0 auto;
}

.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 84px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.icon-link .icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-link:hover .icon-circle {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.icon-link img {
    width: 26px;
    height: 26px;
}

/* ---------------------------------------------------------
   Lightbox
--------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(24, 12, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
    z-index: 100;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: min(90vw, 900px);
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.lightbox-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

body.no-scroll {
    overflow: hidden;
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
footer {
    background-color: var(--color-primary-dark);
    color: white;
    text-align: center;
    padding: var(--space-4) var(--space-3);
    margin-top: var(--space-5);
}

footer p::before {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--color-primary-light);
    margin: 0 auto var(--space-2);
    border-radius: 10px;
}

.back-to-top {
    display: inline-block;
    color: white;
    text-decoration: none;
    background-color: var(--color-primary);
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-top: var(--space-2);
    font-weight: 600;
}

.back-to-top:hover {
    background-color: var(--color-primary-light);
}

/* ---------------------------------------------------------
   Focus visibility (keyboard navigation)
--------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
[data-lightbox]:focus-visible {
    outline: 3px solid var(--color-primary-dark);
    outline-offset: 2px;
}

.nav-list a:focus-visible,
.nav-toggle:focus-visible,
.back-to-top:focus-visible,
.lightbox-close:focus-visible {
    outline-color: #ffffff;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 720px) {
    .nav-toggle {
        display: flex;
    }

    .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
    }

    .nav-list.is-open {
        display: flex;
    }

    nav {
        flex-wrap: wrap;
    }

    .header-tagline {
        flex-direction: column;
        align-items: center;
        row-gap: 0.2em;
    }

    .header-tagline span::after {
        content: none;
    }
}

/* ---------------------------------------------------------
   Animations
--------------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

section {
    animation: fadeInUp 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {

    html,
    section {
        scroll-behavior: auto;
        animation: none;
    }
}
