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

:root {
    /* Variables */
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-pink1: rgb(148, 27, 107);
    --text-pink2: rgb(184, 38, 118);
    --text-pink3: rgb(222, 105, 170);
    --accent: var(--text-pink2);
    --accent-light: var(--text-pink3);
    --body-bg: #f9fafb;
    --paper-bg: #fefefe;
    --code-bg: #f8fafc;
    --border-light: #e2e8f0;
    --shadow-paper: 0 2px 16px rgba(0, 0, 0, 0.08);
    --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.12);

    counter-reset: section-counter;
}

html {
    /* Common config. */
    font-size: 18px;
    font-family: Georgia, serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-size: 1rem;
    line-height: 1.7;
    background: var(--body-bg);
    overflow-x: hidden;
}

.sans {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.mono {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* Hero Section - Full Screen Landing */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: #f9fafb;
    position: relative;
    padding: 0 4rem;
    max-width: 900px;
    margin: 0 auto;
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.hero-content {
    max-width: 100%;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-pink1);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 2rem;
}

.hero-meta {
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.scroll-indicator {
    cursor: pointer;
    position: absolute;
    bottom: 8rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 5s infinite;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.nav.visible {
    transform: translateY(0);
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 4rem;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

/* Main Content */
.page {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--paper-bg);
    box-shadow: var(--shadow-paper);
    min-height: 100vh;
}

.container {
    padding: 0 4rem;
}

.content {
    padding: 4rem 0 4rem 0;
}

/* Section Styles */
.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
    position: relative;
}

.section-title::before {
    content: counter(section-counter, decimal);
    counter-increment: section-counter;
    position: absolute;
    left: -3rem;
    top: 0;
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 500;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    z-index: 1001;
    transition: width 0.1s ease;
    opacity: 0;
}

.reading-progress.visible {
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
from {
    opacity: 0;
    transform: translateY(30px);
}

to {
    opacity: 1;
    transform: translateY(0);
}
}

@keyframes pulse {

0%,
100% {
    opacity: 1;
    transform: scale(1);
}

50% {
    opacity: 0.5;
    transform: scale(1.1);
}
}

@keyframes bounce {

0%,
100% {
    transform: translateX(-50%) translateY(0);
}

50% {
    transform: translateX(-50%) translateY(-6px);
}
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .nav-inner {
        padding: 0 1.5rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

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

    .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        border-radius: 4px;
        flex-shrink: 0;
    }

    .nav-link.active {
        background: rgba(184, 38, 118, 0.1);
    }

    .nav-link.active::after {
        display: none;
    }

    .container {
        padding: 0 1.5rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-title::before {
        display: none;
    }

    .scroll-indicator {
        bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-inner {
        padding: 0 1rem;
    }
}

/* Performance optimisations */
.hero,
.nav {
    will-change: transform;
}

.hero-content {
    will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    .hero,
    .page,
    .nav,
    .hero-content,
    .nav-link {
        transition: none;
    }

    .status-indicator {
        animation: none;
    }

    .scroll-indicator {
        animation: none;
    }

    .hero-title,
    .hero-subtitle,
    .hero-meta {
        animation: none;
    }
}

#motion-warning {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: #fff5f7;
    border-left: 4px solid var(--accent);
    padding: 0.75rem 1rem;
    margin: 1rem 0.2rem 0rem 0.2rem;
    max-width: 900px;
    text-align: center;
    border-radius: 4px;
}
