/* ============================================================
   SECTIONS — Original look/feel on the new structure.
   Bigger type, gradient hero name, colorful surfaces,
   generous spacing. Structure: natural scroll, rails, timeline.
   ============================================================ */

/* ================= HERO ================= */
.hero {
    padding-top: 200px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(48px, 8vw, 100px);
    align-items: center;
}

.hero-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.hero-name {
    background: linear-gradient(135deg, var(--ink), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-role {
    font-size: 1.28rem;
    font-weight: 560;
    color: var(--ink-soft);
    letter-spacing: -0.008em;
}

.hero-bio {
    font-size: 1.06rem;
    max-width: 54ch;
}

.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.hero-socials {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.hero-socials a {
    width: 46px;
    height: 46px;
    border-radius: var(--r-full);
    border: 1px solid var(--line-strong);
    color: var(--ink-faint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    text-decoration: none;
    transition: all var(--dur-1) var(--ease);
}

.hero-socials a:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
    transform: translateY(-3px);
}

/* Portrait — squarish soft-rounded, gentle float */
.hero-portrait-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
}

.hero-portrait {
    width: min(320px, 72vw);
    height: min(320px, 72vw);
    flex: 0 0 auto;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 36%;
    display: block;
    background: #1b1724;
    box-shadow: 0 24px 80px rgba(103, 80, 164, 0.28);
    animation: float 7s ease-in-out infinite;
}

[data-theme="dark"] .hero-portrait {
    box-shadow: 0 0 0 3px rgba(208, 188, 255, 0.45), 0 24px 80px rgba(0, 0, 0, 0.55);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-portrait { animation: none; }
}

/* Status line */
.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 22px;
    margin-top: 12px;
    border-top: 1px solid var(--line);
}

.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: var(--r-full);
    background: #4E9A51;
    box-shadow: 0 0 0 4px rgba(78, 154, 81, 0.18);
    flex: 0 0 auto;
}

/* ================= ABOUT ================= */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    align-items: start;
}

.about-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 40px;
}

.about-side {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.focus-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.focus-list li {
    list-style: none;
    padding: 14px 18px;
    background: var(--bg-inset);
    border-radius: var(--r-md);
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.focus-list strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}


/* Signals belong below the two About cards, as one wide readable strip. */
@media (min-width: 901px) {
    .about-grid {
        grid-template-areas:
            "about focus"
            "signals signals";
    }

    .about-grid > .about-card { grid-area: about; }
    .about-side { display: contents; }
    .about-side > :first-child { grid-area: focus; }
    .about-side > :last-child {
        grid-area: signals;
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
    .about-side > :last-child .h3 { flex: 0 0 140px; }
    .about-side > :last-child .tag-row { flex: 1; }
}

/* ================= WORK ================= */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 52px;
}

.rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    border-top: 1px solid var(--line);
    padding-top: 30px;
}

.rail-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.rail-nav {
    display: flex;
    gap: 10px;
}

.rail-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--r-full);
    border: 1px solid var(--line-strong);
    background: var(--bg-raised);
    color: var(--ink-faint);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--elev-1);
    transition: all var(--dur-1) var(--ease);
}

.rail-btn:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
    transform: translateY(-2px);
}

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(320px, 360px);
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    padding: 8px 4px 20px;
    margin: 0 -4px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: var(--r-full);
}

.rail-item {
    scroll-snap-align: start;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--elev-1);
    transition: transform var(--dur-2) var(--ease),
                box-shadow var(--dur-2) var(--ease),
                border-color var(--dur-2) var(--ease-soft);
}

.rail-item:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--elev-2);
}

.rail-item .row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.rail-item .name {
    font-weight: 700;
    font-size: 1.12rem;
    letter-spacing: -0.01em;
}

.rail-item .arrow {
    color: var(--ink-faint);
    font-size: 0.85rem;
    transition: transform var(--dur-1) var(--ease), color var(--dur-1) var(--ease-soft);
}

.rail-item:hover .arrow {
    transform: translate(3px, -3px);
    color: var(--accent);
}

.rail-item .desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--ink-soft);
    flex: 1;
}

.updates-rail {
    grid-auto-columns: minmax(340px, 400px);
}

.update-rail-item {
    min-height: 280px;
}

.update-rail-item .u-date {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.update-rail-item .name {
    font-size: 1.12rem;
}

/* ================= GALLERY ================= */
.gallery-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 32px 56px;
    margin-bottom: clamp(28px, 4vw, 44px);
}

.gallery-section-head > div {
    max-width: 760px;
}

.gallery-section-head .btn {
    margin-bottom: 4px;
}

