/* ======================================== */
/* Base Styles & Variables                  */
/* ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@600&display=swap');

:root {
  --border-radius: 10px;
  --spacer: 1rem;
  --primary: #C4151C; /* Red color */
  --text: #fff; /* White text */
  --text-dark: #333;
  --link-blue: #3498db;
  --link-height: calc(var(--spacer) * 3.5);
  --timing: 250ms;
  --transition: var(--timing) ease all;
  --link-width: 9rem; /* Slightly reduced default width */
  --header-height: 5rem; /* Reduced header height slightly */
  --mobile-breakpoint: 850px; /* Screen width to switch to mobile menu */

  /* Dark Mode Colors (Default) */
  --bg-color: #f4f4f4;
  --bg-overlay: rgba(0, 0, 0, 0.55);
  --header-bg: rgba(15, 15, 15, 0.9);
  --mobile-menu-bg: rgba(25, 25, 25, 0.98);
  --page-bg: #1a1a1a;
  --page-text: #ffffff;
  --page-heading: #ffffff;
  --border-color: rgba(255, 255, 255, 0.15);
  --footer-bg: rgba(15, 15, 15, 0.95);
}

/* Light Mode Colors */
[data-theme="light"] {
  --bg-color: #ffffff;
  --bg-overlay: rgba(255, 255, 255, 0.95);
  --header-bg: rgba(255, 255, 255, 0.95);
  --mobile-menu-bg: rgba(245, 245, 245, 0.98);
  --text: #333;
  --page-bg: #ffffff;
  --page-text: #2c3e50;
  --page-heading: #1a202c;
  --border-color: #e5e7eb;
  --footer-bg: rgba(240, 240, 240, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

body {
  font-family: 'Open Sans', sans-serif;
  position: relative;
  background-color: var(--bg-color);
  padding-top: var(--header-height); /* Padding for fixed header */
  transition: background-color 0.3s ease;
}

.logo-image {
    width: 200px; /* Adjust as needed */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Important for centering */
    margin-left: auto;
    margin-right: auto; /* Centers the image */
    }
/* Background Image Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-image: url('../images/fantasy-2049567_1280.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--bg-overlay); /* Dynamic overlay based on theme */
    transition: background-color 0.3s ease;
}

/* Light Mode Background Image */
[data-theme="light"] body::before {
    background-image: url('../images/lightmodeBackground.jpg');
}

/* Utility Container */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* ======================================== */
/* Header & Navigation                      */
/* ======================================== */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--header-bg);
  color: var(--text);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  height: var(--header-height);
  z-index: 100;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%; /* Ensure container takes full header height */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header__logo {
  font-weight: bold;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.header__logo a { display: block; min-width: 40px; color: var(--text); }

/* --- Desktop Navigation --- */
.navbar {
  display: flex; /* Displayed by default */
  align-items: center;
  height: 100%;
  overflow: hidden;
}
.navbar__menu { display: flex; position: relative; }
.navbar__item { /* No specific styles needed */ }

.navbar__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Reduced gap */
  align-items: center;
  justify-content: center;
  height: var(--header-height); /* Link takes full header height */
  width: var(--link-width);
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.75rem; /* Slightly smaller text */
  letter-spacing: 0.5px;
  transition: color var(--timing) ease;
  padding: 0 0.5rem; /* Add some horizontal padding */
}

.navbar__link svg {
  width: 22px; height: 22px; /* Slightly smaller icons */
  stroke: var(--text);
  stroke-width: 2;
  transition: stroke var(--timing) ease;
}
.navbar__link span { transition: opacity var(--timing) ease, transform var(--timing) ease; }

.navbar__link:hover { color: var(--primary); }
.navbar__link:hover svg { stroke: var(--primary); }

/* Active page indicator */
.navbar__link.active { color: var(--primary); }
.navbar__link.active svg { stroke: var(--primary); }

/* Focus styles for accessibility */
.navbar__link:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.mobile-menu-toggle:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
a:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
button:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- Mobile Navigation Elements --- */
.mobile-menu-toggle {
    display: none; /* Hidden by default on larger screens */
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text);
    z-index: 101; /* Above header content */
}
.mobile-menu-toggle .icon-close { display: none; } /* Hide close icon initially */
.mobile-menu-toggle.active .icon-menu { display: none; } /* Hide menu icon when active */
.mobile-menu-toggle.active .icon-close { display: block; } /* Show close icon when active */


