/* ═══════════════════════════════════════════════════
   PALETTE
   Dark bg   : #000000
   Light bg  : #ffffff  (warm blush pink)
   Lavender  : #b0a8e0  (text on dark)
   White     : #f0eeff  (body on dark)
   Black     : #1a1a1a  (text on light)
   Blue glow : for video effect
═══════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* ── Base body ── */
body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ── Theme classes on body ── */
body.dark-theme {
    background-color: #000000;
    color: #e8e4f8;
}

body.light-theme {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* ═══════════════════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════════════════ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 40px;
    transition: background-color 0.4s ease;
}

body.dark-theme header {
    background-color: transparent;
}

body.light-theme header {
    background-color: #ffffff;
}

body.paint-tab header {
    background-color: #ffffff;
}

body.paint-tab nav a {
    color: #b0a8e0;
}

body.paint-tab nav a.active,
body.paint-tab nav a:hover {
    color: #7b6fcf;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 48px;
}

nav a {
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    position: relative;
    transition: font-weight 0.15s ease, color 0.2s ease;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -3px;
    width: 0; height: 1.5px;
    background: currentColor;
    transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

body.dark-theme nav a {
    color: #b0a8e0;
}

body.light-theme nav a {
    color: #1a1a1a;
}

nav a.active,
nav a:hover {
    font-weight: 700;
}

body.dark-theme nav a.active,
body.dark-theme nav a:hover {
    color: #e8e4f8;
}

body.light-theme nav a.active,
body.light-theme nav a:hover {
    color: #000000;
}

/* ── Hamburger (mobile) ── */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 200;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    height: 36px;
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    margin: 6px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

body.dark-theme .bar { background: #b0a8e0; }
body.light-theme .bar { background: #1a1a1a; }

.menu-toggle.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(2) { opacity: 0; }
.menu-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════
   SECTIONS — shared
═══════════════════════════════════════════════════ */
.tab-content {
    display: none;
    min-height: 100vh;
    padding-top: 40px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.tab-content.active {
    display: block;
}

.tab-content.tab-visible {
    opacity: 1;
}

/* ── Scroll-reveal base ──────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-48px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(48px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
    opacity: 1;
    transform: none;
}

.dark-section {
    background-color: #000000;
    color: #e8e4f8;
}

.light-section {
    background-color: #ffffff;
    color: #1a1a1a;
}

#paint {
    background-color: #ffffff;
}

.light-section-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 64px 80px 0;
}

/* ═══════════════════════════════════════════════════
   HOME
   Adjust video size here ↓  (e.g. 50vh, 70vh, 90vh)
═══════════════════════════════════════════════════ */
:root {
    --home-video-height: 60vh;
}

#home {
    padding-top: 0;
    overflow: visible;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    min-height: 100vh;
    align-items: center;
}

/* Left column — big title */
.home-title-col {
    display: flex;
    align-items: flex-end;
    padding: 64px 24px 80px 48px;
    min-height: 100vh;
}

.home-heading {
    font-size: clamp(4rem, 8vw, 7.5rem);
    font-weight: 700;
    line-height: 0.95;
    color: #b0a8e0;
    letter-spacing: -0.02em;
}

/* Center column — video */
.home-video-col {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    /* Extra bottom padding pulls the centered video up toward the menu */
    padding: 40px 0 100px;
    box-sizing: border-box;
    overflow: visible;
    z-index: 1;
}

.home-video-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.home-video {
    width: auto;
    height: var(--home-video-height);
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: none;
}

/* Right column — bio */
.home-bio-col {
    display: flex;
    align-items: center;
    padding: 64px 48px 64px 32px;
    min-height: 100vh;
}

.home-bio-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #d8d0f8;
}

.home-bio-text strong {
    font-weight: 700;
    color: #b0a8e0;
}

/* ═══════════════════════════════════════════════════
   ABOUT ME
═══════════════════════════════════════════════════ */
#about {
    padding-top: 48px;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 72px;
    align-items: start;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 80px 80px;
    min-height: calc(100vh - 80px);
}

.about-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8e4f8;
    margin-bottom: 28px;
}

.about-text-col p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: #c8c0e8;
    margin-bottom: 20px;
    text-align: justify;
    max-width: 680px;
}

.about-contact-links {
    display: flex;
    gap: 20px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.about-contact-links a {
    text-decoration: none;
    color: #b0a8e0;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    border-bottom: 1px solid rgba(176, 168, 224, 0.3);
    padding-bottom: 2px;
}

.about-contact-links a:hover {
    color: #e8e4f8;
    border-bottom-color: #e8e4f8;
}

/* Portrait image */
.about-portrait-col {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
}

.about-portrait-caption {
    margin-top: 18px;
    font-size: 0.72rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
    max-width: 560px;
    font-style: italic;
    font-family: 'Space Mono', monospace;
    padding-left: 14px;
    border-left: 2px solid rgba(176, 168, 224, 0.35);
    letter-spacing: 0.01em;
}

.about-profile-img {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    border-radius: 2px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}

#ascii-canvas {
    max-width: 100%;
    image-rendering: pixelated;
}

