/* Zen Template Base Styles — Minimal Portfolio */

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

:root {
    /* Default color variables - overridden by inline styles */
    --primary-color: #1A1A1A;
    --secondary-color: #6B7280;
    --accent-color: #0066FF;
    --background-color: #FFFFFF;
    --text-color: #374151;
    --text-light-color: #9CA3AF;
    --border-color: #E5E5E5;
    --muted-color: #9CA3AF;

    /* Derived colors */
    --text-dark-color: #1F2937;
    --separator-color: #D1D5DB;
    --hover-color: #111827;
    --placeholder-bg: #F9FAFB;
    --form-bg: #F9FAFB;

    /* Typography */
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --base-font-size: 16px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 80px;

    /* Layout */
    --nav-height: 64px;
    --max-width: 1200px;
}

body {
    font-family: var(--font-family);
    font-size: var(--base-font-size);
    line-height: 1.7;
    color: var(--text-color);
    background: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==============================
   MINIMAL TOP BAR
   ============================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--background-color);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.nav-brand {
    flex-shrink: 0;
    z-index: 102;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    transition: opacity 0.2s ease;
}

.nav-logo img {
    max-height: 32px;
    width: auto;
    display: block;
}

.nav-logo:hover {
    opacity: 0.7;
}

/* Right side controls */
.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    z-index: 102;
}

/* Hamburger Menu Toggle — always visible (minimal layout) */
.mobile-menu-toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 32px;
    height: 32px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(2.5px, 2.5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* ==============================
   FULL-SCREEN NAVIGATION OVERLAY
   ============================== */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background-color);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-overlay-content {
    text-align: center;
}

.nav-overlay-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.nav-overlay-content li {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-overlay.active li {
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active li:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.active li:nth-child(2) { transition-delay: 0.15s; }
.nav-overlay.active li:nth-child(3) { transition-delay: 0.2s; }
.nav-overlay.active li:nth-child(4) { transition-delay: 0.25s; }
.nav-overlay.active li:nth-child(5) { transition-delay: 0.3s; }
.nav-overlay.active li:nth-child(6) { transition-delay: 0.35s; }
.nav-overlay.active li:nth-child(7) { transition-delay: 0.4s; }
.nav-overlay.active li:nth-child(8) { transition-delay: 0.45s; }

.nav-overlay-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 4px 0;
}

.nav-overlay-content a:hover {
    color: var(--accent-color);
}

.nav-overlay-content a.active {
    color: var(--accent-color);
}

/* Page Groups in Overlay */
.nav-group-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-group-label {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--secondary-color);
    cursor: default;
}

.nav-sublist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: 0;
}

.nav-sublist a {
    font-size: 20px !important;
    font-weight: 400 !important;
    color: var(--secondary-color) !important;
}

.nav-sublist a:hover {
    color: var(--accent-color) !important;
}

/* Language Switcher */
.nav-lang {
    display: flex;
    align-items: center;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.language-switcher a {
    color: var(--muted-color);
    text-decoration: none;
    padding: 2px 4px;
    transition: color 0.2s ease;
}

.language-switcher a:hover,
.language-switcher a.active {
    color: var(--primary-color);
}

.language-switcher .divider {
    color: var(--border-color);
    font-size: 11px;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.main-content {
    margin-top: var(--nav-height);
    flex: 1;
}

.content-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-3xl) var(--spacing-xl);
}

/* ==============================
   FOOTER
   ============================== */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--background-color);
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    font-size: 13px;
    color: var(--text-light-color);
    margin: 0;
}

.footer-right {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-right a {
    font-size: 13px;
    color: var(--text-light-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: var(--primary-color);
}

/* ==============================
   TYPOGRAPHY
   ============================== */
h1 {
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: var(--spacing-xl);
    color: var(--primary-color);
}

h2 {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

h3 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.4;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    line-height: 1.7;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-color);
}

/* ==============================
   OFFLINE / PREVIEW BANNERS
   ============================== */
#offline-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #F59E0B;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9999;
    font-family: var(--font-family);
    font-size: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

#offline-banner.is-hidden {
    display: none;
}

.offline-banner-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.offline-banner-content strong {
    font-weight: 600;
    font-size: 13px;
}

.offline-banner-content span {
    opacity: 0.9;
    font-size: 12px;
}

#offline-banner button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

#offline-banner-mini {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #F59E0B;
    color: white;
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-size: 18px;
    font-weight: 600;
}

#offline-banner-mini.is-hidden {
    display: none;
}

/* ==============================
   MOBILE RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }

    .content-container {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .footer-container {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-overlay-content a {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }

    .nav-logo {
        font-size: 16px;
    }

    .nav-overlay-content a {
        font-size: 22px;
    }
}

/* ==============================
   UTILITIES
   ============================== */
.is-hidden {
    display: none !important;
}
