*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
}

/* Load the local Inter font */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --background: #f4f7f6;
    --surface: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent: #ffc904;
    /* UCF Gold */
    --header-bg: #1a1a1a;
    --border-color: rgba(0, 0, 0, 0.08);

    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 6px;
    border: 3px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

body {
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Nav Styling */
.site-header {
    background-color: var(--header-bg);
    color: #ffffff;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    width: 50px;
    height: auto;
}

.header-titles h1 {
    font-size: 2.2rem;
    margin-bottom: 2px;
    color: var(--accent);
    line-height: 1.1;
}

.header-titles p {
    font-size: 1.05rem;
    color: #e0e0e0;
    font-weight: 300;
}

.main-nav ul {
    display: flex;
    gap: 15px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--accent);
}

/* Main Content Layout */
.content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex: 1;
}

/* Reusable Cards */
.card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.project-info h2,
.group-section h2,
.deliverables-section h2,
.project-details h2,
.goals-objectives h2,
.project-design h2,
.architecture-section h2,
.technologies-section h2,
.bom-section h2,
.datasheets-section h2,
.github-section h2,
.acknowledgements-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    padding-bottom: 5px;
}

.acknowledgements-section p{
    margin-top: 20px;
}

.bom-section img{
    display: flex;
    align-self: center;
    justify-self: center;
}

.project-details p {
    margin-top: 15px;
}

.project-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Custom Divider for Consolidated Cards */
.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 40px 0;
}

/* Group Members Grid Layout */
.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 10px;
}

.member-card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    @media (max-width: 768px){
        img{
            width: 80px;
            height: 80px;
        }
    }
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.headshot {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--accent);
}

.member-info h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.member-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.linkedin-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0077b5;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.linkedin-btn:hover {
    background-color: #005885;
}

/* Deliverables & Media Section */
.deliverables-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.media-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Deliverables Nav */
.deliverables-nav {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.deliverables-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.deliverables-links a {
    background-color: var(--surface);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, color 0.2s;
}

.deliverables-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Minimizable Elements (Details/Summary) */
.media-item details {
    width: 100%;
}

.media-item summary {
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    /* Hide default arrow */
}

.media-item summary::-webkit-details-marker {
    display: none;
    /* Hide default arrow in webkit */
}

.media-item summary::after {
    content: "▼";
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.media-item details[open] summary::after {
    transform: rotate(180deg);
}

.media-item summary h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 0;
}

.deliverable-content {
    margin-top: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Document Embeds */
.document-embed {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fdfdfd;
}

/* Video Embeds */
.video-embed {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    html {
        /* Increase padding for anchor links due to stacked sticky header */
        scroll-padding-top: 260px;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .header-container img{
        display: none;
    }

    .main-nav ul {
        justify-content: center;
    }

    .content {
        max-width: 450px;
        margin: 20px auto;
        gap: 20px;
    }

    .card {
        padding: 20px;
    }

    .header-titles h1 {
        font-size: 1.8rem;
    }

    .project-info h2,
    .group-section h2,
    .deliverables-section h2,
    .project-details h2,
    .goals-objectives h2,
    .project-design h2,
    .architecture-section h2,
    .technologies-section h2,
    .bom-section h2,
    .datasheets-section h2,
    .github-section h2,
    .acknowledgements-section h2 {
        font-size: 1.5rem;
    }

    p,
    li,
    .main-nav a,
    .deliverables-links a{
        font-size: 0.8rem;
    }

    .deliverables-links {
        justify-content: center;
    }

    .document-embed {
        height: 50vh;
        min-height: 400px;
    }

    .media-item summary h3 {
        font-size: 1.2rem;
    }

    .tech-item {
        width: 100px;
        padding: 10px;

        span{
            font-size: 0.8rem !important;
        }
        img{
            width: 30px !important;
            height: 30px !important;
        }
    }

    .vertical-video {
        height: auto;
        max-height: 400px;
        width: 100%;
    }

    .bom-section img{
        width: 300px !important;
        height: 200px !important;
    }
}

/* Technologies Grid */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--background);
    padding: 15px 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 120px;
    font-weight: 500;
    font-size: 0.9rem;
}

.tech-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    object-fit: contain;
}

/* Datasheets Section */
.datasheet-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.datasheet-btn {
    background-color: var(--background);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.datasheet-btn:hover {
    background-color: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
}

/* Chart Embeds */
.chart-embed {
    width: 100%;
    max-width: 700px;
    height: 450px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    display: block;
}

.vertical-video {
    height: 500px;
    width: auto;
    max-width: 100%;
}

.horizontal-video {
    width: 100%;
    max-width: 1000px;
    height: auto;
}

/* Pending Content Placeholders */
.pending p {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    width: 100%;
    border: 1px dashed #ccc;
}

/* Footer Styling */
.site-footer {
    background-color: var(--header-bg);
    color: #a0a0a0;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    font-size: 0.9rem;
}

/* Goals & Objectives */
.goals-objectives ul {
    list-style-position: inside;
    color: var(--text-secondary);
    margin-top: 10px;
}

.goals-objectives li {
    margin-bottom: 10px;
    padding-left: 1.5em;
    text-indent: -1.5em;
}

/* Project Design Gallery */
.design-gallery {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(300px, 0.5fr)); */
    gap: 20px;
    margin-top: 20px;
}

.design-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    margin-top: 25px;
}

.design-item img {
    width: 80%;
    max-width: 450px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

/* GitHub Section */
.github-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.github-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #24292e;
    /* GitHub Brand Dark */
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.github-btn:hover {
    background-color: #000000;
}

/* Member Details Override */
.member-details {
    font-size: 0.85rem !important;
    margin-bottom: 15px !important;
    text-align: left;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* Slides Embed */
.slides-embed {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}