/* Custom font fallbacks for Geist fonts */
@font-face {
    font-family: 'Geist';
    src: local('Inter');
    font-weight: 600;
}

@font-face {
    font-family: 'Geist Mono';
    src: local('JetBrains Mono');
    font-weight: 500;
}

/* Design system variables from Figma */
:root {
    --text-color-primary: #191919;
    --heading-font: 'Geist', 'Inter', sans-serif;
    --body-font: 'Geist Mono', 'JetBrains Mono', monospace;
}

body {
    color: var(--text-color-primary);
}

.heading-01 {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 88px;
    line-height: 0.75;
    letter-spacing: -1.76px;
    display: block;
}

.body-01 {
    font-family: var(--body-font);
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    letter-spacing: -0.8px;
}

/* Custom mask styles for images */
.mask-image-1 {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 408 390"><rect width="408" height="390" rx="24" fill="white"/></svg>');
    mask-size: 408px 390px;
    mask-position: center;
    mask-repeat: no-repeat;
}


/* Navbar styles */
.link-text-01 {
    font-family: var(--body-font);
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: -0.56px;
}

.nav-link {
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    text-decoration: underline;
}

/* Secondary text color */
.text-secondary {
    color: #9a9a9a;
}

/* Image gallery masks */
.image-mask {
    overflow: hidden;
    border-radius: 24px;
    position: relative;
}

/* Personal photos - ensure they stay within margins on desktop */
.about-section .flex.gap-\[62px\] {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.about-section .flex.gap-\[62px\] > div {
    max-width: calc(33.333% - 41.33px); /* 33.333% minus gap space */
    min-width: 0;
    flex: 1;
    box-sizing: border-box;
    overflow: hidden;
}

/* Ensure image containers respect boundaries */
.about-section .flex.gap-\[62px\] > div > div {
    max-width: 100%;
    overflow: hidden;
}

/* ===================================== 
   SIMPLE HAMBURGER MENU
   ===================================== */

/* Hamburger button */
.hamburger {
    display: none; /* Hidden by default, shown in media queries */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    margin: 4px 0;
    transition: 0.3s;
}

/* Hamburger X animation */
.hamburger.open .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile menu overlay */
.mobile-menu {
    display: none; /* Completely hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(21, 21, 21, 0.98);
    z-index: 9999;
}

/* When open, show as flex */
.mobile-menu.open {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Close button */
.mobile-menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-close:hover {
    color: #ff2525;
}

/* Menu links container */
.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-menu-content a,
.mobile-menu-content button {
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Geist Mono', monospace;
}

.mobile-menu-content a:hover,
.mobile-menu-content button:hover {
    color: #ff2525;
}

/* Tablet Breakpoint: 581px to 1175px */
@media screen and (max-width: 1175px) and (min-width: 581px) {
    /* Hide desktop and tablet hero, show phone hero */
    .hero-desktop,
    .hero-tablet {
        display: none !important;
    }
    
    .hero-phone {
        display: flex !important;
    }
    
    /* Phone typography for tablet */
    .heading-01-phone {
        font-family: var(--heading-font);
        font-weight: 600;
        font-size: 64px;
        line-height: 0.75;
        letter-spacing: -1.28px;
        display: block;
    }
    
    .body-01-phone {
        font-family: var(--body-font);
        font-weight: 400;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: -0.64px;
    }
    
    /* Show hamburger on tablet */
    .hamburger {
        display: block !important;
    }
    
    /* Adjust navbar for tablet */
    nav > div {
        justify-content: space-between !important;
    }
    
    /* Footer responsive on tablet */
    .footer-responsive {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    /* Hide about section on tablet to avoid duplication with phone hero */
    .about-section {
        display: none !important;
    }
    
    /* Adjust bottom section text for tablet */
    [data-name="hero-section"] .flex.items-end.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    
    [data-name="hero-section"] .flex.items-end.justify-between .mr-8 {
        margin-right: 0;
    }
    
}

/* Default: Show desktop, hide tablet */
.hero-desktop {
    display: flex;
}

.hero-tablet {
    display: none;
}

/* Phone Breakpoint: Below 580px */
@media screen and (max-width: 580px) {
    /* Hide desktop and tablet hero */
    .hero-desktop,
    .hero-tablet {
        display: none !important;
    }
    
    .hero-phone {
        display: flex !important;
    }
    
    /* Smaller heading for phone */
    .heading-01-phone {
        font-family: var(--heading-font);
        font-weight: 600;
        font-size: 64px;
        line-height: 0.75;
        letter-spacing: -1.28px;
        display: block;
    }
    
    /* Smaller body text for phone */
    .body-01-phone {
        font-family: var(--body-font);
        font-weight: 400;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: -0.64px;
    }
    
    /* Show hamburger on phone */
    .hamburger {
        display: block !important;
    }
    
    /* Adjust navbar to 16px horizontal padding */
    nav {
        padding: 1.5rem 1rem !important;
    }
    
    nav > div {
        justify-content: space-between !important;
        width: 100% !important;
    }
    
    nav > div > div:first-child {
        width: auto !important;
        justify-content: flex-start !important;
    }
    
    /* Ensure 16px page gutters */
    body {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    main {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .mobile-content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Index mobile: ensure content stretches margin-to-margin and text stays within gutters */
    .mobile-content > div,
    .mobile-content .content-stretch,
    .mobile-content .image-container,
    .mobile-content a {
        width: 100% !important;
        max-width: 100% !important;
    }
    .mobile-content h1,
    .mobile-content p {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }
    .mobile-content img,
    .mobile-content video {
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    /* Force image sections to span full width inside mobile content */
    .mobile-content .basis-0 {
        flex-basis: 100% !important;
    }
    .mobile-content .grow,
    .mobile-content .image-container > a {
        width: 100% !important;
        max-width: 100% !important;
    }
    .mobile-content .image-container > a > img,
    .mobile-content .image-container > a > video {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    
    /* Hide about section on phone */
    .about-section {
        display: none !important;
    }
    
    /* Footer responsive on phone */
    .footer-responsive {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Hero section padding: 16px */
    [data-name="hero-section"] {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Index mobile title size and line-height override */
    .mobile-content .intro-title {
        font-size: 72px !important;
        line-height: 72px !important; /* override leading-[90px] */
        letter-spacing: -0.02em !important;
        width: 100% !important; /* override w-[415px] */
    }
}

/* Default: Hide phone hero */
.hero-phone {
    display: none;
}

/* Footer - show by default on all breakpoints */
.footer-responsive {
    display: flex;
}

/* Phone Carousel */
.phone-carousel {
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}