/* ═══════════════════════════════════════════════════
   PILL LABELS
═══════════════════════════════════════════════════ */
.pill-label-wrap {
    margin-bottom: 48px;
}

.pill-label-wrap.left  { text-align: left; }
.pill-label-wrap.center { text-align: center; }
.pill-label-wrap.right { text-align: right; }

.pill-label {
    display: inline-block;
    border: 1.5px solid #1a1a1a;
    border-radius: 100px;
    padding: 10px 32px;
    font-size: 1.1rem;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: 0.01em;
    font-family: 'Space Grotesk', sans-serif;
}

/* ═══════════════════════════════════════════════════
   ALTERNATING PAINTINGS GALLERY
═══════════════════════════════════════════════════ */
.alternating-gallery {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.painting-row {
    display: flex;
    align-items: center;
    gap: 50px;
}

.painting-row.left-image  { flex-direction: row; }
.painting-row.right-image { flex-direction: row-reverse; }

.painting-image {
    flex: 1.2;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.painting-image--small {
    flex: 0.75;
    max-width: 340px;
}

.painting-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}

.painting-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.painting-image:hover img {
    transform: scale(1.02);
}

.painting-description {
    flex: 0.8;
    padding: 20px 10px;
}

.painting-description h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.painting-description p {
    font-size: 0.9rem;
    color: #3a3a3a;
    line-height: 1.75;
    margin-bottom: 10px;
}

.painting-technique {
    font-size: 0.78rem;
    color: #888;
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════
   MUSIC (dark) — 15% | 70% | 15%
═══════════════════════════════════════════════════ */
#music {
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
}

.music-layout {
    display: grid;
    grid-template-columns: 15% 70% 15%;
    min-height: 100vh;
    width: 100%;
    align-items: stretch;
}

.music-side {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.music-side--left {
    object-position: 25% center;
}

.music-side--right {
    object-position: center 35%;
}

.music-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    justify-content: center;
    max-width: none;
    margin: 0;
    padding: calc(64px + 32px) clamp(24px, 4vw, 48px) 48px;
    box-sizing: border-box;
}

/* Spotify compact embed */
.music-spotify-wrap {
    width: 100%;
}

.music-spotify-wrap iframe {
    display: block;
    border: none;
    border-radius: 6px;
}

/* Bio text */
.music-bio {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 1rem;
    line-height: 1.7;
    color: #e8e4f8;
}

/* Large streaming logos row */
.streaming-logos-large {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.stream-logo-large {
    display: flex;
    align-items: center;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
    text-decoration: none;
}

.stream-logo-large:hover {
    opacity: 1;
    transform: scale(1.05);
}

.stream-logo-large img {
    height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
}

.stream-logo-large svg {
    height: 80px;
    width: auto;
    display: block;
}

/* Legacy / unused */
.streaming-links { display: none; }
.streaming-logo  { width: 40px; height: 40px; object-fit: contain; }
.player-container { border-radius: 6px; overflow: hidden; }
.music-dark-inner { display: none; }
.music-deco { display: none; }

.deco-shape {
    width: 160px;
    height: 160px;
}

/* ═══════════════════════════════════════════════════
   ARTICLES
═══════════════════════════════════════════════════ */

/* Featured article — each fills roughly one screen */
.article-featured {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 0;
}

/* First article: no forced height, no extra padding */
.article-featured--first {
    min-height: unset;
    justify-content: flex-start;
    padding: 0;
}

#articles .light-section-inner {
    padding-top: 20px;
}

.article-featured-title {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.35;
    color: #1a1a1a;
    margin-bottom: 40px;
}

.article-featured-title strong {
    font-weight: 800;
}

.article-featured-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 32px rgba(0,0,0,0.12);
}

.article-featured-image img.article-img--small {
    width: 58%;
    margin: 0 auto;
}

.article-featured-image img.article-img--medium {
    width: 78%;
    margin: 0 auto;
}

.article-featured-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 1rem;
    line-height: 1.8;
    color: #1a1a1a;
    text-align: justify;
    max-width: 680px;
}

.article-featured-body--reverse {
    direction: rtl;
}

.article-featured-body--reverse > * {
    direction: ltr;
}

.article-section-header {
    font-weight: 700;
    margin-top: 8px;
}

