/* Color Variables - University of Michigan Colors */
:root {
    /* Theme slots. A company page overrides these four (and the *-rgb
       channel lists below) to re-skin the whole site. See portfolio/companies.js. */
    --maize: #FFCB05;
    --blue: #00274C;
    --blue-light: #003A6B;
    --blue-dark: #001A33;

    /* Space separated channels so translucent rules can theme too:
       rgb(var(--accent-rgb) / 0.2) */
    --accent-rgb: 255 203 5;
    --bg-rgb: 0 39 76;
    --bg-light-rgb: 0 58 107;
    --bg-dark-rgb: 0 26 51;
    --accent-bright: #FFD700;

    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray: #E0E0E0;
    --gray-dark: #666666;
    --text-dark: #1A1A1A;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--white);
    background-color: var(--blue);
    overflow-x: hidden;
}

/* Animation Overlay */
.animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--blue);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

.animation-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.ripple-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 4px solid var(--maize);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 20px rgb(var(--accent-rgb) / 0.5);
}

.ripple:nth-child(1) {
    animation: ripple 1.5s ease-out 0.8s;
}

.ripple:nth-child(2) {
    animation: ripple 1.5s ease-out 1s;
}

.ripple:nth-child(3) {
    animation: ripple 1.5s ease-out 1.2s;
}

@keyframes ripple {
    0% {
        width: 200px;
        height: 200px;
        opacity: 1;
        border-width: 4px;
    }
    100% {
        width: 1000px;
        height: 1000px;
        opacity: 0;
        border-width: 1px;
    }
}

.block-m-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-m {
    width: 180px;
    height: auto;
    transform: translateY(-100vh);
    animation: slamDown 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards,
               shake 0.3s ease-out 0.8s;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

@keyframes slamDown {
    0% {
        transform: translateY(-100vh) scale(0.3) rotate(-5deg);
        opacity: 0;
    }
    40% {
        transform: translateY(20px) scale(1.15) rotate(2deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) scale(1.05) rotate(-1deg);
    }
    60% {
        transform: translateY(5px) scale(1.08) rotate(0.5deg);
    }
    70% {
        transform: translateY(-2px) scale(1.02) rotate(-0.2deg);
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) scale(1.02) rotate(-1deg);
    }
    75% {
        transform: translateY(3px) scale(1.02) rotate(1deg);
    }
}

.name-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    z-index: 3;
    pointer-events: none;
}

.name-left,
.name-right {
    font-size: clamp(5rem, 12vw, 8rem);
    font-weight: 700;
    color: var(--maize);
    opacity: 0;
    position: absolute;
    white-space: nowrap;
    text-shadow: 0 4px 20px rgb(var(--accent-rgb) / 0.5);
}

.name-left {
    animation: fadeInLeft 1s ease-out 1.2s forwards;
    right: 50%;
    margin-right: 110px;
    text-align: right;
}

.name-right {
    animation: fadeInRight 1s ease-out 1.2s forwards;
    left: 50%;
    margin-left: 110px;
    text-align: left;
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hide body content during animation */
body.animating {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgb(var(--bg-rgb) / 0.78);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgb(var(--accent-rgb) / 0.12);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-transparency: reduce) {
    .navbar {
        background-color: var(--blue);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    color: var(--maize);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--maize);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--maize);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--maize);
}

.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.photo-slider {
    position: absolute;
    width: max-content;
    height: 100%;
    display: flex;
    gap: 2rem;
    will-change: transform;
    white-space: nowrap;
}

.photo-slider-left {
    animation: slideLeft 30s linear infinite;
    top: 0;
    align-items: flex-start;
    padding-top: 2rem;
    left: 0;
    will-change: transform;
}

.photo-slider-right {
    animation: slideRight 35s linear infinite;
    flex-direction: row-reverse;
    bottom: 0;
    align-items: flex-end;
    padding-bottom: 2rem;
    right: 0;
    will-change: transform;
}