.mobile-menu {
    display: none; /* Hidden by default */
    position: absolute; /* Position relative to header */
    top: var(--header-height); /* Position below the header */
    left: 0;
    right: 0;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 0; /* Start height at 0 for transition */
    overflow: hidden; /* Hide content until expanded */
    transition: max-height 0.4s ease-out, background-color 0.3s ease; /* Smooth transition */
}
.mobile-menu.open {
    display: block; /* Make visible when open */
    max-height: 500px; /* Set max-height large enough for content */
}

.mobile-menu nav ul {
    padding: 1rem 0;
}
.mobile-menu nav li {
    text-align: center;
}
.mobile-menu nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text);
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.mobile-menu nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


/* --- Responsive Breakpoint --- */
@media (max-width: /* --mobile-breakpoint */ 850px) {
    .navbar {
        display: none; /* Hide desktop nav */
    }
    .mobile-menu-toggle {
        display: block; /* Show mobile hamburger button */
    }
     .header-container {
        /* Adjust padding if needed */
    }
}

/* ======================================== */
/* Theme Toggle Button                      */
/* ======================================== */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--timing) ease, transform 0.2s ease;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    stroke: var(--text);
    stroke-width: 2;
    transition: stroke var(--timing) ease;
}

.theme-toggle:hover svg {
    stroke: var(--primary);
}

/* Hide sun icon by default (dark mode) */
.theme-toggle .icon-sun {
    display: none;
}

/* Show moon icon by default (dark mode) */
.theme-toggle .icon-moon {
    display: block;
}

/* In light mode, show sun icon and hide moon */
[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}


/* ======================================== */
/* Homepage Hero Content (`index.html`)     */
/* ======================================== */
.main { /* Wrapper div */ }

.content {
    position: relative; z-index: 1; width: 100%;
    min-height: calc(100vh - var(--header-height));
    color: var(--text); display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    padding: 20px; box-sizing: border-box;
}
.name { font-size: calc(2.5rem + 2vw); font-weight: bold; margin-bottom: 0.25em; text-shadow: 1px 1px 3px rgba(0,0,0,0.4); }

/* School District Scrolling Animation */
.school-district-container {
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    margin: 0.8em 0 0 0;
    position: relative;
}

.school-district {
    font-size: calc(1rem + 0.5vw);
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    white-space: nowrap;
    display: inline-block;
    animation: scroll-left-to-right 8s linear infinite;
}

