@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #555555;
    --border-color: #eaeaea;
    --accent-color: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, .serif-text {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Sticky Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-secondary);
}

.btn-contact {
    background: var(--text-primary);
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 4px;
    transition: opacity 0.3s ease !important;
}

.btn-contact:hover {
    opacity: 0.8;
}

/* Global Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Scrollytelling Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 90vh;
    padding-top: 60px;
}

.hero-text {
    position: sticky;
    top: 150px; /* Sticks as user scrolls past the collage */
    align-self: start;
}

.title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.profile-pic {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 3px solid var(--border-color);
    margin-bottom: 35px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.bio-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bio-list p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.bio-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Image Collage Grid */
.collage-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 15px;
    position: relative;
    padding-bottom: 100px;
}

.collage-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Positioning specific images in the grid */
.img-1 { grid-column: 1 / 9; grid-row: 1 / 4; height: 350px;} /* Scaniverse main */
.img-2 { grid-column: 7 / 13; grid-row: 3 / 6; height: 250px; z-index: 2; margin-top: -40px;} /* Houdini */
.img-3 { grid-column: 2 / 8; grid-row: 5 / 8; height: 300px; z-index: 1;} /* Isaac */
.img-4 { grid-column: 8 / 13; grid-row: 7 / 9; height: 200px; z-index: 2; margin-top: -20px;} /* Unity */
.img-5 { grid-column: 4 / 10; grid-row: 8 / 10; height: 250px; z-index: 1; margin-top: 20px;} /* n8n */

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 80px;
}

.project-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
}

.project-card:hover .card-image {
    transform: scale(1.02);
}

.card-image-placeholder {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-content h4 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.card-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.view-btn {
    font-weight: 500;
    border-bottom: 1px solid var(--text-primary);
    padding-bottom: 2px;
    display: inline-block;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
}

.submit-btn {
    background: var(--text-primary);
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.submit-btn:hover {
    opacity: 0.8;
}

/* Footer */
.site-footer {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
}

.social-dock {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.social-dock a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.social-dock a:hover {
    color: var(--text-primary);
}

/* Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 60px auto;
    overflow: hidden;
    border-radius: 12px;
    background: #f9f9f9;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 450px;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: #ffffff;
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

.carousel-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
}

.carousel-indicator.active {
    background: #ffffff;
}

/* Hamburger Menu Base Style */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .title {
        font-size: 3rem;
    }
    .hero-section {
        grid-template-columns: 1fr;
    }
    .hero-text {
        position: relative;
        top: 0;
        margin-bottom: 60px;
    }
    .project-card {
        grid-template-columns: 1fr;
    }
    .navbar {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    /* Navbar Hamburger Dropdown */
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px 40px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        gap: 20px;
        text-align: left;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .btn-contact {
        text-align: center;
        display: inline-block;
    }

    /* Typography & Hero scaling */
    .title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .hero-section {
        gap: 40px;
        padding-top: 30px;
    }
    
    /* Let the bio text wrap properly on small screens */
    .bio-list p {
        font-size: 1rem;
        word-wrap: break-word;
    }

    /* Stack Collage Grid Images cleanly on mobile */
    .collage-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding-bottom: 20px;
    }
    
    .collage-item {
        height: auto !important;
        margin-top: 0 !important;
        width: 100%;
    }

    /* Experiment Page specific adjustments */
    .container header h1 {
        font-size: 2.2rem !important;
    }
    
    .carousel-slide {
        height: 250px; /* smaller carousel height for mobile */
    }

    .project-card {
        gap: 20px;
    }
    
    .card-content h4 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .navbar {
        padding: 15px 20px;
    }
}
