/* --- Theme Variables --- */
:root {
    /* Regular Theme (Default) */
    --bg-color: #f0f0f0;
    --panel-bg: #ffffff;
    --border-color: #333;
    --button-bg: #e0e0e0;
    --button-hover: #d0d0d0;
    --accent-1: #4a90e2;
    --accent-2: #4a90e2;
    --accent-3: #50c878;
    --delete-color: #e24a4a;
    --text-color: #000;
    --shadow: 3px 3px 0px rgba(0,0,0,0.2);
    --input-bg: #ffffff;
    --input-text: #000000;
    --calendar-bg: #ffffff;
    --calendar-text: #000000;
    --calendar-hover: #d0d0d0;
    --calendar-selected: #4a90e2;
    --calendar-inactive: #aaaaaa;
    --list-even: #f8f8f8;
}

/* High Contrast Theme */
.theme-high-contrast {
    --bg-color: #ffffff;
    --panel-bg: #ffffff;
    --border-color: #000000;
    --button-bg: #ffffff;
    --button-hover: #000000;
    --accent-1: #000000;
    --accent-2: #000000;
    --accent-3: #000000;
    --delete-color: #000000;
    --text-color: #000000;
    --shadow: 3px 3px 0px #000000;
    --input-bg: #ffffff;
    --input-text: #000000;
    --calendar-bg: #ffffff;
    --calendar-text: #000000;
    --calendar-hover: #000000;
    --calendar-selected: #000000;
    --calendar-inactive: #666666;
    --list-even: #f0f0f0;
}

/* Dark Theme */
.theme-dark {
    --bg-color: #1a1a1a;
    --panel-bg: #2d2d2d;
    --border-color: #404040;
    --button-bg: #404040;
    --button-hover: #505050;
    --accent-1: #4a90e2;
    --accent-2: #5da8ff;
    --accent-3: #50c878;
    --delete-color: #ff6b6b;
    --text-color: #ffffff;
    --shadow: 3px 3px 0px #000000;
    --input-bg: #404040;
    --input-text: #ffffff;
    --calendar-bg: #404040;
    --calendar-text: #ffffff;
    --calendar-hover: #505050;
    --calendar-selected: #4a90e2;
    --calendar-inactive: #666666;
    --list-even: #363636;
}

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

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: var(--bg-color);
    padding: 20px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