.photo-item {
    flex-shrink: 0;
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    opacity: 0.75;
    filter: grayscale(40%) brightness(0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.photo-item:hover {
    opacity: 0.95;
    filter: grayscale(20%) brightness(0.8);
}

@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-25%);
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(25%);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgb(var(--bg-rgb) / 0.75) 0%, rgb(var(--bg-light-rgb) / 0.75) 100%);
    z-index: 1;
    backdrop-filter: blur(1px);
}

.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    position: relative;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--maize);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--maize);
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgb(var(--accent-rgb) / 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgb(var(--accent-rgb) / 0.4);
    background-color: var(--accent-bright);
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--maize);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--maize), var(--blue));
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: var(--blue);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background-color: var(--blue-light);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgb(var(--accent-rgb) / 0.3);
    border-color: var(--maize);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.5rem;
    color: var(--maize);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-card p {
    color: var(--white);
    line-height: 1.8;
}

/* Projects Section */
.projects {
    background-color: var(--blue);
}

.projects-grid {
    display: grid;
    gap: 3rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--blue-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgb(var(--accent-rgb) / 0.3);
    border-color: var(--maize);
}

.project-image {
    height: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgb(var(--bg-rgb) / 0.6) 0%, rgb(var(--bg-light-rgb) / 0.6) 100%);
    z-index: 1;
}

.project-image .project-overlay {
    position: relative;
    z-index: 2;
}

.tshirt-robot::before {
    background: linear-gradient(135deg, rgb(var(--bg-rgb) / 0.6) 0%, rgb(var(--bg-light-rgb) / 0.6) 100%);
}

.ballbot::before {
    background: linear-gradient(135deg, rgb(var(--bg-light-rgb) / 0.6) 0%, rgb(var(--bg-rgb) / 0.6) 100%);
}

.haunted-house::before {
    background: linear-gradient(135deg, rgb(var(--bg-dark-rgb) / 0.6) 0%, rgb(var(--bg-rgb) / 0.6) 100%);
}

.robot-3-days::before {
    background: linear-gradient(135deg, rgb(var(--bg-rgb) / 0.6) 0%, rgb(var(--bg-light-rgb) / 0.6) 100%);
}

.first-robotics::before {
    background: linear-gradient(135deg, rgb(var(--bg-rgb) / 0.6) 0%, rgb(var(--bg-light-rgb) / 0.6) 100%);
}

.project-overlay {
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.project-overlay h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--maize);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.project-content {
    padding: 2.5rem;
}

.project-role {
    color: var(--maize);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.project-specs h4 {
    color: var(--maize);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-specs ul {
    list-style: none;
    padding-left: 0;
}

.project-specs li {
    color: var(--white);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.project-specs li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--maize);
    font-weight: bold;
}

.expand-button {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background-color: var(--maize);
    color: var(--blue);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgb(var(--accent-rgb) / 0.3);
}

.expand-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(var(--accent-rgb) / 0.4);
    background-color: var(--accent-bright);
}

.expand-button.expanded {
    background-color: var(--blue-light);
    color: var(--maize);
    border: 2px solid var(--maize);
}

.expand-button.expanded:hover {
    background-color: var(--blue);
}

.project-expanded {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgb(var(--accent-rgb) / 0.3);
    animation: fadeIn 0.3s ease;
}

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

.media-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
    align-items: center;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.project-expanded > .video-container {
    max-width: 100%;
    width: 100%;
}

.cad-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.cad-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.linkedin-container {
    position: relative;
    padding-bottom: 79.2%; /* 399/504 aspect ratio for compact LinkedIn posts */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    background-color: var(--blue-light);
    border-radius: 10px;
}

.media-grid .linkedin-container {
    margin-top: 0;
}

.linkedin-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: none;
    display: block;
}

.pdf-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    max-height: 1200px;
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pdf-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 95%;
    max-width: 1400px;
    max-height: 95vh;
    background-color: var(--blue-light);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--maize);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.project-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--maize);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    transition: all 0.3s ease;
    color: var(--blue);
    box-shadow: 0 4px 15px rgb(var(--accent-rgb) / 0.4);
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    background-color: var(--accent-bright);
    box-shadow: 0 6px 20px rgb(var(--accent-rgb) / 0.6);
}

.modal-close svg {
    width: 30px;
    height: 30px;
}

