/* ROOT VARIABLES */
:root {
    --color-bg: #ffffff;
    --color-text: #222222;
    --color-header-gradient-start: #1e3a8a;
    --color-header-gradient-end: #3b82f6;
    --color-site-title: #ffffff;
    --color-nav-link: #ffffff;
    --color-disclosure: #9ca3af;
    --color-heading-h2: #1e3a8a;
    --color-heading-h3: #1e40af;
    --color-card-bg: #f8fafc;
    --color-card-border: #e5e7eb;
    --color-card-hover-bg: #eef2ff;
    --color-card-hover-border: #c7d2fe;
    --color-cta-bg: #2563eb;
    --color-cta-bg-hover: #1e40af;
    --color-footer-bg: #f1f5f9;
    --color-footer-border: #e2e8f0;
    --color-footer-link: #1e3a8a;
    --color-author-bg: #f8fafc;
    --color-author-border: #e5e7eb;
    --color-author-label: #555555;
    --color-author-name: #1e3a8a;
    --color-author-bio: #444444;

    --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --radius-card: 10px;
    --radius-author: 10px;
    --radius-about-photo: 12px;

    --shadow-about-photo: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* OPTIONAL DARK THEME (ONLY WHEN USER OPTS IN VIA data-theme="dark") */
[data-theme="dark"] {
    --color-bg: #020617;
    --color-text: #e5e7eb;
    --color-header-gradient-start: #0f172a;
    --color-header-gradient-end: #1d4ed8;
    --color-site-title: #ffffff;
    --color-nav-link: #e5e7eb;
    --color-disclosure: #9ca3af;
    --color-heading-h2: #bfdbfe;
    --color-heading-h3: #93c5fd;
    --color-card-bg: #020617;
    --color-card-border: #1f2937;
    --color-card-hover-bg: #0b1120;
    --color-card-hover-border: #1d4ed8;
    --color-cta-bg: #2563eb;
    --color-cta-bg-hover: #1d4ed8;
    --color-footer-bg: #020617;
    --color-footer-border: #1f2937;
    --color-footer-link: #bfdbfe;
    --color-author-bg: #020617;
    --color-author-border: #1f2937;
    --color-author-label: #9ca3af;
    --color-author-name: #bfdbfe;
    --color-author-bio: #e5e7eb;
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .cta-button::after {
        transition: none !important;
    }

    .cta-button {
        transition: background 0.001ms !important;
    }
}

/* GLOBAL RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-base);
}

/* BODY */
body {
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* HEADER — MATCH HOMEPAGE EXACTLY */
.header {
    background: linear-gradient(135deg, var(--color-header-gradient-start), var(--color-header-gradient-end));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 0;
    color: var(--color-site-title);
}

.logo {
    height: 192px;
    width: auto;
}

.site-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
    color: var(--color-site-title);
}

.nav {
    margin-top: 20px;
    display: flex;
    gap: 25px;
}

.nav a {
    color: var(--color-nav-link);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.nav a:hover {
    opacity: 0.7;
}

/* Keep default focus outlines for accessibility */
.nav a:focus-visible,
.cta-button:focus-visible,
.footer-nav a:focus-visible {
    outline: 2px solid #facc15;
    outline-offset: 3px;
}

/* DISCLOSURE */
.disclosure {
    font-size: 0.7rem;
    color: var(--color-disclosure);
    text-align: center;
    margin-top: 4px;
    display: block;
    width: 100%;
}

/* SECTIONS */
.section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.section h2 {
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--color-heading-h2);
}

.section h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--color-heading-h3);
}

.section p,
.section ul {
    margin-bottom: 15px;
}

.section ul {
    padding-left: 20px;
}

/* CARD GRID */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    background: var(--color-card-bg);
    padding: 20px;
    border-radius: var(--radius-card);
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid var(--color-card-border);
    transition: 0.2s ease;
    text-align: center; /* Center all card content */
}

.card h3 {
    text-align: center; /* Center card titles */
}

.card p {
    text-align: center; /* Optional: center descriptions */
}

.card:hover {
    background: var(--color-card-hover-bg);
    border-color: var(--color-card-hover-border);
}

/* CTA BUTTONS */
.cta-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0 8px 0;
    flex-wrap: wrap;
}

.cta-button {
    background: var(--color-cta-bg);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    overflow: hidden; /* required for shimmer */
    transition: background 0.2s ease;
}

/* ⭐ WAVE SHIMMER EFFECT ⭐ */
.cta-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 120%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: 0.4s ease;
}

.cta-button:hover::after {
    left: 120%;
}

.cta-button:hover {
    background: var(--color-cta-bg-hover);
}

/* FOOTER */
.footer {
    background: var(--color-footer-bg);
    padding: 25px;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid var(--color-footer-border);
}

.footer-nav a {
    margin: 0 10px;
    text-decoration: none;
    color: var(--color-footer-link);
    font-weight: 500;
}

/* AUTHOR BLOCK */
.author-block {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin: 40px auto;
    padding: 25px;
    background: var(--color-author-bg);
    border: 1px solid var(--color-author-border);
    border-radius: var(--radius-author);
    max-width: 900px;
}

.author-photo {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    object-position: 50% 35%;
}

.author-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-label {
    font-size: 0.9rem;
    color: var(--color-author-label);
    margin-bottom: 2px;
}

.author-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-author-name);
    margin-bottom: 4px;
}

.author-bio {
    font-size: 0.95rem;
    color: var(--color-author-bio);
    line-height: 1.4;
}

/* ⭐ ABOUT PAGE PHOTO ⭐ */
.about-photo-wrapper {
    text-align: center;
    margin-bottom: 25px;
}

.about-photo {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-about-photo);
    object-fit: cover;
    object-position: 50% 35%;
    box-shadow: var(--shadow-about-photo);
}
