/* Color Variables */
:root {
    /* Base colors */
    --base03:  #042029;
    --base02:  #073642;
    --base01:  #586e75;
    --base00:  #657b83;
    --base0:   #839496;
    --base1:   #93a1a1;
    --base2:   #eee8d5;
    --base3:   #fdf6e3;
    
    /* Accent colors */
    --yellow:  #b58900;
    --orange:  #cb4b16;
    --red:     #dc322f;
    --magenta: #d33682;
    --violet:  #6c71c4;
    --blue:    #268bd2;
    --cyan:    #2aa198;
    --green:   #859900;
}

/* Theme Configuration */
:root {
    --bg-color: var(--base3);
    --bg-highlights: var(--base2);
    --fg-color: var(--base00);
    --fg-bold: var(--base01);
    --fg-accent: var(--blue);
    --header-color: var(--base01);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: var(--base03);
        --bg-highlights: var(--base02);
        --fg-color: var(--base0);
        --fg-bold: var(--base1);
        --fg-accent: var(--blue);
        --header-color: var(--base1);
    }
}

/* Base Styles */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--fg-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Layout Components */
.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
    background-color: transparent;
}

/* Common Container Styles */
.profile-container,
.portfolio-container,
.resume-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--bg-highlights);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Header Styles */
.profile-header,
.portfolio-header,
.resume-header {
    margin: -2rem -2rem 4rem -2rem;
    padding: 3rem 2rem;
    background-color: var(--orange);
    border-radius: 8px 8px 0 0;
}

.profile-header,
.portfolio-header {
    text-align: center;
}

.resume-header {
    text-align: left;
}

.profile-intro,
.portfolio-intro,
.resume-intro {
    max-width: 800px;
    margin: 0 auto;
}