.article-code-block {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.05);
    border-left: 3px solid #b0a8e0;
    padding: 10px 14px;
    line-height: 1.9;
    color: #333;
}

.article-emphasis {
    font-weight: 700;
    text-align: center;
    padding: 4px 0;
    color: #271689;
}

.article-link-pill {
    display: inline-block;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1.5px solid #1a1a1a;
    padding-bottom: 2px;
    transition: opacity 0.2s;
    align-self: flex-start;
    margin-top: 8px;
}

.article-link-pill:hover {
    opacity: 0.55;
}

/* Scroll invite between articles */
.scroll-invite {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 0 40px;
    color: rgba(0,0,0,0.3);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-invite-label {
    font-family: 'Space Mono', monospace;
}

.scroll-arrow {
    animation: bounce 1.6s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

/* Instagram captions article */
.article-insta-body {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.article-insta-intro {
    font-size: 1rem;
    line-height: 1.8;
    color: #1a1a1a;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.article-featured--centered > .article-featured-title {
    text-align: center;
}

/* Painting carousel — paintings left, description right */
.painting-carousel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

/* Left: track + nav */
.carousel-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Track: clips the peeks */
.carousel-track {
    position: relative;
    height: 440px;
    overflow: hidden;
}

/* Slides positioned absolutely */
.carousel-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.45s ease,
                z-index 0s;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2);
}

/* Current: centered, full */
.carousel-slide.is-current {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 3;
}

/* Next: peeking right */
.carousel-slide.is-next {
    transform: translate(calc(-50% + 62%), -50%) scale(0.82);
    opacity: 0.35;
    z-index: 2;
}

/* Prev: peeking left */
.carousel-slide.is-prev {
    transform: translate(calc(-50% - 62%), -50%) scale(0.82);
    opacity: 0.35;
    z-index: 2;
}

/* Hidden */
.carousel-slide.is-hidden {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* Nav: arrows + dots in a row */
.carousel-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.carousel-arrow {
    background: none;
    border: 1.5px solid rgba(0,0,0,0.25);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a1a;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.carousel-arrow:hover {
    border-color: #1a1a1a;
    background: rgba(0,0,0,0.06);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
    background: #1a1a1a;
    transform: scale(1.35);
}

/* Right: description */
.carousel-right {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
}

.carousel-slide-desc {
    display: none;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.carousel-slide-desc.visible {
    display: flex;
    position: relative;
}

.carousel-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: rgba(0,0,0,0.35);
}

.carousel-slide-desc p {
    font-size: 1rem;
    line-height: 1.85;
    color: #1a1a1a;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Other articles list */
.articles-other {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 20px 0 80px;
}

.article-other-item {
    display: flex;
    align-items: baseline;
    gap: 32px;
    font-size: 0.9rem;
    color: #1a1a1a;
    line-height: 1.6;
}

.article-other-item p {
    flex: 1;
}

/* ═══════════════════════════════════════════════════
   AI AND ART
═══════════════════════════════════════════════════ */
#ai-art {
    padding: 0;
}

/* Hero: full-viewport image */
.ai-hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.ai-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ai-hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
}

.ai-hero-scroll-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Projects section */
.ai-projects {
    max-width: 1300px;
    margin: 0 auto;
    padding: calc(64px + 20px) 80px 100px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* Profile links — centered bottom */
.ai-profile-links {
    display: flex;
    gap: 48px;
    align-items: center;
    justify-content: center;
    padding: 40px 0 20px;
    border-top: 1px solid rgba(176, 168, 224, 0.12);
}

.ai-profile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.25s, transform 0.25s;
}

.ai-profile-link:hover {
    opacity: 1;
    transform: translateY(-4px);
}

.ai-profile-link img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.ai-profile-link span {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b0a8e0;
}

/* Single project: video left, text right */
.ai-project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 80px;
    padding-bottom: 80px;
    border-bottom: 1px solid rgba(204, 255, 0, 0.08);
}

.ai-project-item:last-of-type {
    border-bottom: none;
}

/* Reversed: image LEFT, text right (same order, just flip columns) */
.ai-project-item--reversed {
    grid-template-columns: 1fr 1fr;
}

.ai-project-item--purple {
    border-bottom-color: rgba(176, 168, 224, 0.15);
}

.ai-project-item--purple .ai-project-desc-col strong {
    color: #f0eeff;
    font-weight: 700;
}

.ai-project-item--purple .ai-project-tag {
    color: #b0a8e0;
}

.ai-project-item--purple .ai-project-title {
    color: #d8d0f8;
}

.ai-project-item--purple .ai-project-desc-col {
    color: #c0b8e8;
}

.ai-project-item--purple .ai-project-gif {
    border-color: rgba(176, 168, 224, 0.3);
}

.ai-project-item--purple .article-link-pill {
    color: #b0a8e0;
    border-bottom-color: #b0a8e0;
}

.ai-project-item--purple .article-link-pill:hover {
    color: #d8d0f8;
    border-bottom-color: #d8d0f8;
    opacity: 1;
}

.ai-project-item--purple .ai-inline-link {
    color: #d8d0f8;
}

.ai-project-item--purple .ai-inline-link:hover {
    color: #f0eeff;
}

.ai-project-desc-col p + p {
    margin-top: 1em;
}

/* gif visual */
.ai-project-gif {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(204, 255, 0, 0.15);
    background: #000;
}

.ai-project-tag {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.7em;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff4f4f;
    margin-bottom: 10px;
}

.ai-project-title {
    font-size: 1.35em;
    color: #CCFF00;
    margin-bottom: 16px;
    line-height: 1.3;
}

.ai-project-video-wrap {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.ai-project-video-wrap video {
    display: block;
    width: 70%;
    height: auto;
}
.ai-project-desc-col {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #c0b8e8;
}

.ai-inline-link {
    color: #b0a8e0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.ai-inline-link:hover {
    color: #e8e4f8;
}

/* Resources block */
.ai-resources-section h3.ai-project-title {
    font-size: 1.15rem;
    margin-bottom: 24px;
}

.resources-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 600px;
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    padding: 22px 24px;
    background: rgba(176, 168, 224, 0.06);
    border: 1px solid rgba(176, 168, 224, 0.12);
    border-radius: 2px;
    transition: border-color 0.25s, background 0.25s;
}

.resource-card:hover {
    border-color: rgba(176, 168, 224, 0.4);
    background: rgba(176, 168, 224, 0.1);
}

.resource-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
}

