body[data-project="home"] .section {
    padding-block: var(--space-6);
}

.home-hero {
    position: relative;
    text-align: center;
    padding-top: calc(var(--nav-h) + var(--space-10));
    padding-bottom: var(--space-6);
}

.home-hero__inner {
    position: relative;
    z-index: 1;
}

.home-hero__lede {
    margin: 0 auto;
    max-width: 42rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.5vw, 2.25rem);
    font-weight: 800;
    line-height: var(--lh-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--text-strong);
    text-wrap: balance;
}

.home-hero__muted {
    display: block;
    margin-top: var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--text-lg);
    font-weight: 500;
    letter-spacing: normal;
    color: var(--text-muted);
}

.dir-head {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.dir-head__rule {
    flex: 1;
    height: 1px;
}

.dir-head__rule:first-child {
    background: linear-gradient(to right, transparent, var(--border-strong));
}

.dir-head__rule:last-child {
    background: linear-gradient(to left, transparent, var(--border-strong));
}

.dir-head__title {
    font-size: var(--text-lg);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--text-muted);
    white-space: nowrap;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 40rem) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 62rem) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 640px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dir-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 140px;
    padding: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

html.dark .dir-card {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.4);
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.dir-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

html.dark .dir-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-content {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.dir-card__title {
    margin-bottom: 0.125rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}

.dir-card__title--display {
    font-family: var(--font-display);
    text-transform: uppercase;
}

.dir-card__desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.625;
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .dir-card__title {
        font-size: 1.125rem;
    }
    .dir-card__desc {
        font-size: 13px;
    }
}

.card-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.zeti-glow { background: radial-gradient(circle at top right, rgba(0, 122, 255, 0.08), transparent 70%); }
html.dark .zeti-glow { background: radial-gradient(circle at top right, rgba(10, 132, 255, 0.15), transparent 70%); }
.christmas-glow { background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 70%); }
html.dark .christmas-glow { background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 70%); }
.lab-glow { background: radial-gradient(circle at top right, rgba(220, 38, 38, 0.06), transparent 70%); }
html.dark .lab-glow { background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 70%); }
.shifted-glow { background: radial-gradient(circle at top right, rgba(0, 0, 0, 0.03), transparent 70%); }
html.dark .shifted-glow { background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.03), transparent 70%); }
.tiny-glow { background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.08), transparent 70%); }
html.dark .tiny-glow { background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.12), transparent 70%); }
.vernus-glow { background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 70%); }
html.dark .vernus-glow { background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 70%); }
.viriko-glow { background: radial-gradient(circle at top right, rgba(124, 111, 240, 0.08), transparent 70%); }
html.dark .viriko-glow { background: radial-gradient(circle at top right, rgba(124, 111, 240, 0.16), transparent 70%); }

.snow-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.snowflake {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #94a3b8;
    opacity: 0;
    animation: snowfall 2s linear infinite;
}

