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

img, svg, a {
    -webkit-user-drag: none;
    user-drag: none;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

::-moz-selection {
    background: var(--accent);
    color: var(--bg);
}

:root {
    --bg: #111;
    --surface: #1c1c1c;
    --border: #333;
    --text: #d48300;
    --text-muted: #aaa;
    --accent: #d48300;
    --accent-hover: #e89a1a;
    --card-height: 370px;
    --card-gap: 30px;
}

body {
    font-family: "Inconsolata", monospace;
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    min-height: 100svh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Background art ── */

.bg-art {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-art canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Hero ── */

.hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: auto;
    padding: 2rem 2rem 0;
    text-align: center;
}

.accent-bar {
    width: 48px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin-bottom: 2rem;
}

.avatar {
    width: 288px;
    height: 288px;
    border-radius: 0;
    border: none;
    margin-top: -3.5rem;
    margin-bottom: -2.5rem;
    object-fit: contain;
    -webkit-touch-callout: none;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.7))
            drop-shadow(0 0 30px rgba(0, 0, 0, 0.5));
}

.name {
    font-size: clamp(0.85rem, 2vw, 1.15rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}

.name-pill {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: #0e0e0e;
    border-radius: 999px;
    color: var(--accent);
    user-select: none;
    -webkit-user-select: none;
}

.handle {
    margin-top: 0.4rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.tagline {
    margin-top: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ── Link pills ── */

.links {
    margin-top: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.link-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background 0.2s, color 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .link-pill:hover,
    .footer-links .link-pill:hover {
        background: var(--accent);
        color: var(--bg);
    }
}

.link-pill svg {
    flex-shrink: 0;
}

/* ── Toggle ── */

.toggle-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto 1.5rem;
    position: relative;
    z-index: 1;
}

.toggle-gap {
    width: 100%;
    height: 0;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-gap.expanding {
    height: var(--gap-h, 140px);
}

.speaker-pill {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 2px solid var(--accent);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transform: translateX(var(--speaker-x, 46px));
    opacity: var(--speaker-op, 0);
    pointer-events: none;
    will-change: transform, opacity;
    overflow: hidden;
    transition: background 0.3s, width 0.35s cubic-bezier(0.4,0,0.2,1), height 0.35s cubic-bezier(0.4,0,0.2,1), border-radius 0.35s;
    cursor: pointer;
    box-shadow: 0 0 30px 10px rgba(0, 0, 0, 0.5);
    z-index: 0;
    bottom: 0;
}

.speaker-pill.visible {
    pointer-events: auto;
}

.speaker-pill.animate {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
    .speaker-pill:not(.open):hover {
        border-color: var(--accent-hover);
        color: var(--accent-hover);
    }
}

.speaker-pill.open {
    width: var(--pill-w, 240px);
    height: auto;
    border-radius: 20px;
    background: var(--accent);
    color: #000;
    pointer-events: auto;
    border-color: var(--accent);
}

/* Pill animation phases (unified desktop + mobile) */
.speaker-pill.phase-move {
    z-index: 10;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.speaker-pill.phase-center {
    z-index: 10;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.speaker-pill.phase-expand {
    z-index: 10;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), height 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.35s, background 0.3s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-row:has(.toggle-gap.expanding),
.toggle-row:has(.speaker-pill.phase-move),
.toggle-row:has(.speaker-pill.phase-center),
.toggle-row:has(.speaker-pill.phase-expand) {
    z-index: 20;
}

/* Speaker icon button — visible when pill is closed */
.sp-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1;
}

.speaker-pill.open .sp-icon {
    display: none;
}

.sp-icon svg {
    width: 24px;
    height: 24px;
    position: absolute;
}

.sp-note-icon {
    width: 24px;
    height: 24px;
}

.sp-vol-icon .sp-x1,
.sp-vol-icon .sp-x2,
.sp-vol-icon .sp-wave1,
.sp-vol-icon .sp-wave2,
.sp-vol-icon .sp-wave3 {
    transition: opacity 0.15s;
}

/* Controls — hidden when closed */
.sp-controls {
    display: none;
    flex-direction: row;
    align-items: stretch;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

.speaker-pill.open .sp-controls {
    display: flex;
}

/* Cover art — square, touching left edge, height matches right section */
.sp-art {
    flex-shrink: 0;
    width: var(--art-size, 100px);
    height: var(--art-size, 100px);
    overflow: hidden;
    border-radius: 18px;
    position: relative;
    cursor: grab;
    touch-action: pan-y;
}

.sp-art:active { cursor: grabbing; }

.sp-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    filter: grayscale(1) sepia(1) saturate(5) hue-rotate(-5deg) brightness(0.75);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-drag: none;
    user-drag: none;
    -moz-user-select: none;
    user-select: none;
    pointer-events: none;
}

.sp-art-next {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

.sp-art-next.visible {
    opacity: 1;
}

/* Slide left: current goes -(100% + gap), next starts at +(100% + gap) then goes to 0 */
.sp-art.sliding-left img { transform: translateX(calc(-100% - var(--art-gap))); }
.sp-art.sliding-left .sp-art-next { transform: translateX(0); }

/* Slide right: current goes +(100% + gap), next starts at -(100% + gap) then goes to 0 */
.sp-art.sliding-right img { transform: translateX(calc(100% + var(--art-gap))); }
.sp-art.sliding-right .sp-art-next { transform: translateX(0); }

/* Pre-position next image before animation starts */
.sp-art.pre-left .sp-art-next { transform: translateX(calc(100% + var(--art-gap))); transition: none; }
.sp-art.pre-right .sp-art-next { transform: translateX(calc(-100% - var(--art-gap))); transition: none; }

/* Right section — title, transport, volume */
.sp-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px 12px;
    position: relative;
    min-width: 0;
}

.sp-close {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 2;
}

.sp-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sp-row-title {
    justify-content: center;
}

.sp-row-transport {
    gap: 0;
    margin-top: 2px;
}

.sp-row-volume {
    gap: 10px;
    justify-content: center;
}

/* Volume slider — same width as transport row */
.sp-slider {
    /* Match transport row width: 3 buttons × 28px + 2 gaps × 4px = 92px */
    width: 92px;
    flex-shrink: 0;
    height: 4px;
    position: relative;
    cursor: pointer;
    overflow: visible;
    margin: 0 2px;
}

/* Invisible expanded hitbox for hover */
.sp-slider::before {
    content: '';
    position: absolute;
    top: -14px;
    bottom: -14px;
    left: -6px;
    right: -6px;
}

.sp-slider:hover .sp-track-bg,
.sp-row-volume:hover .sp-track-bg {
    background: rgba(0,0,0,0.12);
}

/* Speaker icon in volume row — matches muted circle icon size */
.sp-row-volume .sp-vol-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 4px;
    box-sizing: border-box;
    color: #000;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s;
}

.sp-row-volume .sp-vol-icon:hover {
    background: rgba(0,0,0,0.1);
}

.sp-row-volume .sp-vol-icon:active {
    background: rgba(0,0,0,0.2);
}

.sp-track-bg {
    position: absolute;
    top: 1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: background 0.15s;
}

.sp-track-fill {
    position: absolute;
    top: 1px;
    left: 0;
    width: 60%;
    height: 2px;
    background: #000;
    border-radius: 2px;
    pointer-events: none;
    transition: width 0.2s ease;
}

.sp-handle {
    position: absolute;
    top: 50%;
    left: 60%;
    width: 14px;
    height: 14px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    touch-action: none;
    transition: left 0.2s ease;
}

.sp-slider.dragging .sp-track-fill,
.sp-slider.dragging .sp-handle {
    transition: none;
}

.sp-handle:active { cursor: grabbing; }

/* Track title */
.sp-title-wrap {
    position: relative;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sp-title-wrap:active { cursor: grabbing; }

.sp-title {
    font-family: "Inconsolata", monospace;
    font-size: clamp(0.75rem, 1.8vw, 1rem);
    font-weight: 600;
    color: #000;
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-title-next {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-title-next.visible { opacity: 1; }

/* Slide left: current exits left, next enters from right — use container width for natural gap */
.sp-title-wrap.sliding-left .sp-title { transform: translateX(calc(-1 * var(--wrap-w))); }
.sp-title-wrap.sliding-left .sp-title-next { transform: translateX(0); }

/* Slide right: current exits right, next enters from left */
.sp-title-wrap.sliding-right .sp-title { transform: translateX(var(--wrap-w)); }
.sp-title-wrap.sliding-right .sp-title-next { transform: translateX(0); }

/* Pre-position next title off-screen before animation */
.sp-title-wrap.pre-left .sp-title-next { transform: translateX(var(--wrap-w)); transition: none; }
.sp-title-wrap.pre-right .sp-title-next { transform: translateX(calc(-1 * var(--wrap-w))); transition: none; }


.sp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: none;
    color: #000;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    transition: background 0.15s;
    overflow: visible;
}

.sp-btn:hover {
    background: rgba(0,0,0,0.1);
}

.sp-btn:active {
    background: rgba(0,0,0,0.2);
}

.sp-playpause .sp-play-icon,
.sp-playpause .sp-pause-icon {
    transition: opacity 0.15s, transform 0.15s;
}

.sp-playpause.playing .sp-play-icon { display: none; }
.sp-playpause.playing .sp-pause-icon { display: block !important; }

.sp-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    position: absolute;
    left: 12px;
    top: 12px;
}

.sp-eq-bar {
    width: 4px;
    min-height: 2px;
    background: #000;
    border-radius: 999px;
    transition: height 0.03s linear;
}

/* Dot markers at 0% and 100% */
.sp-start-dot,
.sp-end-dot {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #000;
    border-radius: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.sp-start-dot { left: -3px; }
.sp-end-dot { right: -3px; }


.section-toggle {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 280px;
    border: 2px solid var(--accent);
    border-radius: 999px;
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

.section-toggle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(50% + 2px);
    height: calc(100% + 4px);
    background: var(--accent);
    border-radius: 999px;
    z-index: 1;
    will-change: transform;
    transform: translateX(var(--pill-x, 0%));
    pointer-events: none;
}

.toggle-btn {
    flex: 1;
    padding: 0.6rem 1.25rem;
    background: #0e0e0e;
    color: var(--accent);
    border: none;
    font-family: inherit;
    font-size: clamp(0.85rem, 2vw, 1.15rem);
    font-weight: 600;
    cursor: pointer;
    position: static;
    transition: none;
}

.toggle-dark-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    pointer-events: none;
    z-index: 3;
}

.toggle-dark-layer span {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: clamp(0.85rem, 2vw, 1.15rem);
    font-weight: 600;
    color: #000000;
}

@media (hover: hover) and (pointer: fine) {
    .toggle-btn:not(.active):hover {
        background: #1a1a1a;
    }
}

/* ── Sections ── */

.sections-fade {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.sections-wrapper {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    overflow: visible;
    user-select: none;
    touch-action: none;
}

.sections-track {
    display: flex;
    width: 200%;
    will-change: transform;
    transform: translateZ(0);
    touch-action: none;
}

.sections-track > section {
    width: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
    touch-action: none;
}

.sections-track > section:first-child {
    padding-right: calc(var(--card-gap) / 2);
}

.sections-track > section:last-child {
    padding-left: calc(var(--card-gap) / 2);
}

.music h2,
.projects h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

.card-thumb--icon {
    color: var(--accent);
}

.card-thumb--icon svg {
    width: 56px !important;
    height: 56px !important;
}

.brand-icon {
    width: 72px !important;
    height: 72px !important;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.music .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--card-gap);
}

.music .project-card {
    flex-direction: row !important;
    height: calc((var(--card-height) - var(--card-gap)) / 2) !important;
    max-height: calc((var(--card-height) - var(--card-gap)) / 2) !important;
    min-height: calc((var(--card-height) - var(--card-gap)) / 2) !important;
    overflow: hidden;
}

.music .card-thumb {
    height: auto !important;
    aspect-ratio: 1 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    border-bottom: none;
    border-right: 1px solid var(--border);
    align-self: stretch;
    position: relative;
    overflow: hidden;
}

.music .card-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('img/conjius-what-if-you-tried.jpg') center / cover no-repeat;
    filter: grayscale(1) sepia(1) saturate(2) hue-rotate(-5deg) brightness(0.75) contrast(3.5);
    opacity: 0.15;
    pointer-events: none;
    transform: scale(1) rotate(0deg);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.music .project-card:hover .card-thumb::before {
    transform: scale(1.18) rotate(var(--thumb-rot, 0deg));
}

.music .project-grid .project-card:nth-child(1) .card-thumb::before {
    background-image: url('img/conjius-live-thumb.jpg');
}

.music .project-grid .project-card:nth-child(6) .card-thumb::before {
    background-image: url('img/conjius-home-thumb.jpg');
}

.music .project-info {
    height: auto !important;
    flex: 1 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.05rem 1.25rem;
    border-top: none;
}

/* ── Projects section ── */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--card-gap);
    padding-top: 6px;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 2.5px solid var(--border);
    border-radius: 40px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    height: var(--card-height);
    contain: layout style paint;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .project-card:hover {
        border-color: var(--accent);
    }
}

.project-card > img,
.card-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.project-card > img {
    background: var(--surface);
    object-fit: contain;
    padding: 16px 16px 0 16px;
}

.card-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.card-thumb svg {
    width: 100%;
    height: 100%;
}

.card-thumb:has(.wav-decoder-svg) {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}



.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.projects .project-info h3,
.projects .project-info p {
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
    width: fit-content;
}


.project-info h3 {
    font-size: 1.3rem;
    font-weight: 900;
}

.project-info p {
    font-size: 1.144rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.35rem;
}

.card-footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-footer-left > a {
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.card-links {
    display: flex;
    gap: 0.5rem;
}

.card-links > a {
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.share-btn {
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s;
    -webkit-appearance: none;
    touch-action: pan-x;
    position: relative;
    z-index: 10;
}

.share-btn svg,
.share-btn * {
    pointer-events: none;
}

.share-btn.tapped {
    background: var(--accent);
    color: var(--bg);
}

@media (hover: hover) and (pointer: fine) {
    .card-links > a:hover,
    .card-footer-left > a:hover {
        background: var(--accent);
        color: var(--bg);
    }
}

.card-links a.play-pill {
    width: auto;
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid var(--accent);
    font-size: 0.8rem;
    font-weight: 400;
    gap: 6px;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
    .card-links a.play-pill:hover {
        background: var(--accent);
        color: var(--bg);
    }
}

/* Download pill buttons (desktop) */
.dl-pill-icon {
    vertical-align: -4px;
}

.card-links > a.dl-pill {
    width: auto;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inconsolata', monospace;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
    gap: 6px;
}

@media (hover: hover) and (pointer: fine) {
    .card-links > a.dl-pill:hover {
        background: var(--accent);
        color: var(--bg);
    }
}

/* Download row (desktop only — 3 pills below card-footer) */
.card-download-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding-top: 0.35rem;
}

.card-download-row .dl-pill {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inconsolata', monospace;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
    gap: 6px;
}

@media (hover: hover) and (pointer: fine) {
    .card-download-row .dl-pill:hover {
        background: var(--accent);
        color: var(--bg);
    }
}

.lang {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* ── Black outer glow ── */

.section-toggle,
.name-pill,
.project-card,
.link-pill,
.footer-links .link-pill {
    box-shadow: 0 0 30px 10px rgba(0, 0, 0, 0.5);
}

/* ── Footer ── */

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.33rem 2rem;
    color: var(--accent);
    font-size: 0.85rem;
    background: #0e0e0e;
    border-top: none;
    margin-top: auto;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
    will-change: transform;
}

.footer-text {
    line-height: 1;
    font-weight: 600;
}

.footer-logo {
    width: 38px;
    height: 38px;
    vertical-align: middle;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.footer-links {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    padding-bottom: 1.5rem;
    gap: 0.6rem;
}

.footer-links .link-pill {
    border-width: 2px;
    padding: 0.5rem;
    background: #0e0e0e;
}

/* ── Responsive ── */


/* ── Mobile layout ── */

@media (max-width: 600px) {
    .hero {
        min-height: auto;
        padding: 1.25rem 1.5rem 0;
    }

    .avatar {
        width: 192px;
        height: 192px;
        margin-top: -3rem;
        margin-bottom: -2rem;
    }

    .name {
        font-size: 0.75rem;
        line-height: 1.5;
    }

    .link-label {
        display: none;
    }

    .link-pill {
        padding: 0.7rem;
        gap: 0;
    }

    .section-toggle {
        max-width: 220px;
    }

    .toggle-btn {
        font-size: 1.19rem;
    }

    .toggle-dark-layer span {
        font-size: 1.19rem;
    }

    .tagline {
        font-size: 1.19rem;
    }

    .sp-title,
    .sp-title-next {
        font-size: 1.05rem;
    }

    .project-info h3 {
        font-size: 1.19rem;
    }

    .project-info p {
        font-size: 0.915rem;
    }

    .lang {
        font-size: 1.19rem;
    }

    footer {
        font-size: 1.19rem;
    }

    .footer-text {
        font-size: 1.19rem;
    }

    /* Match closed pill diameter to toggle height */
    .speaker-pill {
        width: 43px;
        height: 43px;
        border-radius: 50%;
    }

    :root {
        --card-gap: 15px;
        --mobile-pad: 14vw;
        --code-card-size: calc(100vw - 2 * var(--mobile-pad));
    }

    .sections-wrapper {
        padding: 0 var(--mobile-pad) 3rem;
    }

    .project-grid {
        grid-template-columns: 1fr !important;
        gap: var(--card-gap);
    }

    .projects .project-card {
        height: var(--code-card-size) !important;
        max-height: var(--code-card-size) !important;
        min-height: var(--code-card-size) !important;
    }

    .music .project-grid {
        grid-template-columns: 1fr !important;
    }

    .music .project-card {
        /* 2 music cards + 1 gap = 1 code card height */
        height: calc((var(--code-card-size) - var(--card-gap)) / 2) !important;
        max-height: calc((var(--code-card-size) - var(--card-gap)) / 2) !important;
        min-height: calc((var(--code-card-size) - var(--card-gap)) / 2) !important;
    }

    .project-card {
        border-radius: 20px;
        border-width: 2px;
    }

    .project-info {
        padding: 0.8rem;
    }

    .project-card > img,
    .card-thumb {
        height: 90px;
    }

    .project-card > img {
        padding: 10px 10px 0 10px;
    }


    .card-footer {
        overflow: hidden;
    }

    .card-links {
        gap: 0.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-shrink: 1;
        min-width: 0;
    }

    .card-links::-webkit-scrollbar {
        display: none;
    }

    .card-links .share-btn {
        flex-shrink: 0;
    }

    .card-links > a,
    .card-footer-left > a {
        width: 46px;
        height: 46px;
        padding: 7px;
    }


    .projects .project-info h3,
    .projects .project-info p {
        user-select: none;
        -webkit-user-select: none;
        cursor: default;
    }
}

/* ── Tactile press effects ── */

.project-card {
    transition: transform 0.1s, border-color 0.1s;
}

.music .project-card:active,
.projects .project-card:active {
    transform: scale(0.97);
    border-color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
    .projects .project-card:active:has(h3:active, p:active) {
        transform: none;
        border-color: var(--border);
    }
}

.section-toggle {
    transition: transform 0.1s;
}

.section-toggle:active {
    transform: scale(0.95);
}

.avatar {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.link-pill {
    transition: transform 0.1s, border-color 0.1s;
}

.link-pill:active {
    transform: scale(0.93);
    border-color: var(--accent-hover);
}
