:root {
    color-scheme: light;
    --ink: #111;
    --muted: #6f6f6f;
    --line: #dedede;
    --paper: #fafafa;
    --surface: #fff;
    --hover-bg: #eaeaea;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f1f1ed;
    --muted: #9b9b94;
    --line: #383838;
    --paper: #111;
    --surface: #1b1b1b;
    --hover-bg: #2a2a2a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.home {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.home-nav-fixed {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--paper);
    transition: background-color .3s;
}

.home-nav-fixed > .home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 0;
}

.home-nav-footer {
    padding: 24px 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--line);
    margin-top: auto; /* Push to bottom of manifesto-wrapper */
}

.snap-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    /* Hide scrollbar for cleaner look if desired, but default is fine */
}

.screen {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.manifesto-screen {
    justify-content: flex-start;
}

.manifesto-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 100px; /* Space for the fixed nav */
}


.mark {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    font-size: 18px;
}

.home-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    font-size: 14px;
    border: 1px solid var(--ink);
    padding: 9px 16px;
    transition: .2s;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
}

.theme-toggle:hover {
    background: var(--ink);
    color: var(--paper);
}

.hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 40px;
    align-items: center;
    /* padding is handled by the screen flex layout now */
}

.hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 0;
    object-fit: cover;
    margin-bottom: 32px;
    border: 1px solid var(--line);
}

h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -.05em;
    font-weight: 800;
}

.hero-greeting {
    font-size: 0.5em;
    font-weight: 500;
    vertical-align: middle;
}

.hero-copy {
    margin-top: 24px;
    max-width: 560px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.9;
}

.hero-heatmap {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: flex-end;
}

.hero-heatmap img {
    filter: grayscale(1);
    max-width: 100%;
    height: auto;
}

html[data-theme="dark"] .hero-heatmap img {
    filter: grayscale(1) invert(1) brightness(1.5);
}

.manifesto {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: auto 0; /* Centers it vertically in the wrapper */
}

.manifesto-item {
    padding: 28px 24px 32px 0;
    border-right: 1px solid var(--line);
}

.manifesto-item:not(:first-child) {
    padding-left: 24px;
}

.manifesto-item:last-child {
    border-right: 0;
}

.manifesto-no {
    color: var(--muted);
    font: 12px ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: .1em;
}

.manifesto h2 {
    margin: 18px 0 24px;
    font-size: 20px;
    font-weight: 600;
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    margin: -12px;
    border-radius: 0;
    transition: background-color 0.2s ease;
}

.link-item:hover {
    background-color: var(--hover-bg);
}

.link-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.link-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0 36px;
    color: var(--muted);
    font-size: 12px;
}

footer a {
    transition: color 0.2s;
}

footer a:hover {
    color: var(--ink);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 32px;
    }
    .hero-heatmap {
        justify-content: flex-start;
    }
    .manifesto {
        grid-template-columns: repeat(2, 1fr);
    }
    .manifesto-item:nth-child(2) {
        border-right: 0;
    }
    .manifesto-item:nth-child(3) {
        grid-column: 1 / -1;
        padding-left: 0;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 70px 0 50px;
    }
    .manifesto {
        grid-template-columns: 1fr;
    }
    .manifesto-item,
    .manifesto-item:not(:first-child),
    .manifesto-item:nth-child(3) {
        padding: 24px 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .manifesto-item:nth-child(3) {
        border-top: 0;
    }
    .manifesto-item:last-child {
        border-bottom: 0;
    }
    footer {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

@media (max-height: 700px), (max-width: 900px) {
    body {
        height: auto;
        overflow: auto;
    }
    .snap-container {
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }
    .screen {
        height: auto;
        min-height: 100vh;
        padding-top: 100px; /* space for fixed nav */
        justify-content: flex-start;
    }
    .manifesto-wrapper {
        height: auto;
        padding-top: 0;
    }
}
