/* ===================================
   IMPORTS & FONTS
   =================================== */
@import url('https://fonts.googleapis.com/css?family=League+Spartan:wght@700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

/* to prevent dark mode overriding of website background */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }

    body {
        background: var(--primary-bg) !important;
        color: var(--primary-text) !important;
    }
}

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    /* Colors */
    --primary-bg: #f3eddf;
    --primary-text: #2a3633;
    --accent: #222c28;
    --card-bg: #fff;
    --dropdown-hover-bg: #ece7da;
    --border-light: #eee;
    
    /* Layout */
    --border-radius: 8px;
    --max-width: 1200px;
    --shadow: 0 3px 14px rgba(50,50,50,0.07);
    
    /* Typography */
    --heading-font: 'Montserrat', Arial, sans-serif;
    --nav-font: 'League Spartan', Arial, sans-serif;
    --body-font: 'Montserrat', Arial, sans-serif;
}

/* ===================================
   BASE STYLES
   =================================== */
body {
    background: var(--primary-bg);
    font-family: var(--body-font);
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: 2px;
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 8px;
    line-height: 1.1;
}

/* ===================================
   HEADER STYLES
   =================================== */
header {
    padding: 40px 4vw 0 4vw;
    background: var(--primary-bg);
}

header h1 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

header h1 a:hover,
header h1 a:focus {
    color: var(--accent);
}

/* ===================================
   NAVIGATION STYLES
   =================================== */
.nav-link {
    font-family: var(--nav-font);
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 1em;
    text-transform: uppercase;
}

nav {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

nav ul {
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px;
    position: relative;
}

nav ul li {
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--accent);
    font-family: var(--heading-font);
    cursor: pointer;
    position: relative;
    padding-bottom: 8px;
    transition: color 0.2s;
    white-space: nowrap;
}

nav ul li a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 0 0;
}

nav ul li.active,
nav ul li:hover {
    color: var(--accent);
}

nav ul li.active::after {
    content: "";
    display: block;
    width: 100%;
    border-bottom: 2px solid var(--accent);
    margin-top: 6px;
}

/* ===================================
   HAMBURGER MENU
   =================================== */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--accent);
}


/* ===================================
   DROPDOWN MENUS
   =================================== */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: var(--primary-bg);
    min-width: 340px;
    border: 3px solid var(--accent);
    box-shadow: 0 6px 30px rgba(50,50,50,0.08);
    z-index: 10;
    padding: 24px 0 16px 0; /* Extra top padding creates visual spacing */
}

.dropdown-content li {
    color: var(--accent);
    padding: 14px 32px;
    font-size: 1rem;
    letter-spacing: 2px;
    white-space: nowrap;
    transition: background 0.18s;
    margin-bottom: 0; /* Ensure consistent spacing between dropdown items */
}

.dropdown-content li:hover,
.dropdown-content li:focus {
    background: var(--dropdown-hover-bg);
}

.dropdown-content li a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

.dropdown.active .dropdown-content {
    display: block;
}

/* ===================================
   MAIN CONTENT STYLES
   =================================== */
.main-container {
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 0 36px 0;
}

.centered-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 0;
}