.resource-info {
    flex: 1;
}

.resource-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #b0a8e0;
    margin-bottom: 4px;
}

.resource-info p {
    font-size: 0.85rem;
    color: #9090c8;
    line-height: 1.5;
}

.resource-arrow {
    font-size: 1.1rem;
    color: rgba(176, 168, 224, 0.4);
    transition: color 0.2s, transform 0.2s;
}

.resource-card:hover .resource-arrow {
    color: #b0a8e0;
    transform: translateX(4px);
}

.ai-social-link {
    font-size: 0.95rem;
    color: #9090c8;
    text-decoration: none;
    border-bottom: 1px solid rgba(144, 144, 200, 0.35);
    padding-bottom: 2px;
    transition: color 0.2s;
}

.ai-social-link:hover {
    color: #b0a8e0;
}

/* ═══════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    font-size: 2rem;
    color: #b0a8e0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #ffffff;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 0 80px rgba(0,0,0,0.8);
}

.lightbox-caption {
    color: #b0a8e0;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
    nav ul { gap: 24px; }

    .home-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        min-height:120vh;
    }

    .home-title-col {
        min-height: unset;
        padding: 100px 32px 24px;
        align-items: flex-start;
    }

    .home-video-col {
        min-height: unset;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .home-video-wrapper {
        min-height: unset;
    }

    .home-video {
        height: var(--home-video-height);
        width: auto;
        max-width: 100%;
    }

    .home-bio-col {
        min-height: unset;
        padding: 24px 32px 60px;
    }

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

    .about-portrait-col {
        order: -1;
    }

    .about-profile-img {
        max-width: 280px;
        margin: 0 auto;
    }

    .painting-row {
        flex-direction: column !important;
        gap: 24px;
    }

    .painting-image {
        width: 100%;
    }

    .ai-projects-row {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .article-featured-body {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-featured-title {
        font-size: 1.3rem;
    }

    .article-other-item {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .menu-toggle { display: block; }

    header { padding: 19x 20px; }

    nav {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 150;
    }

    body.dark-theme nav { background: rgba(0,0,0,0.97); }
    body.light-theme nav { background: rgba(252,232,228,0.97); }

    nav.open {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        gap: 28px;
        text-align: center;
    }

    nav a { font-size: 1.2rem; }

    .home-heading { font-size: 3.5rem; }

    .home-title-col { padding: 90px 24px 20px; }
    .home-bio-col { padding: 20px 24px 50px; }

    .about-grid { padding: 30px 24px 60px; }

    .light-section-inner { padding: 30px 24px 60px; }

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

    .ai-layout { padding: 20px 24px 60px; }

    .ai-paintings-row { gap: 12px; }
    .ai-painting-img { width: 100%; max-width: 320px; height: 260px; }

    .music-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .music-side { display: none; }

    .music-content { padding: calc(64px + 32px) 24px 48px; }
    .streaming-logos-large { gap: 40px; }
    .stream-logo-large img, .stream-logo-large svg { height: 80px; }

}
