/* CSS Variables for easy theming */
/* CSS Variables for easy theming */
:root {
    --bg-color: #fbf9f4;           /* Warm off-white — very easy on the eyes */
    --text-color: #2c2c2c;         /* Darker, softer black */
    --accent-color: #0066cc;
    --card-bg: ##f4f1ea;            /* Slightly warmer card background */
    --border-color: #e0dcd4;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #4da6ff;
    --card-bg: #2a2a2a;
    --border-color: #444;
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

nav a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

/* Hero */
.hero {
    text-align: center;
    padding: 4.5rem 1.8rem;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    border-radius: 12px;
    margin-bottom: 3rem;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

/* Cards */
.cards h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 0.8rem;
    color: var(--accent-color);
}

.card-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
    color: #666;
    margin-top: 3rem;
}

[data-theme="dark"] footer {
    color: #aaa;
}

/* Responsive */
@media (max-width: 600px) {
    body { padding: 15px; }
    nav ul { flex-direction: column; gap: 1rem; }
    
}



/* ==================== ACCORDION STYLES ==================== */

.accordion-section {
    margin: 2.5rem 0;
}

/* Intro paragraph in accordion sections (outside <details>) */
.accordion-section > p {
    padding: 1.8rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 2.5rem;
    line-height: 1.75;
}

.details-content {
    padding: 1.8rem 2rem;
    background: var(--card-bg);        /* Pale lilac */
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
}

[data-theme="dark"] details {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

summary {
    padding: 1.4rem 1.8rem;
    background: var(--card-bg);
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s;
}

summary:hover {
    background: #f5f5f5;
}

[data-theme="dark"] summary:hover {
    background: #333;
}

/* Content area */
.details-content {
    padding: 1.8rem 2rem;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
}

/* Nested accordions - Indentation + visual hierarchy */
.details-content details {
    margin-left: 1.8rem;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
}

.details-content details summary {
    padding: 1.1rem 1.5rem;
    font-size: 1.05rem;
    background: var(--card-bg);
}

.details-content .details-content {
    padding-left: 2.2rem;
}

/* Even deeper nesting */
.details-content details details {
    margin-left: 2.2rem;
    border-left-color: #888;
}

/* Optional: Add a nice open indicator */
summary::marker {
    font-size: 1.3rem;
}

/* Make the summary arrow more visible */
details[open] summary {
    border-bottom: 1px solid var(--border-color);
}


/* ==================== LIST STYLING IN ACCORDION SECTIONS ==================== */

/* Base list styling inside accordion content */
.accordion-section ol,
.accordion-section ul,
.details-content ol,
.details-content ul {
    padding-left: 2rem;
    margin-bottom: 1.2rem;
}

/* Nested lists get more indentation */
.accordion-section ol ol,
.accordion-section ol ul,
.accordion-section ul ol,
.accordion-section ul ul,
.details-content ol ol,
.details-content ol ul,
.details-content ul ol,
.details-content ul ul {
    padding-left: 2.2rem;
    margin-top: 0.6rem;
}

/* Even deeper nesting */
.accordion-section ol ol ol,
.accordion-section ol ol ul,
.accordion-section ul ul ul,
.details-content ol ol ol,
.details-content ol ol ul,
.details-content ul ul ul {
    padding-left: 2.4rem;
}

/* List item spacing and markers */
.accordion-section li,
.details-content li {
    margin-bottom: 0.6rem;
    line-height: 1.65;
}

/* Make sure ordered lists use numbers properly */
.accordion-section ol {
    list-style-type: decimal;
}

.accordion-section ol ol {
    list-style-type: lower-alpha;
}

.accordion-section ol ol ol {
    list-style-type: lower-roman;
}


/* ==================== PARAGRAPH SPACING ==================== */

/* Consistent single line spacing between all paragraphs */
p {
    text-align: justify;           /* From previous request */
    margin-top: 0;
    margin-bottom: 1.6rem;         /* Single comfortable line space */
    line-height: 1.7;
}

/* Override for special paragraphs (like the intro card we styled earlier) */
.accordion-section > p {
    margin-bottom: 2.2rem;         /* Slightly larger gap before accordions */
}

/* Optional: Improve readability with better hyphenation */
p {
    hyphens: auto;
    hyphenate-limit-chars: 6 3 2;
}


/* Theme Toggle Button Styling */
#theme-toggle {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Light Mode (default) */
#theme-toggle {
    background-color: #222;
    color: white;
}

/* Dark Mode */
[data-theme="dark"] #theme-toggle {
    background-color: #f0f0f0;
    color: #222;
}

/* Hover effects */
#theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] #theme-toggle:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}