.gallery-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 8% 0%, rgba(103, 80, 164, 0.12), transparent 34%),
        radial-gradient(circle at 96% 100%, rgba(50, 180, 255, 0.09), transparent 34%),
        var(--bg-raised);
    box-shadow: var(--elev-2);
    padding: 24px 0 28px;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 clamp(24px, 3vw, 36px) 20px;
    color: var(--ink-faint);
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.gallery-toolbar > span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.gallery-viewport {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
    cursor: grab;
    padding: 4px clamp(24px, 3vw, 36px) 14px;
}

.gallery-viewport:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: -3px;
}

.gallery-viewport.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.gallery-viewport::-webkit-scrollbar { height: 7px; }
.gallery-viewport::-webkit-scrollbar-track { background: transparent; }
.gallery-viewport::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: var(--r-full);
}

.gallery-row {
    width: max-content;
    display: flex;
    align-items: stretch;
    gap: clamp(20px, 2.4vw, 30px);
}

.gallery-card {
    appearance: none;
    --gallery-card-width: clamp(340px, 38vw, 470px);
    width: var(--gallery-card-width);
    flex: 0 0 var(--gallery-card-width);
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: zoom-in;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg-raised);
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 460px 460px;
    box-shadow: 0 2px 7px rgba(28, 27, 31, 0.09);
    transition: transform var(--dur-2) var(--ease),
                box-shadow var(--dur-2) var(--ease),
                border-color var(--dur-2) var(--ease-soft);
}

.gallery-card.portrait { --gallery-card-width: clamp(310px, 32vw, 390px); }
.gallery-card.landscape { --gallery-card-width: clamp(380px, 42vw, 520px); }
.gallery-card.wide { --gallery-card-width: clamp(430px, 48vw, 590px); }
.gallery-card.square { --gallery-card-width: clamp(340px, 36vw, 430px); }
.gallery-card.screen { --gallery-card-width: clamp(310px, 32vw, 390px); }

.gallery-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: var(--elev-2);
}

.gallery-photo-wrap {
    position: relative;
    height: clamp(280px, 32vw, 390px);
    overflow: hidden;
    background: var(--bg-raised);
}

.gallery-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 300ms var(--ease);
}

.gallery-card:hover .gallery-photo {
    transform: scale(1.025);
}

.gallery-expand {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--r-full);
    color: #fff;
    background: rgba(20, 18, 24, 0.68);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

.gallery-card:hover .gallery-expand,
.gallery-card:focus-visible .gallery-expand {
    opacity: 1;
    transform: none;
}

.gallery-card.contain .gallery-photo {
    object-fit: contain;
    padding: 8px;
    background:
        linear-gradient(135deg, rgba(103, 80, 164, 0.08), rgba(50, 180, 255, 0.06)),
        var(--bg-raised);
}

.gallery-caption {
    height: 72px;
    display: -webkit-box;
    padding: 16px 19px 17px;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 580;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body.lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 36px);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease), visibility 220ms;
}

.gallery-lightbox.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(10, 9, 13, 0.88);
    cursor: zoom-out;
}

.lightbox-panel {
    position: relative;
    width: min(1180px, 96vw);
    height: min(900px, 92dvh);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    padding: 14px 18px 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    color: #fff;
    background: rgba(24, 22, 29, 0.96);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.lightbox-topbar {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
}

.lightbox-count,
.lightbox-hint {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-nav {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--r-full);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.04);
}

.lightbox-stage {
    min-height: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 2vw, 26px);
}

.lightbox-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    object-fit: contain;
    border-radius: 16px;
}

.lightbox-caption {
    max-width: 760px;
    margin: 0 auto;
    padding: 2px 12px 0;
    text-align: center;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    font-weight: 560;
    line-height: 1.45;
}

.lightbox-hint {
    margin: 0;
    text-align: center;
}

/* ================= LABS ================= */
.labs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.lab-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lab-head {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lab-head .h3 { flex: 1; }

/* ================= RESEARCH ================= */
.research-feature {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 44px;
}

.research-feature .mono { color: var(--ink-faint); }

.pub-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--elev-1);
}

.pub-item {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 20px;
    align-items: baseline;
    padding: 20px 24px;
    border-top: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background var(--dur-1) var(--ease-soft);
}

.pub-item:first-child { border-top: none; }

.pub-item:hover { background: var(--bg-inset); }

.pub-item .pub-title {
    font-weight: 640;
    font-size: 1.02rem;
    line-height: 1.5;
}

.pub-item .pub-sub {
    display: block;
    font-size: 0.85rem;
    color: var(--ink-faint);
    margin-top: 3px;
    font-weight: 450;
}

