:root {
    /* Spotlight spacing variables */
    --spotlight-headline-top: 16vh;
    --spotlight-headline-bottom: 16vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "DM Sans", sans-serif;
    background-color: #f0f0f0;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    font-size: 4rem;
    font-weight: 500;
    line-height: 1;
}

p {
    font-size: 1.5rem;
    line-height: 1;
}

section {
    position: relative;
    width: 100vw;
    height: 100svh;
}

/* Override default section height for content sections */
section.about,
section.outro {
    height: auto;
    min-height: auto;
}

.intro {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 100vh;
    background-color: #f0f0f0;
}

.outro {
    position: relative;
    width: 100%;
    display: block;
    padding: 10rem 2rem;
    background-color: #f0f0f0;
    clear: both;
}

.outro h1 {
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 10rem;
    color: #333;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.outro h1:last-child {
    margin-bottom: 0;
}

.outro .email-link {
    font-size: 1em;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: 0.3em;
    letter-spacing: 0.02em;
}

.outro .email-link:hover {
    color: #000;
    border-bottom-color: #000;
    transform: translateY(-1px);
}

.about-intro {
    width: 100vw;
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60vh 2rem 100vh 2rem;
    background-color: #f0f0f0;
}

.about-intro-container {
    max-width: 1000px;
    width: 100%;
    margin-left: 10%;
    position: relative;
    z-index: 1;
}

.about-intro-text {
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 8rem;
    opacity: 0;
    will-change: opacity;
}

.about-intro-text:last-child {
    margin-bottom: 0;
}

.logo-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    will-change: transform, left, top;
    opacity: 0;
    animation: logoFadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animated-logo {
    width: 500px;
    height: auto;
    will-change: transform;
    transform-origin: top left;
    transition: none;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.1));
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) translateY(0px);
    }
}

/* Responsive logo sizing */
@media (max-width: 1024px) {
    .animated-logo {
        width: 400px;
    }
}

@media (max-width: 768px) {
    .animated-logo {
        width: 320px;
    }
}

@media (max-width: 480px) {
    .animated-logo {
        width: 260px;
    }
}

/* Second Row: Two Columns */
.spotlight-row {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
    position: relative;
}

.spotlight-titles {
    position: relative;
    width: 50%;
    height: 100%;
    flex: 0 0 50%;
    z-index: 15;
    pointer-events: none;
}

.spotlight-titles h1 {
    position: absolute;
    color: #ccc; /* Inactive title color */
    opacity: 0;
    will-change: transform;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.spotlight-titles h1.active {
    color: #111;
    opacity: 1;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08));
    transition: color 0.2s, opacity 0.2s, filter 0.2s;
    z-index: 2;
}

.preview-container {
    position: relative;
    width: 50%;
    flex: 0 0 50%;
    z-index: 20;
    color: #333;
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
}

.preview-img {
    position: relative;
    width: 600px;
    height: 400px;
    max-width: 600px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1rem;
    background-color: #000;
    will-change: width, height, border-radius;
}

