/* ============================================
   SHARED CSS — extracted from all pages
   ============================================ */

/* ============================================
   CSS VARIABLES - THE COLOR PALETTE
   ============================================ */
:root {
    --bg-primary: #F4F2F0;
    --bg-secondary: #EAE7E5;
    --text-tagline: #0625EE;
    --text-body: #0625EE;
    --border-color: #0625EE;
    --accent: #0625EE;
    --accent-contrast: #F4F2F0;

    /* Reveal animation */
    --reveal-dy: 16px;
    --reveal-dur: 420ms;
    --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'Geist', -apple-system, sans-serif;

    --container-max: 1200px;
    --container-pad: 24px;
}

/* ---- Dark mode for each palette ---- */
[data-color-mode="dark"] { --bg-primary:#0625EE; --bg-secondary:#0A2FCC; --text-tagline:#F4F2F0; --text-body:#F4F2F0; --border-color:#F4F2F0; --accent:#F4F2F0; --accent-contrast:#0625EE; }

/* Palette 2 */
[data-palette="2"] { --bg-primary:#E3FE8B; --bg-secondary:#D4EF7E; --text-tagline:#7D80C7; --text-body:#7D80C7; --border-color:#7D80C7; --accent:#7D80C7; --accent-contrast:#E3FE8B; }
[data-palette="2"][data-color-mode="dark"] { --bg-primary:#7D80C7; --bg-secondary:#6B6EB5; --text-tagline:#E3FE8B; --text-body:#E3FE8B; --border-color:#E3FE8B; --accent:#E3FE8B; --accent-contrast:#7D80C7; }

/* Palette 3 */
[data-palette="3"] { --bg-primary:#E8E2D8; --bg-secondary:#DDD6CA; --text-tagline:#41431B; --text-body:#41431B; --border-color:#41431B; --accent:#41431B; --accent-contrast:#E8E2D8; }
[data-palette="3"][data-color-mode="dark"] { --bg-primary:#41431B; --bg-secondary:#353714; --text-tagline:#E8E2D8; --text-body:#E8E2D8; --border-color:#E8E2D8; --accent:#E8E2D8; --accent-contrast:#41431B; }

/* Palette 4 */
[data-palette="4"] { --bg-primary:#F4463D; --bg-secondary:#E03D35; --text-tagline:#241F21; --text-body:#241F21; --border-color:#241F21; --accent:#241F21; --accent-contrast:#F4463D; }
[data-palette="4"][data-color-mode="dark"] { --bg-primary:#241F21; --bg-secondary:#1A1617; --text-tagline:#F4463D; --text-body:#F4463D; --border-color:#F4463D; --accent:#F4463D; --accent-contrast:#241F21; }

/* Palette 5 */
[data-palette="5"] { --bg-primary:#F6F1DE; --bg-secondary:#ECE7D2; --text-tagline:#3E3F5B; --text-body:#3E3F5B; --border-color:#3E3F5B; --accent:#3E3F5B; --accent-contrast:#F6F1DE; }
[data-palette="5"][data-color-mode="dark"] { --bg-primary:#3E3F5B; --bg-secondary:#33344D; --text-tagline:#F6F1DE; --text-body:#F6F1DE; --border-color:#F6F1DE; --accent:#F6F1DE; --accent-contrast:#3E3F5B; }

/* Palette 6 */
[data-palette="6"] { --bg-primary:#7BD3FF; --bg-secondary:#6BC5F0; --text-tagline:#3D000F; --text-body:#3D000F; --border-color:#3D000F; --accent:#3D000F; --accent-contrast:#7BD3FF; }
[data-palette="6"][data-color-mode="dark"] { --bg-primary:#3D000F; --bg-secondary:#2E000B; --text-tagline:#7BD3FF; --text-body:#7BD3FF; --border-color:#7BD3FF; --accent:#7BD3FF; --accent-contrast:#3D000F; }

/* Palette 7 */
[data-palette="7"] { --bg-primary:#F9F8F6; --bg-secondary:#EEEDE9; --text-tagline:#9D8C57; --text-body:#9D8C57; --border-color:#9D8C57; --accent:#9D8C57; --accent-contrast:#F9F8F6; }
[data-palette="7"][data-color-mode="dark"] { --bg-primary:#9D8C57; --bg-secondary:#8D7D4D; --text-tagline:#F9F8F6; --text-body:#F9F8F6; --border-color:#F9F8F6; --accent:#F9F8F6; --accent-contrast:#9D8C57; }

/* Palette 8 */
[data-palette="8"] { --bg-primary:#D3B7FA; --bg-secondary:#C5A8ED; --text-tagline:#555555; --text-body:#555555; --border-color:#555555; --accent:#555555; --accent-contrast:#D3B7FA; }
[data-palette="8"][data-color-mode="dark"] { --bg-primary:#555555; --bg-secondary:#484848; --text-tagline:#D3B7FA; --text-body:#D3B7FA; --border-color:#D3B7FA; --accent:#D3B7FA; --accent-contrast:#555555; }

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-body);
    line-height: 1.6;
    min-height: 100vh;
    transition: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

i {
    font-style: normal;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    width: min(var(--container-max), 100% - (var(--container-pad) * 2));
    margin-inline: auto;
}

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
    /* no bottom border */
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 1rem;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-tagline);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.theme-toggle span {
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 4px 2px;
}

.theme-toggle span.active {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.theme-toggle .separator {
    margin: 0 0.1rem;
}

.header-settings {
    opacity: 1;
    transition: opacity 0.3s ease;
    vertical-align: middle;
    color: var(--accent);
    padding: 6px;
    cursor: pointer;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    box-sizing: content-box;
    overflow: visible;
}

.header-settings:hover {
    opacity: 0.6;
}

/* Mobile menu button — hidden on desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--accent);
    padding: 6px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.mobile-menu-btn:hover {
    opacity: 0.6;
}

/* Mobile menu overlay — hidden by default */
.mobile-menu-overlay {
    display: none;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}

.mobile-menu-overlay.open {
    max-height: 300px;
    padding: 1.5rem;
    opacity: 1;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.mobile-menu-nav a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: -0.025em;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-nav a:hover {
    opacity: 0.6;
}

.mobile-menu-nav a.active .nav-label {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mobile-menu-location {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.header-location {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.header-nav a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-tagline);
    letter-spacing: -0.025em;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.header-nav a:hover {
    opacity: 0.6;
}

.header-nav a .nav-label {
    transition: opacity 0.3s ease;
}

.header-nav a.active .nav-label {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Site-wide Hero */
.hero {
    padding: 3rem 0 0;
    position: relative;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 7.5vw, 6rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text-tagline);
    position: relative;
}

.hero-headline i {
    font-style: italic;
}

.hero-line-1 {
    display: block;
    padding-top: 0;
    transition: padding-top 0.455s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-line-1:hover {
    padding-top: 5px;
}

/* 1px underline after Lydia Leiwang: */
.hero::after {
    content: '';
    display: block;
    width: 100vw;
    height: 1px;
    background: var(--border-color);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -18px;
}

/* Breathing dot animation */
@keyframes breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.breathing-dot {
    animation: breathe 3s ease-in-out infinite;
}

/* Randomize mouth talking animation */
@keyframes talk {
    0%, 100% { transform: scaleY(1); }
    15% { transform: scaleY(0.4); }
    30% { transform: scaleY(0.9); }
    45% { transform: scaleY(0.3); }
    60% { transform: scaleY(1); }
    75% { transform: scaleY(0.5); }
    85% { transform: scaleY(0.8); }
}

.randomize-mouth {
    transform-origin: 7.5px 9.375px;
    animation: talk 2s ease-in-out infinite;
}

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
    background-color: var(--bg-primary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.footer-email {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: var(--text-tagline);
    text-decoration: none;
    display: block;
    text-align: right;
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}

.footer-email:hover {
    opacity: 0.7;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.5rem;
}

.footer-copyright {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--accent);
}

.footer-credit {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--accent);
    text-decoration: none;
    pointer-events: none;
}

.footer-lines {
    position: relative;
    height: 23px;
}

.footer-lines::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.footer-lines .tick {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: var(--border-color);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-based reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(var(--reveal-dy));
    transition:
        opacity var(--reveal-dur) var(--reveal-ease),
        transform var(--reveal-dur) var(--reveal-ease);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 31, 61, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 31, 61, 0.4);
}

/* ============================================
   RESPONSIVE - SHARED BREAKPOINTS
   ============================================ */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: nowrap;
        gap: 0;
    }

    .header-location {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        margin-left: auto;
    }

    .mobile-menu-overlay {
        display: flex;
    }

    /* Hero — mobile layout */
    .hero {
        padding: 1.5rem 0 0;
    }

    .hero-headline {
        font-size: clamp(2.5rem, 12vw, 4.5rem);
        line-height: 1.05;
    }

    .hero-line-2 {
        padding-right: 0;
        padding-top: 0.15em;
    }

    .hero-line-2::before {
        top: -0.1em;
    }

    .hero::after {
        height: 18px;
        margin-top: -14px;
        background: repeating-linear-gradient(
            to bottom,
            var(--border-color) 0px, var(--border-color) 1px,
            transparent 1px, transparent 6px
        );
        background-size: 100% 18px;
    }

    /* Footer */
    .site-footer {
        padding: 2rem 0 1.5rem;
    }

    .footer-email {
        font-size: clamp(1.5rem, 5vw, 2rem);
        text-align: center;
        margin-bottom: 1rem;
    }

    .footer-bottom {
        flex-direction: row;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    .footer-copyright,
    .footer-credit {
        font-size: 0.7rem;
    }

    /* Disable hover effects on mobile */
    .hero-line-1:hover,
    .hero-line-2:hover {
        padding-top: 0;
    }

    .footer-email:hover {
        opacity: 1;
    }
}
