:root {
    --bg-main: #121212;
    --bg-surface: #1e1e1e;
    --accent-teal: #03DAC6;
    --accent-purple: #BB86FC;
    --color-error: #CF6679;
    --text-high: #ffffff;
    --text-med: #e0e0e0;
    --text-low: #aaaaaa;
    --border: #333333;
    --nav-height: 70px;
}

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

body {
    background: url('../images/IMG_5584.JPG');
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: var(--bg-main);
    color: var(--text-med);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    padding-top: var(--nav-height);
    position: relative;
    z-index: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    animation: darkenBackground 2s forwards;
}

body.bg-photo-voyager {
    background-image: url('../images/Background Aegis Photo Manager.JPG');
}

@keyframes darkenBackground {
    from {
        background-color: rgba(18, 18, 18, 0);
    }

    to {
        background-color: rgba(18, 18, 18, 0.7);
    }
}

h1,
h2,
h3,
h4 {
    color: var(--text-high);
    font-weight: 700;
}

a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #02b3a3;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-teal);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-med);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent-teal);
}

@media (max-width: 768px) {
    .logo {
        font-size: 1rem;
    }

    .logo-img {
        height: 24px;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }
}

/* Sections */
section {
    padding: 50px 0;
}

.section-alt {
    background-color: rgba(30, 30, 30, 0.4);
}

.hero {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.2) 0%, rgba(30, 30, 30, 0.4) 100%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-low);
}

/* Components */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--accent-teal);
    color: var(--bg-main);
}

.btn-primary:hover {
    background-color: #02b3a3;
    color: var(--bg-main);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #333;
    color: var(--text-high);
}

.btn-secondary:hover {
    background-color: #444;
    color: var(--text-high);
}

.btn-accent {
    background-color: var(--accent-purple);
    color: var(--bg-main);
}

.btn-accent:hover {
    background-color: #a370e0;
    color: var(--bg-main);
    transform: translateY(-2px);
}

.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--accent-teal);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-accent {
    border-left: 4px solid var(--accent-teal);
}

.card-accent-purple {
    border-left: 4px solid var(--accent-purple);
}

.card-center {
    text-align: center;
    align-items: center;
}

.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 13px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--accent-teal);
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background-color: rgba(30, 30, 30, 0.8);
    text-align: center;
}

.footer p {
    color: var(--text-low);
    font-size: 0.9rem;
}

/* Utility */
.mb-20 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Gallery & Lightbox */
.gallery-grid {
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    aspect-ratio: 16/10;
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 218, 198, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    cursor: default;
    border: 1px solid var(--border);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: var(--accent-teal);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-low);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: var(--accent-teal);
    border-bottom-color: var(--accent-teal);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Command Box */
.command-box {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    color: #00ff00;
    overflow-x: auto;
}

.command-line {
    display: block;
    margin-bottom: 10px;
}

.command-line:last-child {
    margin-bottom: 0;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text-med);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: sans-serif;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-teal);
}

.copy-btn.copied {
    background: var(--accent-teal);
    color: var(--bg-main);
    border-color: var(--accent-teal);
}

.coming-soon {
    text-align: center;
    padding: 60px 0;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}


/* Inline Email Options */
.inline-email-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.btn-gmail {
    background-color: #EA4335;
    color: white;
    border: 1px solid #EA4335;
}

.btn-gmail:hover {
    background-color: #D33828;
    color: white;
    transform: translateY(-2px);
}

.btn-outlook {
    background-color: #0078D4;
    color: white;
    border: 1px solid #0078D4;
}

.btn-outlook:hover {
    background-color: #006ABD;
    color: white;
    transform: translateY(-2px);
}

.btn-yahoo {
    background-color: #6001D2;
    color: white;
    border: 1px solid #6001D2;
}

.btn-yahoo:hover {
    background-color: #5000B0;
    color: white;
    transform: translateY(-2px);
}

.btn-default-mail {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-med);
}

.btn-default-mail:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-high);
    border-color: var(--text-high);
    transform: translateY(-2px);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 30px;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.cookie-banner.active {
    display: flex;
}

.cookie-content p {
    color: var(--text-med);
    font-size: 0.95rem;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        bottom: 10px;
        padding: 20px;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Light Theme Overrides */
@media (prefers-color-scheme: light) {
    :root {
        --bg-main: #f5f5f5;
        --bg-surface: #ffffff;
        --accent-teal: #008B8B;
        --accent-purple: #6200EE;
        --color-error: #B00020;
        --text-high: #121212;
        --text-med: #333333;
        --text-low: #666666;
        --border: #dddddd;
    }

    @keyframes darkenBackground {
        from {
            background-color: rgba(255, 255, 255, 0);
        }

        to {
            background-color: rgba(245, 245, 245, 0.85); /* washed out overlay for the background image */
        }
    }

    nav {
        background: rgba(255, 255, 255, 0.85);
    }

    .hero {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(240, 240, 240, 0.8) 100%);
    }

    .section-alt {
        background-color: rgba(240, 240, 240, 0.6);
    }

    .footer {
        background-color: rgba(240, 240, 240, 0.8);
    }

    .btn-secondary {
        background-color: #e0e0e0;
        color: var(--text-high);
    }

    .btn-secondary:hover {
        background-color: #cccccc;
        color: var(--text-high);
    }

    .cookie-banner {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }

    .btn-default-mail:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    .card:hover {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* lighter shadow for hover */
    }
    
    .pill {
        background: var(--bg-surface);
    }
}