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

:root {
    /* Light Mode */
    --bg-color: #ffffff;
    --text-color: #111;
    --secondary-text-color: #555;
    --link-color: #007aff;
    --header-bg: rgba(255, 255, 255, 0.72);
    --border-color: rgba(0,0,0,0.04);
    --btn-color: #007aff;
    --btn-hover-color: #0062d6;
}

.dark {
    /* Dark Mode */
    --bg-color: #1c1c1e; /* Deep dark gray */
    --text-color: #f0f0f0;
    --secondary-text-color: #a0a0a5;
    --link-color: #0a84ff; /* Slightly brighter blue for contrast */
    --header-bg: rgba(28, 28, 30, 0.72);
    --border-color: rgba(255, 255, 255, 0.08);
    --btn-color: #0a84ff;
    --btn-hover-color: #0072e3;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-top: 58px; 
    /* Smooth transition for non-GSAP properties */
    transition: background-color 0.6s ease-in-out, color 0.6s ease-in-out; 
}

/* NAVBAR (Apple glass blur) */
.header {
    width: 100%;
    height: 58px;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px); 
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 38px;
    z-index: 1000; 
}

.logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--link-color); 
}

/* NAV (Desktop menu) */
.nav a {
    margin-left: 28px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-color);
    transition: 0.25s ease;
}

.nav a:hover {
    color: var(--link-color);
}

/* HERO (Apple-level spacing) */
.hero {
    text-align: center;
    padding: 180px 40px 140px; 
    max-width: 900px; 
    margin: 0 auto;
}

.hero h1 {
    font-size: 58px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--text-color);
    max-width: 700px; 
    margin: 0 auto;
}

.hero p {
    margin-top: 18px;
    font-size: 21px;
    color: var(--secondary-text-color);
    letter-spacing: -0.2px;
}

/* PAGE SECTIONS */
.page {
    max-width: 880px;
    margin: 120px auto;
    padding: 0 40px;
}

.page h2 {
    font-size: 40px;
    font-weight: 650;
    margin-bottom: 18px;
    letter-spacing: -0.4px;
    color: var(--text-color);
}

.page p {
    font-size: 19px;
    color: var(--secondary-text-color);
    margin-top: 12px;
    line-height: 1.75;
}

/* CARDS */
.card {
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 40px 0;
}

/* BUTTON (Apple minimal rounded rectangle) */
.btn {
    padding: 14px 30px;
    border-radius: 12px; 
    background: var(--btn-color);
    color: var(--bg-color);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 28px;
    transition: all 0.22s ease; 
}

.btn:hover {
    background: var(--btn-hover-color);
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2);
}

/* FOOTER */
.footer {
    margin-top: 120px;
    padding: 50px 40px;
    text-align: center;
    color: var(--secondary-text-color);
    font-size: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* --- MOBILE MENU & HAMBURGER STYLES --- */

/* Hamburger Button */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
    z-index: 1001;
}

.menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--header-bg); /* Use the translucent header background */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%); /* Start off-screen */
}

.mobile-menu a {
    font-size: 30px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    margin: 20px 0;
    padding: 10px 0;
}

.mobile-menu a:hover {
    color: var(--link-color);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* --- MOBILE RESPONSIVENESS --- */
@media(max-width: 768px) {
    /* Hide desktop nav and show hamburger */
    .nav { display: none; } 
    .menu-toggle { display: block; }
    
    .header { 
        padding: 0 20px; 
        justify-content: space-between; /* Keep logo and hamburger separate */
    }

    /* Adjust content spacing for mobile */
    .hero { padding: 150px 20px 100px; }
    .hero h1 { font-size: 42px; }
    .hero p { font-size: 18px; }

    .page { 
        margin: 80px auto; 
        padding: 0 20px; 
    }
    .page h2 { font-size: 30px; }
    
    .footer {
        padding: 30px 20px;
        flex-direction: column;
        gap: 15px;
    }
}