.profile-intro h1,
.portfolio-intro h1,
.resume-intro h1 {
    color: var(--base3);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tagline,
.resume-intro p {
    color: var(--base3);
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Content Sections */
.profile-content section,
.portfolio-content section {
    margin-bottom: 4rem;
}

/* Section Headers */
.profile-content h2,
.portfolio-content h2,
.resume-content h2 {
    color: var(--fg-accent);
    border-bottom: 2px solid var(--fg-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

/* Table of Contents */
.table-of-contents {
    background-color: var(--bg-highlights);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.table-of-contents h2 {
    color: var(--fg-accent);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.table-of-contents li {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    margin: 0;
}

.table-of-contents a {
    display: block;
    padding: 1.5rem;
    background-color: var(--bg-color);
    color: var(--fg-accent);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    border-left: 4px solid var(--violet);
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
}

.table-of-contents a:hover {
    transform: translateY(-5px);
    background-color: var(--bg-highlights);
    color: var(--orange);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Skills Section */
.skills-content h3,
.skills h3,
.interests h3 {
    color: var(--fg-accent);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skills-content ul,
.skills ul,
.interests ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skills-content li,
.skills li,
.interests li {
    background-color: var(--bg-color);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    color: var(--fg-color);
    font-size: 0.95rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.skills-content li:hover,
.skills li:hover,
.interests li:hover {
    transform: translateY(-2px);
}

/* Resume Cards */
.resume-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.resume-card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resume-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.resume-card h3 {
    color: var(--fg-accent);
    margin-bottom: 1rem;
}

.resume-card p {
    color: var(--fg-color);
}

.resume-card.enterprise { border-left: 4px solid var(--blue); }
.resume-card.games { border-left: 4px solid var(--green); }
.resume-card.portfolio { border-left: 4px solid var(--violet); }

/* Contact Section */
.contact-section {
    text-align: center;
}

.contact-section a {
    color: var(--orange);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-section a:hover {
    color: var(--yellow);
}

/* FreeBSD Logo Section */
.powered-by {
    text-align: center;
    margin-top: 4rem;
}

.logo-container {
    display: inline-block;
    padding: 1rem;
    background-color: var(--base3);
    border-radius: 8px;
}

.logo-container img {
    display: block;
    max-width: 100%;
    height: auto;
}

.powered-by .caption {
    margin-top: 0.5rem;
    color: var(--fg-color);
    font-size: 0.9rem;
    font-style: italic;
}

/* Portfolio Item Styles */
.portfolio-item {
    margin-bottom: 4rem;
    padding: 2rem;
    background-color: var(--bg-highlights);
    border-radius: 8px;
}

.project-meta {
    margin: 1rem 0;
    color: var(--fg-bold);
}

.technologies {
    margin: 1rem 0;
}

.tech-tag {
    display: inline-block;
    background-color: var(--bg-color);
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--fg-color);
}

/* Project Images */
.project-preview-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-preview-images figure {
    margin: 0;
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.project-preview-images figure:hover {
    transform: scale(1.02);
}

.project-preview-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.project-preview-images figcaption {
    margin-top: 1rem;
    color: var(--fg-bold);
    font-style: italic;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
}
/* General Link Styles */
a,
a:visited {
    color: inherit;
    text-decoration: none;
}

/* Portfolio Links */
.portfolio-item h2 a,
.portfolio-item h2 a:visited {
    color: var(--fg-accent);
}

/* Table of Contents Links */
.table-of-contents a,
.table-of-contents a:visited {
    color: var(--fg-accent);
}

/* Resume Card Links */
.resume-card,
.resume-card:visited {
    color: var(--fg-color);
}

/* Contact Section Links */
.contact-section a,
.contact-section a:visited {
    color: var(--orange);
}

/* Header Links */
header h1 a,
header h1 a:visited {
    color: var(--base3);
}

/* Navigation Links */
nav a,
nav a:visited {
    color: var(--fg-accent);
}

/* Video styles */
.project-video {
    margin: 2rem 0;
    width: 100%;
}

.project-video video {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Download section styles */
.download-section {
    margin: 2rem 0;
}

.download-toggle {
    width: 100%;
    padding: 1rem;
    background-color: var(--cyan);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.download-toggle:hover {
    background-color: var(--blue);
}

.download-toggle.active {
    background-color: var(--blue);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.toggle-arrow {
    transition: transform 0.3s ease;
}

.download-container {
    background-color: var(--bg-highlights);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.download-container.active {
    padding: 2rem;
}

/* Download options */
.download-option {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 6px;
}

.download-option h3 {
    color: var(--fg-accent);
    margin-bottom: 1rem;
}

.download-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.download-meta {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--fg-color);
    margin: 0.5rem 0;
}

.download-meta.notarized {
    color: var(--green);
}

/* Controls and Notes sections */
.controls-section,
.notes-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 6px;
}

.controls-section h3,
.notes-section h3,
.downloads-section h3 {
    color: var(--fg-accent);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fg-accent);
}

/* Web version specific */
.download-option.web-version {
    border-left: 4px solid var(--violet);
}


/* Project actions section */
.project-actions {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-button.web-version {
    background-color: var(--violet);
}

.action-button.download-toggle {
    background-color: var(--cyan);
}

.action-button.download-toggle.active {
    background-color: var(--blue);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.toggle-arrow {
    transition: transform 0.3s ease;
}

/* Download container */
.download-container {
    width: 100%;
    background-color: var(--bg-highlights);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.download-container.active {
    padding: 2rem;
}

/* Download options */
.download-option {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 6px;
}

.download-option:last-child {
    margin-bottom: 0;
}

.download-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.download-meta {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--fg-color);
    margin: 0.5rem 0;
}

.download-meta.notarized {
    color: var(--green);
}

/* Controls and Notes sections */
.controls-section,
.notes-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 6px;
}

.controls-section h3,
.notes-section h3,
.downloads-section h3 {
    color: var(--fg-accent);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fg-accent);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .download-container.active {
        padding: 1rem;
    }

    .download-option {
        padding: 0.75rem;
    }

    .download-link {
        width: 100%;
        text-align: center;
    }
    .project-actions {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
    }

    .download-container.active {
        padding: 1rem;
    }

    .download-option,
    .controls-section,
    .notes-section {
        padding: 1rem;
    }
}



/* Responsive Adjustments */
@media (max-width: 900px) {
    .profile-container,
    .portfolio-container,
    .resume-container {
        margin: 1rem;
        padding: 1rem;
    }

    .profile-header,
    .portfolio-header,
    .resume-header {
        margin: -1rem -1rem 2rem -1rem;
        padding: 2rem 1rem;
    }

    .table-of-contents li {
        min-width: 200px;
    }

    .resume-cards {
        grid-template-columns: 1fr;
    }

    .portfolio-item {
        padding: 1rem;
    }

    .project-preview-images {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .project-preview-images img {
        height: 180px;
    }
}

/* Print Styles */
@media print {
    *,
    *::before,
    *::after {
        background-color: transparent !important;
        box-shadow: none !important;
        color: black !important;
    }

    .profile-container,
    .portfolio-container,
    .resume-container,
    .profile-header,
    .portfolio-header,
    .resume-header {
        margin: 0;
        padding: 1rem;
        box-shadow: none;
    }

    a { text-decoration: underline; }
    
    .resume-card {
        page-break-inside: avoid;
        border: 1px solid black;
    }

    .logo-container {
        background-color: white !important;
    }

    .project-preview-images {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-preview-images img {
        height: 150px;
    }

    .project-preview-images figure {
        background-color: transparent;
        box-shadow: none;
        border: 1px solid black;
    }
}