:root {
    --primary-rose: #CC0033;
    --primary-rose-soft: rgba(204, 0, 51, 0.1);
    --background: #F7F7F7;
    --card: rgba(255, 255, 255, 0.7);
    --foreground: #1A1919;
    --foreground-rgb: 26, 25, 25;
    --muted-foreground: #666060;
    --border: rgba(0, 0, 0, 0.1);
    --radius-xl: 0.75rem;
    --radius-2xl: 1.25rem;
    --glass-blur: 12px;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-rose: #FF3366;
        --primary-rose-soft: rgba(255, 51, 102, 0.15);
        --background: #201D1D;
        --card: rgba(39, 33, 33, 0.7);
        --foreground: #F2F0F0;
        --foreground-rgb: 242, 240, 240;
        --muted-foreground: #A19393;
        --border: rgba(255, 255, 255, 0.1);
        --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--foreground);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(135deg, var(--primary-rose) 0%, var(--background) 100%);
    opacity: 0.08;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 75 75'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3Cg transform='translate(-75 0)'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3C/g%3E%3Cg transform='translate(0 -75)'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3C/g%3E%3Cg transform='translate(-75 -75)'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 75 75'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3Cg transform='translate(-75 0)'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3C/g%3E%3Cg transform='translate(0 -75)'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3C/g%3E%3Cg transform='translate(-75 -75)'%3E%3Cpolyline points='20,8 56,8 65,17 56,26 56,56 65,65 56,74 20,74 11,65 20,56 20,26 11,17 20,8' transform='rotate(45 38 41)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-size: 35px 35px;
    mask-size: 35px 35px;
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
}

@media (prefers-color-scheme: dark) {
    body::before {
        opacity: 0.08;
        background-image: linear-gradient(135deg, var(--primary-rose) 0%, var(--background) 100%);
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-xl);
}

.page-shell {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
}

.glass-panel {
    background: var(--card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.12);
    border-color: rgba(var(--foreground-rgb), 0.2);
}

.site-header {
    background: var(--card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    position: sticky;
    top: 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-wordmark {
    display: flex;
    flex-direction: column;
    color: var(--primary-rose);
    font-weight: 900;
    line-height: 0.9 !important;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.nav-links a:hover {
    opacity: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary-rose);
    color: white;
}

.btn-secondary {
    background: rgba(var(--foreground-rgb), 0.05);
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-secondary:hover {
    background: rgba(var(--foreground-rgb), 0.1);
}

.text-glow {
    background: linear-gradient(to bottom, var(--foreground) 0%, rgba(var(--foreground-rgb), 0.6) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary-rose);
    margin-bottom: 1rem;
    display: block;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    padding: 3rem;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 950;
    line-height: 1.1;
    margin: 0;
}

.lede {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--muted-foreground);
    margin: 1.5rem 0 0;
}

.hero-panel {
    background: rgba(var(--foreground-rgb), 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.post-card {
    padding: 1.5rem;
}

.post-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1rem 0;
    line-height: 1.2;
}

.post-card h3 a:hover {
    color: var(--primary-rose);
}

.post-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pill {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary-rose-soft);
    color: var(--primary-rose);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.reading-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.post-hero {
    padding: 3rem;
    margin-bottom: 2rem;
}

.post-body {
    padding: 2.5rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-body h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 2.5rem;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    padding: 1.5rem;
    position: sticky;
    top: 6rem;
}

.sidebar-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 0;
}

.cta-panel {
    padding: 3rem;
    margin-top: 4rem;
    text-align: center;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a:hover {
    color: var(--primary-rose);
}

@media (max-width: 900px) {

    .hero,
    .post-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .hero,
    .post-hero,
    .post-body {
        padding: 1.5rem;
    }

    .site-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
}