.modal-body {
    padding: 3rem;
    overflow-y: auto;
    max-height: calc(95vh - 6rem);
    color: var(--white);
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--maize);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-role {
    color: var(--maize);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-description {
    color: var(--white);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.modal-body .project-specs {
    margin-bottom: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.modal-body .project-specs h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.modal-body .project-expanded {
    display: block !important;
    margin-top: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.modal-body .video-container,
.modal-body .linkedin-container {
    margin-top: 0;
}

.modal-body .media-grid {
    margin-top: 0;
}

.image-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.image-collage img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    aspect-ratio: 1;
}

.modal-body .image-collage {
    margin-top: 0;
}

.resume-modal-body {
    padding: 2rem;
}

.resume-pdf-container {
    height: calc(95vh - 8rem);
    min-height: 600px;
    max-height: none;
    margin: 0;
}

.modal-body .pdf-container {
    margin-top: 0;
    height: calc(95vh - 12rem);
    min-height: 700px;
    max-height: none;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--blue);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--maize);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-bright);
}

/* Journey Section */
.journey {
    background-color: var(--blue);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--maize), var(--blue));
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--maize);
    border: 4px solid var(--blue);
    box-shadow: 0 0 0 4px var(--white);
}

.timeline-content {
    background-color: var(--blue-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgb(var(--accent-rgb) / 0.3);
    border-color: var(--maize);
}

.timeline-content h3 {
    color: var(--maize);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content p {
    color: var(--white);
    line-height: 1.8;
}


/* In the News Section */
.news {
    background-color: var(--blue);
    padding: 5rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background-color: var(--blue-light);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgb(var(--accent-rgb) / 0.3);
    border-color: var(--maize);
}

.news-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.news-card h3 {
    color: var(--maize);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.news-card p {
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.news-link {
    color: var(--maize);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.news-card:hover .news-link {
    color: var(--accent-bright);
}

/* Contact Section */
.contact {
    background-color: var(--blue);
    color: var(--white);
}

.contact .section-title {
    color: var(--maize);
}

.contact-description {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    background-color: var(--blue-light);
    border-radius: 15px;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s ease;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-link:hover {
    transform: translateY(-5px);
    background-color: var(--maize);
    color: var(--blue);
    box-shadow: 0 10px 25px rgb(var(--accent-rgb) / 0.3);
}

.contact-icon {
    font-size: 2.5rem;
}

.contact-link span:last-child {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background-color: var(--blue-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--blue);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-image {
        min-height: 200px;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker {
        left: 5px;
        width: 20px;
        height: 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .media-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .image-collage {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        width: 98%;
        max-height: 98vh;
    }

    .modal-body {
        padding: 2rem 1.5rem;
        max-height: calc(98vh - 4rem);
    }

    .modal-title {
        font-size: 2rem;
    }

    .modal-description {
        font-size: 1rem;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .modal-close svg {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .project-content {
        padding: 1.5rem;
    }

    .image-collage {
        grid-template-columns: 1fr;
    }
}

/* ============================================= */
/* Hero additions                                */
/* ============================================= */

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0 auto 2rem;
    max-width: 620px;
    opacity: 0.95;
}

.hero-cta-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-button.cta-secondary {
    background-color: rgb(var(--bg-rgb) / 0.45);
    color: var(--maize);
    border: 2px solid var(--maize);
    box-shadow: none;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.cta-button.cta-secondary:hover {
    background-color: rgb(var(--accent-rgb) / 0.12);
    box-shadow: 0 6px 20px rgb(var(--accent-rgb) / 0.2);
}

.hero-now {
    display: inline-block;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background-color: rgb(var(--bg-dark-rgb) / 0.55);
    border: 1px solid rgb(var(--accent-rgb) / 0.25);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.hero-now strong {
    color: var(--maize);
    font-weight: 600;
}

/* ============================================= */
/* Section intro line                            */
/* ============================================= */

.section-intro {
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 760px;
    margin: -1.5rem auto 2.5rem;
    opacity: 0.95;
}

/* ============================================= */
/* AI Work section                               */
/* ============================================= */

.ai-work {
    background-color: var(--blue);
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.ai-card {
    display: flex;
    flex-direction: column;
    background-color: var(--blue-light);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ai-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgb(var(--accent-rgb) / 0.3);
    border-color: var(--maize);
}

.ai-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.ai-card-title-link {
    color: var(--maize);
    text-decoration: none;
}

/* Case study triggers are buttons (they open the modal, same as robot cards) */
button.ai-card-title-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-align: left;
}

button.ai-card-link {
    background: none;
    border: 0;
    border-bottom: 2px solid rgb(var(--accent-rgb) / 0.4);
    padding: 0 0 2px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.ai-card-title-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ai-card-hook {
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.chip {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--maize);
    background-color: rgb(var(--accent-rgb) / 0.1);
    border: 1px solid rgb(var(--accent-rgb) / 0.45);
}

.ai-card-links {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
}

.ai-card-link {
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid rgb(var(--accent-rgb) / 0.4);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.ai-card-link:hover {
    color: var(--maize);
    border-color: var(--maize);
}

.ai-card-link-demo {
    color: var(--maize);
}

/* ============================================= */
/* Footer                                        */
/* ============================================= */

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-name {
    font-weight: 600;
    color: var(--maize);
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.85;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-links a:hover {
    color: var(--maize);
    opacity: 1;
}

/* ============================================= */
/* Case study content inside the shared modal    */
/* ============================================= */

.case-modal-kicker {
    color: var(--maize);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 0.75rem;
}

.modal-body .case-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--maize);
    text-align: center;
    margin-bottom: 0.75rem;
}

.modal-body .case-summary {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    max-width: 720px;
    margin: 0 auto 1.25rem;
}

.modal-body .chip-row {
    justify-content: center;
    margin-bottom: 2rem;
}

.modal-body .case-section {
    max-width: 720px;
    margin: 0 auto 1.75rem;
    padding: 0;
}

.modal-body .case-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--maize);
    margin-bottom: 0.5rem;
    text-align: left;
}

.modal-body .case-section p {
    line-height: 1.8;
    text-align: left;
}

.modal-body .case-figure {
    margin: 2rem auto;
    max-width: 860px;
    background-color: var(--blue-dark);
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    overflow-x: auto;
}

.modal-body .case-figure svg {
    display: block;
    width: 100%;
    height: auto;
}

.modal-body .case-figure figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
    text-align: center;
}

.modal-body .case-cta-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0 0.5rem;
}

/* ============================================= */
/* Highlights (landing page)                     */
/* ============================================= */

.highlights {
    background-color: var(--blue);
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.highlight-card {
    background-color: var(--blue-light);
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-6px);
    border-color: var(--maize);
    box-shadow: 0 10px 30px rgb(var(--accent-rgb) / 0.25);
}

.highlight-stat {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--maize);
    margin-bottom: 0.6rem;
}

.highlight-label {
    color: var(--white);
    line-height: 1.7;
    opacity: 0.92;
}

@media (max-width: 480px) {
    .highlight-stat {
        font-size: 1.4rem;
    }

    .highlight-card {
        padding: 1.5rem;
    }
}

/* ============================================= */
/* Interaction polish                            */
/* ============================================= */

/* Press feedback on pointer-down, not release */
.cta-button:active,
.expand-button:active,
.contact-link:active,
.ai-card-link:active {
    transform: scale(0.97);
    transition: transform 100ms ease-out;
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--maize);
    outline-offset: 3px;
    border-radius: 4px;
}

section[id] {
    scroll-margin-top: 80px;
}

/* ============================================= */
/* Reduced motion                                */
/* ============================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .photo-slider-left,
    .photo-slider-right {
        animation: none;
    }

    .block-m,
    .ripple,
    .name-left,
    .name-right {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .about-card:hover,
    .highlight-card:hover,
    .project-card:hover,
    .news-card:hover,
    .ai-card:hover,
    .timeline-content:hover,
    .contact-link:hover,
    .cta-button:hover {
        transform: none;
    }

    .cta-button:active,
    .expand-button:active,
    .contact-link:active,
    .ai-card-link:active {
        transform: none;
    }

    .modal-content {
        transition: opacity 0.2s ease;
        transform: none;
    }

    .project-modal.active .modal-content {
        transform: none;
    }
}