html.dark .snowflake { background: #e2e8f0; }
.snowflake:nth-child(1) { left: 85%; top: -10px; animation-delay: 0s; animation-duration: 2.5s; }
.snowflake:nth-child(2) { left: 65%; top: -10px; width: 4px; height: 4px; animation-delay: 0.8s; animation-duration: 3s; }
.snowflake:nth-child(3) { left: 92%; top: -10px; width: 2px; height: 2px; animation-delay: 1.5s; animation-duration: 2s; }

.lab-drop {
    position: absolute;
    right: -25px;
    top: -35px;
    z-index: 1;
    width: 140px;
    height: 140px;
    color: #ef4444;
    opacity: 0.08;
    pointer-events: none;
    animation: pulseDrop 4s ease-in-out infinite alternate;
}

html.dark .lab-drop { opacity: 0.15; }

.shifted-shapes {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    z-index: 1;
    width: 80px;
    height: 80px;
    opacity: 0.7;
    pointer-events: none;
}

.shape-item { position: absolute; }
.shape-circle { top: 15px; left: 15px; width: 18px; height: 18px; border-radius: 50%; background: #ff3b30; animation: floatCircle 4s ease-in-out infinite alternate; }
.shape-square { top: 30px; left: 45px; width: 14px; height: 14px; background: #007aff; animation: floatSquare 5s ease-in-out infinite alternate; }
.shape-triangle { top: 45px; left: 20px; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 16px solid #ffcc00; animation: floatTriangle 4.5s ease-in-out infinite alternate; }

.banana-float {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    z-index: 1;
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 6px rgba(251, 191, 36, 0.2));
    pointer-events: none;
    animation: floatBanana 4s ease-in-out infinite alternate;
}

.vernus-icon {
    position: absolute;
    right: -20px;
    top: -20px;
    z-index: 1;
    width: 130px;
    height: 130px;
    color: #6366f1;
    opacity: 0.05;
    pointer-events: none;
    animation: pulseDrop 4s ease-in-out infinite alternate;
}

html.dark .vernus-icon { opacity: 0.1; }

.zeti-constellation {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    z-index: 1;
    width: 140px;
    height: auto;
    opacity: 0.75;
    pointer-events: none;
    animation: floatIcon 6s ease-in-out infinite;
}

html.dark .zeti-constellation { opacity: 0.95; }
.g-edge { stroke: #007aff; stroke-opacity: 0.35; stroke-width: 3.5; }
html.dark .g-edge { stroke: #9cc0ff; stroke-opacity: 0.22; }
.g-ring { fill: none; stroke: #007aff; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: gpulse 2.8s ease-in-out infinite; }
html.dark .g-ring { stroke: #ffffff; }

.viriko-scene {
    position: absolute;
    right: 0.7rem;
    top: 0.55rem;
    z-index: 1;
    width: 130px;
    height: 92px;
    pointer-events: none;
}

.viriko-donkey {
    position: absolute;
    right: 34px;
    top: 2px;
    opacity: 0.95;
    animation: floatIcon 5s ease-in-out infinite;
}

.viriko-donkey svg { height: 66px; width: auto; }

.vk-note {
    position: absolute;
    width: 32px;
    padding: 5px;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}

html.dark .vk-note { background: #1e293b; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); }
.vk-note span { display: block; height: 3px; margin-bottom: 3px; border-radius: 2px; background: rgba(43, 38, 34, 0.18); }
html.dark .vk-note span { background: rgba(226, 232, 240, 0.25); }
.vk-note span:last-child { margin-bottom: 0; width: 60%; }
.vk-note.n1 { left: 22px; top: 6px; transform: rotate(-6deg); }
.vk-note.n2 { left: 26px; top: 42px; transform: rotate(5deg); }
.vk-note.n3 { left: 100px; top: 26px; transform: rotate(8deg); }

@keyframes snowfall {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(140px) translateX(-15px); opacity: 0; }
}

@keyframes pulseDrop {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.05) rotate(5deg); }
}

@keyframes floatCircle {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-8px, 6px); }
}

@keyframes floatSquare {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(6px, -8px) rotate(15deg); }
}

@keyframes floatTriangle {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(5px, 5px) rotate(-10deg); }
}

@keyframes floatBanana {
    0% { transform: translateY(0) rotate(5deg); }
    100% { transform: translateY(6px) rotate(-10deg); }
}

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

@keyframes gpulse {
    0%, 100% { stroke-opacity: 0.25; }
    50% { stroke-opacity: 0.95; }
}

.support-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
    padding: var(--space-8);
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--elev-1);
}

@media (min-width: 40rem) {
    .support-box {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-8);
    }
}

.support-box__title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-strong);
}

.support-box__text {
    margin-top: var(--space-2);
    max-width: 40rem;
    color: var(--text-muted);
    font-size: var(--text-md);
}

.support-box .btn {
    flex-shrink: 0;
}

/* Hand-drawn red underline on a highlighted word (home hero). */
.scribble {
    position: relative;
    white-space: nowrap;
}

.scribble::after {
    content: "";
    position: absolute;
    left: -0.06em;
    right: -0.06em;
    bottom: -0.16em;
    height: 0.42em;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8 C 15 4 28 9 42 6 C 56 3 70 10 84 6 C 98 3 110 9 117 5.5' stroke='%23ff3b30' stroke-width='2.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
