/* =========================
   Design Tokens (Globals)
   ========================= */

:root {
    /* Spacing scale (8px rhythm) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 3rem;     /* 48px */

    /* Radius */
    --radius: 6px;

    /* Colors */
    --color-bg: #f7f4d5;
    --color-primary: #105666;
    --color-secondary: #839958; 
    --color-text: #0a3323; 
    --color-muted: #6f7f6a;
    --color-surface: #d3968c; 
}
body.dark {
    --color-bg: #0a3323;
    --color-primary: #0a3741;
    --color-secondary: #d3968c;
    --color-text: #f7f4d5; 
    --color-muted:  #9aa59a;
    --color-surface: #384126;
}



/* =========================
   Base Styles
   ========================= */

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui;
    background-color: var(--color-bg);
    color: var(--color-text);

    display: flex;
    flex-direction: column;

    font-size: 17px;
    line-height: 1.6; /* vertical rhythm */
}

.hero {
    height:60vh;               /* takes 60% of viewport height */
    min-height: 350px;

    background-image: var(--hero-image);
    background-size: cover;       /* fills the header */
    background-position: center;  /* keeps image centered */
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    text-align: center;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.hero-content {
    position: relative; /* sits above overlay */
    padding: 2rem;
}




/* =========================
   Layout
   ========================= */

main {
    flex: 1;
}

header {
    background-color: var(--color-primary);
    color: white;
    padding: var(--space-3);
    text-align: center;
}

nav {
    background-color: var(--color-secondary);
    padding: var(--space-2);
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
   
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: var(--space-3);
}

nav a {
    color: white;
    margin: 0 var(--space-1);
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: white;

    font-size: 1.1rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    margin-left: auto;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.1s ease,
        opacity 0.15s ease;
}
.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.container {
    max-width: 70ch;
    margin: var(--space-3) auto;
    padding: 0 var(--space-2);

}

footer {
    background-color: var(--color-primary);
    color: white;
    text-align: center;
    padding: var(--space-2);
}


/* =========================
   Typography & Content Flow
   ========================= */

p {
    margin-bottom: var(--space-3);
}

h1, h2, h3 {
    margin-top: var(--space-5);
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

h1:first-child,
h2:first-child,
h3:first-child {
    margin-top: 0;
}


/* =========================
   Blog Components
   ========================= */

article {
    background: var(--color-surface);
    padding: var(--space-3);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    min-height: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.date {
    color: var(--color-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-2);
}

article h2 a {
    color: var(--color-secondary);
    text-decoration: none;
}

article h2 a:hover {
    color: #0077cc;
}
article {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
.options-wrapper {
    display: flex;
    justify-content: center;
    margin: var(--space-4) 0;
}
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    max-width: 600px;
    width: 100%;
}
.option {
    min-height: 140px; /* equal height */
    padding: var(--space-3);

    background: transparent;
    border: 2px solid var(--color-secondary);
    border-radius: var(--radius);

    color: var(--color-secondary);
    font-size: 0.95rem;
    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.1s ease;
}
.option:hover {
    background-color: rgba(69, 148, 156, 0.12);
}

.option.active {
    background-color: var(--color-secondary);
    color: white;
}

.option:active {
    transform: scale(0.96);
}
.content {
    display: none;
    margin-top: var(--space-3);
    max-width:600px;
}

.content.active {
    display: block;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.list-card {
    background-image:url('images/list.png');
    background-position: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius);

    text-decoration: none;
    color: var(--color-primary);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    display: flex;
    flex-direction: column;
    gap: var(--space-2);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.list-card h2 {
    margin: 0;
    font-size: 1.25rem;
}

.list-card p {
    color: var(--color-muted);
    line-height: 1.5;
}

.list-card .meta {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--color-);
}



/* =========================
   Images & Media
   ========================= */

img {
    max-width: 100%;
    height: auto;
}

figure {
    margin: var(--space-4) 0;
}

figcaption {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-top: var(--space-1);
}

/* Image floated inside content */
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.about-text {
    max-width: 600px;
}

.corner-image {
    width: 300px;
    flex-shrink: 0;
}


/* =========================
   Lists & Quotes
   ========================= */

ul {
    margin-bottom: var(--space-3);
    padding-left: var(--space-3);
}

li {
    margin-bottom: var(--space-1);
}

blockquote {
    margin: var(--space-4) 0;
    padding-left: var(--space-3);
    border-left: 4px solid var(--color-secondary);
    color: var(--color-muted);
}
