:root {
    /* Warm, Modern Palette */
    --bg-color: #FDFCF8;
    /* Warm off-white */
    --text-color: #4A4036;
    /* Deep warm brown */
    --accent-color: #D4A373;
    /* Soft warm beige/orange */
    --secondary-bg: #F5EFE6;
    /* Light beige for cards/sections */
    --highlight: #E6CCB2;
    /* Lighter accent */
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --radius: 12px;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

main {
    flex: 1;
}

.landing-page main {
    display: flex;
    /* Ensure landing page content expands */
    flex-direction: column;
}

.landing-page .hero {
    /* min-height: 100vh;  Removed to let flex handle it */
    display: flex;
    flex: 1;
    /* Grow to fill space */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    padding-bottom: 5vh;
    /* Reduce slightly as footer is now in flow */
}

.landing-page {
    background-image: url('src/teacher_sidefront.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    height: 100vh;
    overflow: hidden;
}

.landing-page .hero h1,
.landing-page .hero p {
    color: #F5EFE6;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}



.landing-page footer p {
    color: var(--text-color);
    text-shadow: none;
    margin: 0;
    font-weight: 500;
}




a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.01em;
}

.h2-visual {
    font-size: 2rem;
    letter-spacing: -0.01em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}


h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: #6B5D4D;
    /* Slightly lighter text for body */
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

/* Header & Nav */
/* Header & Nav */
header {
    background: none;
    border: none;
    backdrop-filter: none;
    width: fit-content;
    position: sticky;
    top: 20px;
    margin: 0 auto;
    /* Ensure centering works with sticky */
}

nav {
    background: rgba(245, 239, 230, 0.9);
    /* #F5EFE6 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 3rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    width: auto;
    max-width: none;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--text-color);
}

.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--text-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2C241B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--secondary-bg);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--highlight);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 8rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: #6B5D4D;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Letters Grid */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.letter-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.02);
    height: 100%;
    cursor: pointer;
    /* Indicate clickable */
}

.letter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.05);
}

.letter-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.letter-body {
    font-size: 1rem;
    color: #6B5D4D;
    margin-bottom: 1.5rem;
    white-space: pre-line;
    /* Truncate long text */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.letter-signature {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-align: right;
    font-weight: 600;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 2rem;
}

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

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-color);
}

/* Submit Page */
.submit-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.instruction-box {
    background-color: var(--secondary-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    text-align: left;
}

.instruction-box ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #6B5D4D;
}

.instruction-box li {
    margin-bottom: 0.5rem;
}

.email-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: block;
    margin: 1rem 0;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-underline-offset: 4px;
    word-break: break-all;
}

.email-link:hover {
    color: var(--accent-color);
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 4rem;
}

/* Footer */
/* Footer */
/* Footer */
footer {
    width: fit-content;
    padding: 0.8rem 3rem;
    margin: 0 auto 2rem auto;
    /* Sticky footer positioning: Top auto pushes down, bottom 2rem margin */
    background: rgba(245, 239, 230, 0.9);
    /* #F5EFE6 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    .hero {
        padding: 2rem 0;
        /* Reduced padding further */
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    footer {
        padding: 0.6rem 1.5rem;
        /* Smaller footer pill on mobile */
        width: 90%;
        /* Ensure it fits nicely */
        max-width: 400px;
    }

    /* Logo adjustment for mobile */
    .logo {

        font-size: 1.2rem;
        white-space: nowrap;
        /* Ensure logo stays on one line */
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        /* Positioned just below the header pill */
        left: 50%;
        transform: translateX(-50%) translateY(-20px) scale(0.95);
        /* Start slightly above and smaller */
        width: 90%;
        max-width: 400px;
        /* Constrain width */
        background: rgba(245, 239, 230, 0.95);
        /* Match pill background, slightly more opaque */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-radius: 20px;
        /* Pill-like corners */
        border: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        /* Smooth pop-out easing */
        z-index: 999;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: translateX(-50%) translateY(0) scale(1);
        /* Deployed state */
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .modal-content {
        padding: 2rem;
    }

    .instruction-box {
        padding: 1.5rem;
    }

    .email-link {
        font-size: 1.1rem;
    }
}

/* CTA Button in Nav */
.cta-button {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--text-color);
    color: var(--white) !important;
    /* Override nav link color */
    border-radius: 50px;
    /* Match .btn radius */
    font-weight: 600;
    transition: var(--transition);
}

.cta-button:hover,
.cta-button:focus {
    background: #2C241B;
    /* Darker brown */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-button::after {
    display: none;
    /* Remove the underline effect from nav links */
}

/* Language Switcher */
.lang-switch {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: var(--secondary-bg);
    color: var(--text-color) !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.65rem;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-switch:hover,
.lang-switch:focus {
    background: var(--highlight);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.lang-switch::after {
    display: none;
    /* Remove the underline effect from nav links */
}