.hr-divider, hr {
    border: none;
    border-top: 3px solid var(--accent);
    margin: 36px 0 36px 0;
    width: 100vw;
    max-width: 96vw;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.about-photo {
    flex-shrink: 0;
    width: 340px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-photo img {
    width: 340px;
    height: 340px;
    object-fit: cover;
    border-radius: 50%;
    border: none;
    box-shadow: var(--shadow);
    background: #e7e2d5;
}

.about-card {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    font-size: 1.1em;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: normal;
}

.about-card img {
    max-width: 100%;
    height: auto;
}

.about-card pre, 
.about-card code {
    overflow-x: auto;
    word-break: break-all;
    white-space: pre-wrap;
    padding: 0.4em 0.6em;
    border-radius: 4px;
    display: block;
    margin-bottom: 1em;
}

/* ===================================
   TEXT CONTENT
   =================================== */
.web-text {
    font-family: var(--body-font);
    color: #333;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.web-text h1 {
    font-size: 1.7em;
    margin-top: 0;
    font-weight: 500;
    margin-bottom: 18px;
}

.web-text h2 {
    font-size: 1.5em;
    margin-top: 0;
    font-weight: 500;
    margin-bottom: 18px;
}

.web-text p {
    margin-bottom: 16px;
    font-size: 1.12em;
    line-height: 1.55;
}

.web-text ul {
    margin-top: 0;
    margin-bottom: 30px;
    padding-left: 20px;
}

.web-text li {
    margin-bottom: 16px;
    font-size: 1.12em;
    line-height: 1.55;
}

/* ===================================
   FOOTER STYLES
   =================================== */
footer ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

footer ul li {
    display: inline-block;
    margin: 0 50px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 1em;
    padding: 0;
    margin: 0;
}

.social-icons li a {
    color: #444;
    font-size: 2em;
    transition: color 0.2s;
    text-decoration: none;
}

.social-icons li a:hover {
    color: #0073b1;
}

footer p {
    margin-top: 30px;
    font-size: 0.7em;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ===================================
   RESPONSIVE STYLES
   =================================== */

/* Tablet/Medium Screens */
@media (max-width: 900px) {
    header {
        padding: 4px 2vw 0 2vw;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    h1 {
        font-size: 2.5rem;
        margin: 0;
        flex-shrink: 1;
    }

    .hamburger {
        display: block;
        flex-shrink: 0;
        font-size: 1.5rem;
    }

    nav {
        order: 3;
        width: 100vw;
        background: var(--primary-bg);
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .hr-divider, hr {
        width: 100vw;
        margin: 5px auto 20px auto;
    }

    .main-container {
        width: 100%;
        max-width: 900px;
        padding: 24px 2vw;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .web-text {
        padding: 0;
        margin: 0;
        font-size: 0.98em;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }

    .web-text h2 {
        font-size: 1.08em;
        margin-bottom: 10px;
    }

    .web-text li {
        font-size: 1em;
        margin-bottom: 10px;
    }

    /* Navigation styles */
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100vw;
        background: var(--primary-bg);
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(.7,.01,.33,1.03);
        margin: 0;
    }

    nav.open .nav-links {
        max-height: 500px;
    }

    .nav-links li {
        width: 100vw;
        padding: 1em 2vw;
    }

    .dropdown-content {
        position: static;
        min-width: unset;
        border: none;
        box-shadow: none;
        padding: 8px 0 0 0;
        margin-top: 0;
        background: var(--primary-bg);
    }

    .dropdown-content li {
        padding: 0.6em 2vw;
        margin-bottom: 0;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }
    
    footer p {
        margin-top: 24px;
        font-size: 0.75em;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Small Mobile Screens */
@media (max-width: 600px) {
    header {
        padding: 4px 2vw 0 2vw;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    h1 {
        font-size: 2.5rem;
        margin: 0;
        flex-shrink: 1;
    }

    .hamburger {
        display: block;
        flex-shrink: 0;
        font-size: 1.5rem;
    }

    .hr-divider, hr {
        width: 100vw;
        margin: 5px auto 20px auto;
    }

    .main-container {
        width: 100%;
        max-width: 100vw;
        padding: 16px 4vw;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .dropdown-content {
        position: static;
        min-width: unset;
        border: none;
        box-shadow: none;
        padding: 8px 0 0 0;
        margin-top: 0;
        background: var(--primary-bg);
    }

    .dropdown-content li {
        padding: 0.6em 2vw;
        margin-bottom: 0;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .web-text {
        padding: 0;
        margin: 0;
        font-size: 0.98em;
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .web-text h2 {
        font-size: 1.08em;
        margin-bottom: 10px;
    }

    .web-text li {
        font-size: 1em;
        margin-bottom: 10px;
        text-align: left;
    }

    .web-text p {
        text-align: left;
    }

    /* Other existing styles... */
    .about-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .about-photo {
        width: 90vw;
        max-width: 340px;
        height: auto;
        margin-bottom: 0;
        margin-top: 0;
    }

    .about-photo img {
        width: 90vw;
        max-width: 340px;
        height: 90vw;
        max-height: 340px;
        object-fit: cover;
    }

    .about-card {
        max-width: 100vw;
        width: 100%;
        margin: 0 auto;
        padding: 1em;
    }

    .social-icons {
        flex-wrap: wrap;
        gap: 0.5em;
    }

    .social-icons li {
        margin: 0 8px 12px 8px;
    }

    .social-icons li a {
        font-size: 1.4em;
    }

    footer {
        padding-left: 0;
        padding-right: 0;
        width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    footer p {
        margin-top: 18px;
        font-size: 0.8em;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* ===================================
   RESPONSIVE IFRAME STYLES
   =================================== */

.iframe-container-youtube {
    position: relative;
    width: 100%;
    margin: 2rem auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.iframe-container-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-container-r {
    position: relative;
    width: 100vw;
    max-width: 1200px;
    margin: 2rem auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    left: 50%;
    transform: translateX(-50%);
}

.iframe-container-r iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .iframe-container-youtube {
        max-width: 90vw;
        margin: 1.5rem auto;
    }

    .iframe-container-r {
        width: 90vw;
        max-width: none;
        margin: 1.5rem auto;
        left: 0;
        transform: none;
    }
}

@media (max-width: 480px) {
    .iframe-container-youtube {
        max-width: 95vw;
        margin: 1rem auto;
    }

    .iframe-container-r {
        width: 90vw;
        max-width: none;
        margin: 1.5rem auto;
        left: 0;
        transform: none;
    }
}