/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

/* CSS Variables */
:root {
    --blue: #2E4C8C;
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-25: rgba(255, 255, 255, 0.25);
    --white-15: rgba(255, 255, 255, 0.15);

    /* Role colors */
    --researcher: #FF6B00;
    --designer: #B8CE52;
    --engineer: #ff99cc;

    /* Legacy swatches remapped to white for compatibility */
    --swatch-1: rgba(255, 255, 255, 0.95);
    --swatch-2: rgba(255, 255, 255, 0.80);
    --swatch-3: rgba(255, 255, 255, 0.60);
    --swatch-4: rgba(255, 255, 255, 0.45);
    --swatch-5: rgba(255, 255, 255, 0.25);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: "DM Sans", sans-serif;
    background-color: var(--blue);
    color: var(--white);
    line-height: 1.2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1 {
    font-family: "Unbounded", sans-serif;
    font-style: normal;
    font-weight: 400;
    margin: 0;
    font-size: 3.5rem;
    line-height: 0.95;
    color: var(--white);
    letter-spacing: -0.02em;
}

h2 {
    font-family: "Unbounded", sans-serif;
    font-style: normal;
    font-weight: 300;
    margin: 0;
    color: var(--white-70);
    font-size: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h3 {
    font-family: "Unbounded", sans-serif;
    font-style: normal;
    font-weight: 400;
    margin: 0;
    color: var(--white);
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

p {
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--white-90);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.caption {
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--white-70);
    font-style: normal;
    line-height: 1.3;
    letter-spacing: 0em;
    display: block;
}

/* Links */
a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

a:active {
    opacity: 0.7;
}

/* Horizontal Rule */
hr {
    background: var(--white-15);
    border: 0;
    height: 1px;
    display: block;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Layout */
.content-wrapper {
    flex: 1;
}

.container {
    max-width: 70%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--blue);
    border-bottom: 1px solid var(--white-15);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-brand {
    font-family: "Unbounded", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: "Unbounded", sans-serif;
    font-size: 0.85rem;
    color: var(--white-70);
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    opacity: 1;
}

/* Role-colored nav links */
.nav-link[href="researcher.html"],
.nav-link[href="../researcher.html"] {
    color: var(--researcher);
}

.nav-link[href="researcher.html"]:hover,
.nav-link[href="../researcher.html"]:hover {
    color: #FF8C00;
    opacity: 1;
}

.nav-link[href="engineer.html"],
.nav-link[href="../engineer.html"] {
    color: var(--engineer);
}

.nav-link[href="engineer.html"]:hover,
.nav-link[href="../engineer.html"]:hover {
    color: #ffb3d9;
    opacity: 1;
}

.nav-link[href="designer.html"],
.nav-link[href="../designer.html"] {
    color: var(--designer);
}

.nav-link[href="designer.html"]:hover,
.nav-link[href="../designer.html"]:hover {
    color: #d4e86b;
    opacity: 1;
}

/* Role title colors — apply to h1 on category pages */
.role-researcher { color: var(--researcher); }
.role-engineer   { color: var(--engineer); }
.role-designer   { color: var(--designer); }

/* Main Content Area */
.main-content {
    margin-top: 6rem;
    padding-bottom: 3rem;
}

/* Back Link */
.back-link {
    display: inline-block;
    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
    color: var(--white-50);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--white);
    opacity: 1;
}

/* Footer */
.site-footer {
    background-color: var(--blue);
    border-top: 1px solid var(--white-15);
    padding: 3rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 70%;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 4rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
    color: var(--white-50);
    text-decoration: none;
    line-height: 1.6;
}

.footer-link:hover {
    color: var(--white);
    opacity: 1;
}

/* White content boxes — for carousels, callouts, important text */
.white-box {
    background-color: var(--white);
    color: var(--blue);
    border-radius: 8px;
    padding: 2rem;
}

.white-box h2,
.white-box h3 {
    color: var(--blue);
}

.white-box p,
.white-box .caption {
    color: var(--blue);
}

.white-box a {
    color: var(--blue);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.project-card {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 250px;
    background: var(--white-15);
    overflow: hidden;
    position: relative;
    border-radius: 10px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Hover Overlay */
.project-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    border-radius: 10px;
    z-index: 10;
}

.project-image:hover .project-image-overlay {
    opacity: 1;
}

.project-image-overlay h3 {
    color: var(--blue);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.project-image-overlay .caption {
    color: var(--blue);
}

/* Project Page Styles */
.project-meta {
    margin: 2rem 0;
}

.project-meta p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Hero with Text Side-by-Side */
.hero-with-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
    align-items: start;
}

.hero-image-half img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.hero-image-half .caption {
    font-size: 0.9rem;
    line-height: 1.4;
}

.hero-text-half h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.hero-text-half h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.hero-text-half h3:first-child,
.hero-text-half h2:first-child {
    margin-top: 0;
}

.hero-text-half p {
    margin-bottom: 1rem;
}

/* How Might We Question Section */
.hmw-question {
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
}

.hmw-question p {
    font-family: "Unbounded", sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--blue);
    margin: 0;
}

.project-hero {
    margin: 2rem 0;
}

.project-hero img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.project-section {
    margin: 3rem 0;
}

.project-section h2 {
    margin-top: 0;
    margin-bottom: 2rem;
}

.project-section h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.project-section h2:first-child {
    margin-top: 0;
}

.project-section img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.project-section p.caption {
    text-align: left;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.project-section p {
    margin-bottom: 1rem;
}

/* Future Development Items */
.future-dev-item {
    margin-bottom: 2rem;
}

.future-dev-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.future-dev-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0;
}

.future-dev-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.future-dev-content p {
    margin: 0;
    line-height: 1.6;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.two-column > div {
    display: flex;
    flex-direction: column;
}

.two-column img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Process Carousel */
.process-carousel {
    margin: 3rem 0;
}

.process-carousel > h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--white-70);
    line-height: 1.3;
}

.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.carousel-slide.active {
    display: grid;
}

.carousel-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.carousel-images img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

.carousel-images img[src*="grain-direction-diagram"] {
    width: 50%;
    margin: 0 auto;
}

.carousel-images img[src*="successful-prints"] {
    width: 50%;
    margin: 0 auto;
}

.carousel-content {
    background-color: var(--white);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.carousel-content h3 {
    color: var(--blue);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.carousel-content p {
    color: var(--blue);
    line-height: 1.6;
}

.carousel-content a {
    color: var(--blue);
    text-decoration: underline;
}

.carousel-content img {
    width: 100%;
    height: auto;
    border-radius: 0;
    margin-top: 1.5rem;
}

/* Carousel Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white);
    color: var(--blue);
    border: none;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background-color: var(--white-70);
}

.carousel-prev {
    left: -80px;
}

.carousel-next {
    right: -80px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--white-25);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator:hover {
    background-color: var(--white-50);
}

.indicator.active {
    background-color: var(--white);
}

/* Resume Filter Buttons */
.resume-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.filter-btn {
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: var(--white-50);
    border: 1px solid var(--white-25);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: var(--white);
    border-color: var(--white-50);
}

.filter-btn.active {
    background-color: var(--white);
    color: var(--blue);
    border-color: var(--white);
}

.resume-item {
    margin-bottom: 2rem;
}

.resume-item:last-child {
    margin-bottom: 0;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.skill-category {
    padding: 1.5rem;
    border: 1px solid var(--white-25);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.skill-category:hover {
    border-color: var(--white-50);
}

.skill-category h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.skill-category ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.skill-category li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: var(--white-90);
    font-family: "DM Sans", sans-serif;
}

.skill-category li:last-child {
    margin-bottom: 0;
}

/* Projects List Layout */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.project-list-item {
    display: flex;
    gap: 2rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
    align-items: flex-start;
}

.project-list-item:hover {
    opacity: 0.8;
}

.project-list-image {
    flex-shrink: 0;
    width: 500px;
    height: 350px;
    overflow: hidden;
    border-radius: 10px;
}

.project-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-list-content {
    flex: 1;
}

.project-list-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-list-content .caption {
    margin-bottom: 1rem;
}

.project-list-content p {
    margin-bottom: 1rem;
}

.learn-more {
    color: var(--white-50);
    font-size: 0.95rem;
    margin-bottom: 0 !important;
}

.project-list-item:hover .learn-more {
    color: var(--white);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.category-btn {
    font-family: "DM Sans", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    background-color: transparent;
    color: var(--white-50);
    border: 1px solid var(--white-25);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-btn:hover {
    color: var(--white);
    border-color: var(--white-50);
}

.category-btn.active {
    background-color: var(--white);
    color: var(--blue);
    border-color: var(--white);
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    background-color: var(--white-15);
    color: var(--white-70);
    border-radius: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 1rem;
    }

    .navigation {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .main-content {
        margin-top: 8rem;
    }

    .footer-content {
        max-width: 100%;
        flex-direction: column;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-with-text {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hmw-question p {
        font-size: 1rem;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .future-dev-content {
        grid-template-columns: 1fr;
    }

    .future-dev-content > div {
        order: 1;
    }

    .future-dev-content > img {
        order: 2;
        margin-top: 1rem;
    }

    .carousel-slide {
        grid-template-columns: 1fr;
    }

    .carousel-slide.active {
        display: flex;
        flex-direction: column;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .carousel-prev {
        left: -20px;
    }

    .carousel-next {
        right: -20px;
    }

    .resume-filters {
        flex-wrap: wrap;
    }

    .filter-btn {
        flex: 1 1 45%;
        min-width: 120px;
    }

    .project-list-image {
        width: 250px;
        height: 175px;
    }
}

@media (max-width: 480px) {
    .project-list-item {
        flex-direction: column;
    }

    .project-list-image {
        width: 100%;
        height: 200px;
    }
}