.pub-item .arrow { color: var(--ink-faint); font-size: 0.85rem; }
.pub-item:hover .arrow { color: var(--accent); }

/* ================= BLOGS — informal, image-led ================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--bg-raised);
    border: 1px solid transparent;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--elev-1);
    transition: transform var(--dur-2) var(--ease),
                box-shadow var(--dur-2) var(--ease);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--elev-2);
}

.blog-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-inset);
}

.blog-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 26px 28px;
}

.blog-body .u-date {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.blog-body .h3 {
    font-size: 1.22rem;
    line-height: 1.3;
}

.blog-body p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--ink-soft);
    flex: 1;
}

.blog-more {
    font-size: 0.88rem;
    font-weight: 620;
    color: var(--accent);
    margin-top: 4px;
}

.blog-more i {
    font-size: 0.75em;
    margin-left: 6px;
}

/* ================= CREATIVE ================= */
.creative-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.creative-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.spotify-frame {
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--elev-1);
}

.spotify-frame iframe {
    display: block;
    width: 100%;
    border: none;
}

.video-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--elev-1);
    transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--elev-3);
}

.video-thumb {
    min-height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.video-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 16, 32, 0.12) 0%, rgba(20, 16, 32, 0.8) 100%);
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    color: #fff;
}

.video-overlay .play {
    width: 52px;
    height: 52px;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.94);
    color: #241d3a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-right: 16px;
    flex: 0 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.video-overlay strong { font-size: 1.05rem; display: block; }
.video-overlay span { font-size: 0.85rem; opacity: 0.88; }

.creative-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 44px;
    flex-wrap: wrap;
}

.btn-spotify { background: #1DB954; color: #fff; }
.btn-youtube { background: #FF0000; color: #fff; }

/* ================= CONNECT — original colored-icon cards ================= */
.connect-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.connect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 34px 24px;
    text-decoration: none;
    color: inherit;
    background: var(--bg-raised);
    border: 1px solid transparent;
    border-radius: var(--r-lg);
    box-shadow: var(--elev-1);
    transition: transform var(--dur-2) var(--ease),
                box-shadow var(--dur-2) var(--ease),
                border-color var(--dur-2) var(--ease);
}

.connect-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-soft);
    box-shadow: var(--elev-2);
}

.connect-card .c-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-inset);
}

.connect-card .c-icon > i {
    font-size: 26px;
}

.connect-card .c-icon .i8 {
    width: 36px;
    height: 36px;
}

.connect-card .c-name {
    font-weight: 700;
    font-size: 1.05rem;
}

.connect-card .c-handle {
    font-size: 0.84rem;
    color: var(--ink-faint);
    word-break: break-all;
}

.connect-card.primary {
    background: var(--accent-soft);
}

.connect-card.primary .c-handle { color: var(--accent-ink); }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .hero-portrait-wrap { order: -1; justify-content: flex-start; }
    .hero-portrait {
        width: min(220px, 62vw);
        height: min(220px, 62vw);
    }

    .about-grid,
    .work-grid,
    .labs-grid,
    .creative-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .connect-grid { grid-template-columns: repeat(2, 1fr); }

    .pub-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .gallery-section-head {
        align-items: flex-start;
        flex-direction: column;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .connect-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 48px; }
    .hero-ctas .btn { width: 100%; justify-content: center; }
    .rail { grid-auto-columns: minmax(270px, 84vw); }
    .about-card { padding: 28px; }
    .gallery-section-head .btn { width: 100%; justify-content: center; }
    .gallery-shell { border-radius: 24px; }
    .gallery-toolbar { padding-inline: 16px; }
    .gallery-toolbar > span { display: none; }
    .gallery-toolbar { justify-content: flex-end; }
    .gallery-viewport { padding-inline: 16px; }
    .gallery-photo-wrap { height: min(78vw, 330px); }
    .gallery-card,
    .gallery-card.portrait,
    .gallery-card.landscape,
    .gallery-card.wide,
    .gallery-card.square,
    .gallery-card.screen { --gallery-card-width: min(82vw, 360px); }
    .gallery-expand { opacity: 1; transform: none; }
    .gallery-lightbox { padding: 8px; }
    .lightbox-panel { width: 100%; height: 96dvh; padding: 10px; border-radius: 22px; }
    .lightbox-stage { grid-template-columns: 1fr; }
    .lightbox-nav { position: absolute; top: 50%; z-index: 1; background: rgba(20, 18, 24, 0.72); }
    .lightbox-prev { left: 16px; }
    .lightbox-next { right: 16px; }
    .lightbox-hint { display: none; }
}