@keyframes scroll-left-to-right {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.job-title { font-size: calc(1.2rem + 1vw); margin-bottom: 0.5em; font-weight: 300; letter-spacing: 1px; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }

/* Light mode specific styling for homepage text */
[data-theme="light"] .content {
    color: #1a202c;
}

[data-theme="light"] .name {
    color: #1a202c;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.6);
}

[data-theme="light"] .job-title {
    color: #2c3e50;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.6);
}

[data-theme="light"] .school-district {
    color: #2c3e50;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.6);
}

[data-theme="light"] .explore-link {
    border-color: #1a202c;
    color: #1a202c;
    background-color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .explore-link:hover {
    background-color: #1a202c;
    color: #ffffff;
}
.button-group { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.explore-link { display: inline-block; padding: 12px 30px; border: 2px solid var(--text); color: var(--text); text-decoration: none; font-weight: bold; font-size: 0.9rem; letter-spacing: 0.5px; transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease; border-radius: 5px; background-color: rgba(0, 0, 0, 0.25); cursor: pointer; }
.explore-link:hover { background-color: var(--text); color: #333; transform: translateY(-2px); text-decoration: none; }
.resume-link { /* Optional specific styles */ }

/* ======================================== */
/* Content Pages (about.html, etc.)         */
/* ======================================== */
.page-container {
    position: relative; z-index: 1; max-width: 1000px;
    margin: 2rem auto 3rem auto; padding: 2rem 2.5rem;
    background-color: var(--page-bg); border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1); color: var(--page-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* (Keep styles for .page-container h1, p, a, .portfolio-list, etc. from previous version) */
.page-container h1, .page-container h2, .page-container h3 { color: var(--page-heading); margin-top: 1.5em; margin-bottom: 0.8em; line-height: 1.3; transition: color 0.3s ease; }
.page-container h1 { font-size: 2.2rem; } .page-container h2 { font-size: 1.8rem; } .page-container h3 { font-size: 1.4rem; }
.page-container h1:first-child, .page-container h2:first-child, .page-container h3:first-child { margin-top: 0; }
.page-container p { line-height: 1.7; margin-bottom: 1.2rem; color: var(--page-text); }
.page-container a { color: var(--link-blue); text-decoration: none; } .page-container a:hover { text-decoration: underline; }
.portfolio-list { margin-top: 2rem; padding-left: 0; list-style: none; }
.project-entry { border-bottom: 1px solid var(--border-color); padding: 2rem 0; margin-bottom: 1.5rem; }
.project-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.project-entry h3 { margin-bottom: 0.5rem; font-size: 1.6rem; }
.project-tags span { display: inline-block; background-color: var(--primary); color: #ffffff; padding: 0.3rem 0.8rem; border-radius: 15px; font-size: 0.75rem; font-weight: 500; margin-right: 0.5rem; margin-bottom: 0.75rem; }
.project-links { margin-top: 1.2rem; }
.project-links a { margin-right: 1.5rem; font-weight: 600; display: inline-flex; align-items: center; color: var(--link-blue); }
.project-links a:hover { color: #2980b9; text-decoration: none; }
.project-links .icon-small { width: 1.1em; height: 1.1em; margin-right: 0.4em; stroke-width: 2px; }
.page-container .button { display: inline-block; padding: 0.8rem 1.8rem; background-color: var(--link-blue); color: var(--white); text-decoration: none; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; font-weight: bold; font-size: 0.95rem; }
.page-container .button:hover { background-color: #2980b9; text-decoration: none; transform: translateY(-1px); }

/* ======================================== */
/* Footer                                   */
/* ======================================== */
.footer {
    background: var(--footer-bg);
    color: var(--text);
    padding: 2rem 0 1rem;
    margin-top: 3rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.footer-social a {
    color: var(--text);
    transition: color var(--timing) ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-social a:hover {
    color: var(--primary);
}
.footer-social svg {
    width: 20px;
    height: 20px;
}
.footer-text {
    font-size: 0.9rem;
    opacity: 0.8;
}
.footer-text a {
    color: var(--text);
    text-decoration: underline;
}
.footer-text a:hover {
    color: var(--primary);
}

@media (max-width: 850px) {
    .footer-social {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ======================================== */
/* Contact Page Styles                      */
/* ======================================== */
.contact-info-list {
    list-style: none;
    padding-left: 0;
    margin-top: 2rem;
}

.contact-info-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-info-list i {
    margin-right: 0.8rem;
    width: 20px;
    height: 20px;
    color: var(--link-blue);
    flex-shrink: 0;
}

.contact-closing {
    margin-top: 2rem;
    font-style: italic;
}

/* ======================================== */
/* About Page Styles                        */
/* ======================================== */
.profile-image-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

@media (max-width: 850px) {
    .profile-image {
        width: 200px;
        height: 200px;
    }
}

.experience-list {
    margin-left: 20px;
    margin-bottom: 1.2rem;
}

/* ======================================== */
/* Back to Top Button                       */
/* ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    z-index: 99;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #a01117;
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* ======================================== */
/* Resume Page Styles                       */
/* ======================================== */

/* Loader Animation */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Resume-specific styling */
#resume-content {
    line-height: 1.8;
}

#resume-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
}

#resume-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

#resume-content h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

#resume-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

#resume-content li {
    margin-bottom: 0.5rem;
}

#resume-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

#resume-content strong {
    color: var(--page-heading);
}

#resume-content code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

[data-theme="light"] #resume-content code {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Download button styling */
.download-btn-container {
    text-align: center;
    margin-bottom: 2rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.download-btn:hover {
    background-color: #a01117;
    transform: translateY(-2px);
    text-decoration: none;
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

