/* ---------- COLOR SYSTEM ---------- */
:root {
    --bg: #ededed;
    --text: #0f172a;
    /* slate-900 */
    --muted: #475569;
    /* slate-600 */

    /* Engineering primary */
    --accent: #2563eb;
    /* blue-600 */
    --accent-soft: #dbeafe;
    /* blue-100 */

    /* Biology secondary (very subtle) */
    --bio: #16a34a;
    /* green-600 */
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #020617;
        --text: #e5e7eb;
        --muted: #94a3b8;

        --accent: #60a5fa;
        --accent-soft: #1e3a8a;

        --bio: #4ade80;
    }
}

/* ---------- DARK MODE ---------- */
[data-theme="dark"] {
    --bg: #020617;
    /* near-black */
    --text: #e5e7eb;
    /* slate-200 */
    --muted: #94a3b8;
    /* slate-400 */

    --accent: #60a5fa;
    /* blue-400 */
    --accent-soft: #1e3a8a;
    /* blue-900 */

    --bio: #4ade80;
    /* green-400 */
}

/* ---------- CSS RESET (lightweight) ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

/* ---------- ENTRANCE ANIMATION ---------- */
.hero {
    opacity: 0;
    transform: translateY(12px);
    animation: heroFadeIn 0.8s ease-out forwards;
}

.hero-actions {
    opacity: 0;
    animation: actionsFadeIn 0.6s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes actionsFadeIn {
    to {
        opacity: 1;
    }
}

/* ---------- LAYOUT ---------- */
.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* ---------- HEADER ---------- */
.site-header {
    border-bottom: 1px solid #eee;
    background: #fff;
}

.nav {
    max-width: 1250px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    color: inherit;
}

.nav-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: #444;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #000;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 2rem;
    color: var(--muted);
}

#theme-toggle:hover {
    color: var(--text);
}

/* ---------- TYPOGRAPHY ---------- */
h1 {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 0.75rem;
}

p {
    max-width: 70ch;
    margin-bottom: 1.25rem;
}

ul {
    padding-left: 1.2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* ---------- LINKS ---------- */
a {
    color: var(--accent);
    text-decoration: none;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration: underline;
}

/* ---------- FOOTER ---------- */
.site-footer {
    border-top: 1px solid #eee;
    padding: 2rem 1.5rem;
    font-size: 0.85rem;
    color: #666;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}



/* ---------- HOMEPAGE ---------- */
.hero {
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: 2.6rem;
    max-width: 22ch;
}

.hero-sub {
    font-size: 1.1rem;
    color: #444;
    max-width: 60ch;
    margin-top: 1rem;
}

.hero-actions {
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    margin-right: 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-soft);
}

/* ---------- THEME RIPPLE OVERLAY ---------- */
#theme-ripple {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;

    --ripple-x: 0px;
    --ripple-y: 0px;
    --ripple-size: 0px;

    clip-path: circle(var(--ripple-size) at var(--ripple-x) var(--ripple-y));
    transition: clip-path 0.8s ease-in-out;
    display: none;
}