/* Hidden H1 for SEO */
h1 {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Introduction Container */
.intro-container {
    max-width: 900px;
    margin: 0 auto 20px auto;
    padding: 15px;
    background-color: var(--panel-bg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    transition: all 0.3s ease;
    border-radius: 0;
}

.intro-container strong {
    color: var(--accent-1);
}

/* MAIN CONTAINER */
.main-container {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    max-width: 1200px;
    margin: 0 auto 30px auto;
    transition: all 0.3s ease;
    border-radius: 0;
}

.title-bar {
    background: linear-gradient(to right, var(--accent-1) 0%, var(--accent-2) 100%);
    color: white;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    min-height: 40px;
    border-radius: 0;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Times New Roman', Times, serif;
    font-size: 12px;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.theme-icon {
    margin-right: 4px;
}

/* Navigation Bar */
.nav-bar {
    background-color: var(--button-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.nav-bar a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 0;
    transition: background-color 0.2s;
}

.nav-bar a:hover {
    background-color: var(--button-hover);
    text-decoration: underline;
}

/* MAIN CONTENT AREA */
.main-content {
    padding: 30px;
}

/* About Section */
.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    color: var(--accent-1);
    margin-bottom: 20px;
    font-size: 28px;
}

.about-content {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.about-left, .about-right {
    flex: 1;
}

.about-left p, .about-right p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.contact-info {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.contact-icon {
    margin-right: 12px;
    font-weight: bold;
    color: var(--accent-1);
    min-width: 80px;
    transition: all 0.3s ease;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    text-decoration: underline;
    color: var(--accent-2);
}

/* Contact Form Section */
.contact-form-section {
    margin: 40px 0;
    padding: 30px;
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
}

.contact-form-section h3 {
    color: var(--accent-1);
    margin-bottom: 25px;
    font-size: 22px;
}

.airform-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group:nth-child(3),
.form-group:nth-child(4) {
    grid-column: span 2;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--input-text);
    font-family: 'Times New Roman', Times, serif;
    font-size: 14px;
    border-radius: 0;
    transition: all 0.3s ease;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.submit-btn {
    grid-column: span 2;
    padding: 14px 30px;
    background-color: var(--accent-1);
    color: white;
    border: none;
    border-radius: 0;
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-self: center;
    min-width: 200px;
}

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

/* PROJECTS SECTION */
.projects-section {
    margin-top: 40px;
}

.projects-section h3 {
    color: var(--accent-1);
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.project-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--panel-bg);
    border-radius: 0;
    text-align: left;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
}

.project-item:hover {
    background-color: var(--button-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: var(--accent-1);
}

.project-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    flex-grow: 1;
    color: var(--text-color);
}

.project-tech {
    font-size: 12px;
    color: var(--calendar-inactive);
    margin-top: 8px;
    font-style: italic;
    transition: all 0.3s ease;
}

.projects-grid a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-title {
    font-weight: bold;
    color: var(--accent-1);
    text-decoration: none !important;
    display: inline-block;
    margin-bottom: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.project-item:hover .project-title {
    color: var(--accent-2);
    text-decoration: none !important;
}

/* Projects Search Styles */
.projects-search-container {
    margin: 20px auto;
    max-width: 500px;
    text-align: center;
}

.projects-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--input-text);
    font-family: 'Times New Roman', Times, serif;
    font-size: 14px;
    border-radius: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.projects-search-input:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.projects-search-input::placeholder {
    color: var(--calendar-inactive);
}

.projects-search-count {
    margin-top: 8px;
    font-size: 12px;
    color: var(--calendar-inactive);
    font-style: italic;
}

/* Project Item Hidden State */
.project-item.hidden {
    display: none;
}

/* High Contrast Specific Overrides */
.theme-high-contrast .title-bar {
    background: #000000 !important;
    color: #ffffff !important;
}

.theme-high-contrast button:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.theme-high-contrast .nav-bar a:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.theme-high-contrast .project-item:hover {
    background-color: #ffffff !important;
    border-color: #000000 !important;
    color: #000000 !important;
}

/* Dark Mode Specific Overrides */
.theme-dark .intro-container {
    background-color: #2d2d2d;
}

.theme-dark .contact-form-section {
    background-color: #363636;
}

.theme-dark input[type="text"]::placeholder,
.theme-dark textarea::placeholder {
    color: #888;
}

/* Footer */
.footer-container {
    text-align: center;
    margin-top: 0px;
    padding: 0px;
    color: var(--text-color);
}

.copyright-footer {
    margin-bottom: 5px;
    color: #666;
}

.privacy-policy-footer {
    font-size: 0.9em;
}

.privacy-policy-footer a {
    color: var(--accent-1);
}

.privacy-policy-footer a:hover {
    text-decoration: underline;
}

/* For the specific list in your about section */
.about-right ul {
    margin-left: 20px;
    padding-left: 20px;
}

.about-right li {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .airform-form {
        grid-template-columns: 1fr;
    }
    
    .form-group:nth-child(3),
    .form-group:nth-child(4),
    .submit-btn {
        grid-column: span 1;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .title-bar {
        flex-direction: row; /* Keep items in a row */
        justify-content: space-between; /* Space them out */
        align-items: center; /* Align vertically */
        gap: 8px;
        min-height: 50px; /* Ensure enough height */
    }
    
    .theme-toggle {
        align-self: center; /* Center vertically */
        margin-top: 0; /* Remove top margin */
        position: static; /* Remove positioning */
    }
    
    .nav-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .contact-form-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .intro-container {
        font-size: 14px;
        padding: 12px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-item {
        height: auto;
        min-height: 160px;
    }
    
    .nav-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .airform-form {
        gap: 15px;
    }
    
    .submit-btn {
        min-width: 100%;
    }
    
    .main-content {
        padding: 15px;
    }
}