.preview-img img {
    opacity: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.preview-text {
    width: 100%;
    max-width: 600px;
    text-align: left;
    opacity: 0;
    will-change: opacity;
    min-height: 120px; /* Reserve space for 3 lines of text to prevent jitter */
}

.preview-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.about {
    position: relative;
    display: block;
    padding: 0 2rem 8rem 2rem;
    width: 100%;
    background-color: #f0f0f0;
    margin-top: -35vh; /* Pull About Us section up slightly, but not too much */
}

.about h2 {
    font-size: 3rem;
    font-weight: 500;
    margin: 0 auto 6rem auto;
    text-align: center;
    max-width: 900px;
}

.team-grid {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.team-member-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.team-member {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.team-member-link:hover .team-member {
    opacity: 0.7;
}

.member-img {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #333;
    background: #f5f5f5;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-member h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.team-member h4 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #666;
}

.team-member p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.spotlight {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f0f0f0;
}

.spotlight-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Section Headline Styles - Pinned within spotlight, matches about-intro structure */
.section-headline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    z-index: 25;
    pointer-events: none;
    background-color: transparent;
}

.section-headline-container {
    max-width: 1000px;
    width: 100%;
    margin-left: 10%;
    position: relative;
}

.section-headline-text {
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.spotlight-headline-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* Mobile Responsive Adjustments */
@media (max-width: 1200px) {
    .team-member {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        text-align: center;
    }
    
    .member-img {
        width: 160px;
        height: 160px;
    }
    
    .team-member h3 {
        font-size: 1.8rem;
    }
    
    .team-member h4 {
        font-size: 1.1rem;
    }
    
    .team-member p {
        font-size: 1rem;
    }
}

/* Mobile Project Items (Stack Layout) */
.mobile-projects-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-project-item {
    width: 100%;
    padding: 2rem 1.5rem;
    opacity: 0;
}

.mobile-project-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-project-img {
    width: 100%;
    height: 50vh;
    border-radius: 8px;
    overflow: hidden;
}

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

.mobile-project-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-project-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.mobile-project-description {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    color: #555;
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .about-intro {
        padding: 50vh 2rem 90vh 2rem;
    }
    
    .about-intro-text {
        font-size: 2rem;
        line-height: 1.55;
        margin-bottom: 8rem;
    }
    
    .section-headline h1 {
        font-size: 1.8rem;
    }
    
    .preview-container {
        width: 45vw;
        right: 3%;
    }
    
    .preview-img {
        height: 35vw;
    }
    
    .preview-title {
        font-size: 1.8rem;
    }
    
    .team-grid {
        gap: 4rem;
    }
    
    .member-img {
        width: 140px;
        height: 140px;
    }
    
    .team-member h3 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    /* About Intro - Mobile Optimized */
    .about-intro {
        padding: 40vh 1.5rem 80vh 1.5rem;
        min-height: auto;
    }
    
    .about-intro-container {
        margin-left: 0;
    }
    
    .about-intro-text {
        font-size: 1.5rem;
        line-height: 1.6;
        margin-bottom: 6rem;
    }
    
    /* Spotlight - Stack Layout */
    .spotlight {
        overflow: visible;
        min-height: auto;
        height: auto;
        position: relative;
        padding-bottom: 4rem;
    }
    
    /* Section headline pinned at top on mobile */
    .section-headline {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        text-align: left;
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        margin-bottom: 1rem;
    }
    
    .section-headline h1 {
        font-size: 1.4rem;
        font-weight: 500;
    }
    
    /* Hide complex title animation on mobile */
    .spotlight-titles {
        display: none;
    }
    
    /* Stack preview container - full width */
    .preview-container {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        transform: none;
        width: 100%;
        padding: 2rem 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .preview-img {
        width: 100%;
        height: 50vh;
        margin-bottom: 0;
    }
    
    /* Circle initial size responsive */
    .preview-img {
        width: 80px;
        height: 80px;
    }
    
    .preview-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .preview-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* General Typography */
    h1 {
        font-size: 2rem;
    }
    
    /* About Section */
    .about {
        padding: 6rem 1.5rem 3rem 1.5rem;
        position: relative;
        z-index: 1;
        background-color: #f0f0f0;
    }

    .about h2 {
        font-size: 2rem;
        margin-bottom: 3rem;
    }    .team-grid {
        gap: 3rem;
    }
    
    .team-member {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .member-img {
        width: 120px;
        height: 120px;
    }
    
    .team-member h3 {
        font-size: 1.4rem;
    }
    
    .team-member h4 {
        font-size: 1rem;
    }
    
    .team-member p {
        font-size: 0.95rem;
    }
    
    /* Outro Section - Mobile */
    .outro {
        padding: 6vh 1.5rem 8vh 1.5rem;
    }
    
    .outro h1 {
        font-size: 1.5rem;
        line-height: 1.6;
        margin-bottom: 4rem;
    }
    
    .outro .email-link {
        font-size: 1em;
        display: block;
        margin-left: 0;
        margin-top: 1rem;
        padding: 0.5rem 0;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .about {
        padding: 5rem 1rem 3rem 1rem;
    }
    
    .about-intro {
        padding: 30vh 1rem 70vh 1rem;
        min-height: auto;
    }
    
    .about-intro-text {
        font-size: 1.2rem;
        line-height: 1.7;
        margin-bottom: 5rem;
    }
    
    .section-headline h1 {
        font-size: 1rem;
    }
    
    /* Mobile Projects - Smaller screens */
    .mobile-project-item {
        padding: 1.5rem 1rem;
    }
    
    .mobile-project-img {
        height: 40vh;
    }
    
    .mobile-project-title {
        font-size: 1.5rem;
    }
    
    .mobile-project-description {
        font-size: 0.9rem;
    }
    
    .preview-container {
        padding: 1.5rem 1rem;
    }
    
    .preview-img {
        height: 40vh;
    }
    
    .preview-title {
        font-size: 1.3rem;
    }
    
    .preview-description {
        font-size: 0.9rem;
    }
    
    .about {
        padding: 2rem 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .about h2 {
        font-size: 1.5rem;
        margin-bottom: 2.5rem;
    }
    
    .team-grid {
        gap: 2.5rem;
    }
    
    .member-img {
        width: 100px;
        height: 100px;
    }
    
    .team-member h3 {
        font-size: 1.3rem;
    }
    
    .team-member h4 {
        font-size: 0.95rem;
    }
    
    .team-member p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Outro - Extra Small Screens */
    .outro {
        padding: 5vh 1rem 6vh 1rem;
    }
    
    .outro h1 {
        font-size: 1.2rem;
        line-height: 1.7;
        margin-bottom: 3rem;
    }
    
    .outro .email-link {
        font-size: 0.95em;
    }
    
    .section-headline {
        padding: 1.5rem 1rem 1rem 1rem;
    }
    
    .section-headline h1 {
        font-size: 1.1rem;
    }
}