/*  RESET & BASE STYLES  */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Variables */
    --color-text: #f5f5f5;
    --color-text-muted: #4a4a6a;
    --color-accent: #10d5eb;
    --color-accent-2: #e94560;
    --color-surface: rgba(255, 255, 255, 0.97);
    --color-surface-soft: rgba(255, 255, 255, 0.92);
    --color-border: #e8e8f0;
    --color-bg-grad: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #0f3460 100%);
    --color-intro-grad: linear-gradient(135deg, rgba(16, 213, 235, 0.95) 0%, rgba(233, 69, 96, 0.95) 100%);
    --color-link-underline: #10d5eb;

    /* Shadow Variables */
    --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.18);
    --shadow-strong: 0 12px 36px rgba(0, 0, 0, 0.24);

    /* Spacing Variables */
    --space-1: 0.75rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;

    /* Border Radius Variables */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Typography Variables */
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Verdana', Arial, sans-serif;
    --font-heading: 'Georgia', 'Trebuchet MS', serif;
    --fs-base: 1rem;
    --fs-body: 1rem;
    --fs-h1: 2.8rem;
    --fs-h2: 1.8rem;
    --fs-h3: 1.35rem;
    --lh-body: 1.7;
    --lh-heading: 1.2;

    /* Component Variables */
    --card-padding: var(--space-5);
    --card-radius: var(--radius-md);
    --card-border: 5px solid var(--color-accent);
    --card-shadow: var(--shadow-soft);
    --card-shadow-hover: var(--shadow-strong);
    --card-hover-raise: -4px;
    --sidebar-w-tablet: 320px;
    --sidebar-w-desktop: 340px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    color: var(--color-text);
    background: var(--color-bg-grad), url('snow-2620.gif');
    background-attachment: fixed, fixed;
    background-size: cover, cover;
    background-position: center, center;
    background-blend-mode: overlay;
    font: 90% var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Arsilon, 'Stencil Std', fantasy;
    font-weight: 700;
    margin-bottom: var(--space-2);
    letter-spacing: -0.5px;
    line-height: var(--lh-heading);
}

p {
    margin-bottom: var(--space-2);
    line-height: var(--lh-body);
    font-family: var(--font-body);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 2px solid var(--color-link-underline);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

a:hover {
    color: var(--color-accent-2);
    border-bottom-color: var(--color-accent-2);
    text-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

/*  MAIN GRID LAYOUT  */
#css-zen-garden {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4);
    min-height: 100vh;
}

.page-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    grid-template-areas:
        "intro"
        "main"
        "sidebar"
        "footer";
}

/*  HEADER/INTRO SECTION  */
.intro {
    grid-area: intro;
    background: var(--color-intro-grad);
    padding: var(--space-6) var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.intro::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.intro header {
    margin-bottom: var(--space-4);
    text-align: center;
    position: relative;
    z-index: 1;
}

.intro h1 {
    font-size: var(--fs-h1);
    color: #ffffff;
    margin-bottom: var(--space-1);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.intro h2 {
    font-size: var(--fs-h2);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

.summary,
.preamble {
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.95);
}

.summary h3,
.preamble h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.intro a {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
    font-weight: 600;
}

.intro a:hover {
    color: #f0f0f0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/*  MAIN CONTENT FLEXBOX WRAPPER  */
.main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.supporting {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/*  ARTICLE CARDS  */
.main .explanation,
.main .participation,
.main .benefits,
.main .requirements {
    background: var(--color-surface);
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border-left: var(--card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.main .explanation:hover,
.main .participation:hover,
.main .benefits:hover,
.main .requirements:hover {
    transform: translateY(var(--card-hover-raise));
    box-shadow: var(--card-shadow-hover);
    border-left-color: var(--color-accent-2);
}

.main h3 {
    font-size: var(--fs-h3);
    color: var(--color-accent);
    margin-bottom: var(--space-3);
    position: relative;
    padding-bottom: 0.75rem;
}

.main h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #10d5eb, #e94560);
    border-radius: 2px;
}

.main p {
    margin-bottom: 1rem;
    line-height: 1.85;
    color: var(--color-text-muted);
}

.main p:last-child {
    margin-bottom: 0;
}

/*  SIDEBAR LAYOUT  */
.sidebar {
    grid-area: sidebar;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border-left: var(--card-border);
}

.sidebar .wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.design-selection,
.design-archives,
.zen-resources {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-3);
    padding-top: var(--space-1);
}

.design-selection:last-child,
.design-archives:last-child,
.zen-resources:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar h3 {
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-family: var(--font-heading);
}

/*  NAVIGATION FLEXBOX  */
.sidebar nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: calc(var(--space-1) * 0.85);
}

.sidebar nav li {
    padding: var(--space-1) 0;
    border-bottom: 1px solid #f0f0f5;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.sidebar nav li:hover {
    padding-left: 0.5rem;
    border-bottom-color: var(--color-accent-2);
}

.sidebar nav li:last-child {
    border-bottom: none;
}

.design-name {
    display: inline-block;
    font-weight: 700;
    margin-right: 0.5rem;
    color: #1a1a2e;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.designer-name {
    font-style: italic;
    font-weight: 400;
    color: #7a7a8e;
    font-size: 0.9rem;
}

/*  FOOTER  */
footer {
    grid-area: footer;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    padding: var(--space-4);
    background: linear-gradient(135deg, rgba(16, 213, 235, 0.08) 0%, rgba(233, 69, 96, 0.08) 100%);
    border-radius: var(--radius-md);
    grid-column: 1 / -1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 213, 235, 0.2);
}

footer a {
    padding: var(--space-2) var(--space-3);
    background: linear-gradient(135deg, var(--color-accent) 0%, #00b4db 100%);
    color: #0a0a0a;
    border-radius: var(--radius-sm);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 213, 235, 0.3);
}

footer a:hover {
    background: linear-gradient(135deg, #e94560 0%, #ff6b35 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233, 69, 96, 0.4);
}

/*  RESPONSIVE GRID - TABLET  */
@media (min-width: 768px) {
    #css-zen-garden {
        padding: var(--space-4);
    }

    .page-wrapper {
        grid-template-columns: var(--sidebar-w-tablet) 1fr;
        gap: var(--space-5);
        grid-template-areas:
            "sidebar intro"
            "sidebar main"
            "sidebar footer";
    }

    .intro {
        grid-area: intro;
    }

    .main {
        grid-area: main;
    }

    .sidebar {
        grid-area: sidebar;
        position: sticky;
        top: 2rem;
        height: fit-content;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    footer {
        grid-area: footer;
    }
}

/*  RESPONSIVE GRID - DESKTOP  */
@media (min-width: 1024px) {
    #css-zen-garden {
        padding: var(--space-6);
        gap: var(--space-6);
    }

    .page-wrapper {
        gap: var(--space-6);
        grid-template-columns: var(--sidebar-w-desktop) 1fr;
    }

    .intro {
        padding: calc(var(--space-6) + var(--space-2));
    }

    .intro h1 {
        font-size: 3.2rem;
    }

    .intro h2 {
        font-size: 1.75rem;
    }

    .main .explanation,
    .main .participation,
    .main .benefits,
    .main .requirements {
        padding: 3rem;
    }

    .sidebar {
        padding: 3rem;
        top: 3rem;
    }

    .sidebar .wrapper {
        gap: 3rem;
    }
}