/* Reset and Base Styles */
:root {
    --bg-color: #050505;
    --surface-color: #0a0a0a;
    --text-color: #f5f5f5;
    --text-muted: #a0a0a0;
    --accent-color: #f0f0f0;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --container-max: 1400px;
    --spacing-sm: 1rem;
    --spacing-md: 2.5rem;
    --spacing-lg: 5rem;
    --spacing-xl: 10rem;
    --transition-smooth: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: var(--text-muted);
}

/* Header (Glassmorphism) */
.header {
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 5, 0.9);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.2vw, 2.4rem);
    font-weight: 400;
    letter-spacing: 1.5px;
    font-style: italic;
}

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

.nav-list a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: 1px solid transparent;
    color: var(--text-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    padding: 0.15rem 0;
}

.nav-dropdown-toggle:focus-visible {
    outline: none;
    border-color: var(--border-color);
}

.nav-dropdown-caret {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-dropdown-caret {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    min-width: 220px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 200;
}

.nav-dropdown-menu li {
    list-style: none;
}

.nav-dropdown-menu a {
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    background: rgba(5, 5, 5, 0.65);
    color: var(--text-color);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    gap: 0.5rem;
}

.nav-toggle::after {
    content: "Menu";
}

.nav-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    margin-left: 0.5rem;
}

.nav-toggle-icon span {
    width: 16px;
    height: 2px;
    background: currentColor;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.nav-open .nav-toggle-icon span:nth-child(1) {
    transform: translateY(2px) rotate(45deg);
}

body.nav-open .nav-toggle-icon span:nth-child(2) {
    transform: translateY(-2px) rotate(-45deg);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 90;
}

body.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Typography */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-align: center;
    font-style: italic;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* Base Styles for Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 100px;
    /* offset for fixed header */
    display: flex;
    align-items: center;
    padding-bottom: var(--spacing-lg);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 40vh);
    gap: 1rem;
    width: 100%;
}

.hero-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
    filter: brightness(0.7);
}

.hero-item:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}

/* Dramatic layout */
.hero-item:nth-child(1) {
    grid-column: 1 / 8;
    grid-row: 1 / 3;
}

.hero-item:nth-child(2) {
    grid-column: 8 / 13;
    grid-row: 1 / 2;
}

.hero-item:nth-child(3) {
    grid-column: 8 / 13;
    grid-row: 2 / 3;
}

.hero-copy {
    grid-column: 1 / -1;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.hero-copy p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.hero--bio {
    min-height: auto;
    padding-top: 140px;
    padding-bottom: 140px;
}

/* Home Hero Carousel */
.home-hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
}

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

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1.2s ease-out;
    z-index: 1;
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
}

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

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 10;
}

.carousel-text {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    color: white;
    text-align: center;
    font-style: italic;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out 0.5s;
}

.carousel-slide.active .carousel-text {
    opacity: 1;
    transform: translateY(0);
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

.hero-bio {
    display: flex;
    gap: 3rem;
    align-items: stretch;
}

.hero-bio-photo,
.hero-bio-content {
    flex: 1;
}

.hero-bio-photo img {
    width: 100%;
    height: 100%;
    max-height: 720px;
    object-fit: cover;
    object-position: top center;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(10, 10, 10, 0.2);
}

.hero-bio-content {
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-bio-content p:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.my-works-section-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

/* Gallery Section (Masonry) */
.gallery-section {
    padding: var(--spacing-xl) 0;
}

.carousel-wrapper {
    position: relative;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(5, 5, 5, 0.85);
    color: #fff;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.carousel-nav--prev {
    left: 0.5rem;
}

.carousel-nav--next {
    right: 0.5rem;
}

.gallery-section--compact {
    padding-top: 2rem;
}

.section-subtitle--highlight {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    margin-bottom: 2rem;
}

.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform var(--transition-smooth), filter 0.3s ease;
    filter: brightness(0.85);
}

.gallery-item:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ccc;
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    transition: 0.3s ease;
    user-select: none;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    z-index: 10000;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}


/* Contact Section */
.contact-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--surface-color);
    text-align: center;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.contact-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-inline: auto;
}

.contact-info {
    margin-bottom: 3rem;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.contact-info a {
    color: var(--text-color);
    font-weight: 400;
}

.contact-info a:hover {
    color: var(--text-muted);
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.btn .icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.btn-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-whatsapp {
    background-color: transparent;
    color: #25D366;
    border-color: #25D366;
}

.btn-whatsapp:hover {
    background-color: #25D366;
    color: white;
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

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

.social-links a {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.social-links a:hover {
    color: var(--text-muted);
}

/* Responsive Styles */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(3, minmax(180px, 28vh));
    }

    .hero-item:nth-child(1) {
        grid-column: 1 / 7;
        grid-row: 1 / 3;
    }

    .hero-item:nth-child(2) {
        grid-column: 1 / 4;
        grid-row: 3 / 4;
    }

    .hero-item:nth-child(3) {
        grid-column: 4 / 7;
        grid-row: 3 / 4;
    }

    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 992px) {
    .masonry-grid {
        column-count: 2;
    }

    .hero-grid {
        grid-template-rows: repeat(2, 30vh);
    }
}

@media (max-width: 900px) {
    .hero-bio {
        flex-direction: column;
    }

    .hero-bio-photo img {
        max-height: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(320px, 80vw);
        background: rgba(5, 5, 5, 0.95);
        border-left: 1px solid var(--border-color);
        padding: 8rem 2rem 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 150;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
    }

    body.nav-open .nav {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        display: flex;
    }

    .nav-list a {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-color: transparent;
        text-align: left;
        font-size: 1rem;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
        opacity: 1;
        visibility: visible;
        width: 100%;
        overflow: hidden;
        --submenu-height: 0px;
        max-height: var(--submenu-height);
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        padding-bottom: 0.5rem;
    }

    .nav-dropdown-menu li {
        padding: 0.2rem 1rem 0.2rem 0;
        text-align: right;
    }

    .nav-dropdown.open>.nav-dropdown-toggle {
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .carousel-wrapper {
        padding: 0 2.5rem;
    }

    .carousel-nav {
        display: inline-flex;
    }

    .carousel-track {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        touch-action: pan-x pinch-zoom;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
        column-count: initial;
    }

    .carousel-track::-webkit-scrollbar {
        display: none;
    }

    .carousel-track .gallery-item {
        flex: 0 0 82vw;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        margin-bottom: 0;
    }

    .carousel-track .gallery-item img {
        width: 100%;
        height: 68vw;
        object-fit: cover;
    }

    .header {
        padding: 1rem 0;
    }

    .hero {
        padding-top: 80px;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .hero-item {
        height: 45vh;
        width: 100%;
        border-radius: 4px;
    }

    .hero-item:nth-child(1),
    .hero-item:nth-child(2),
    .hero-item:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }

    .masonry-grid {
        column-count: 1;
        column-gap: 0;
    }

    .gallery-item {
        margin-bottom: 4px;
        /* Tighter gap on mobile full width */
        border-radius: 0;
        /* Edge to edge */
    }

    .container {
        padding: 0 1.2rem;
    }

    .gallery-section .container {
        padding: 0;
        /* Full bleed gallery on mobile */
    }

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

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }

    /* even tighter spacing below the carousel when stacked on contact section */
    .gallery-section {
        padding-bottom: var(--spacing-sm);
    }

    /* Home Fullscreen Mobile */
    .fullscreen-photo-section {
        height: 80vh;
        margin-bottom: 2rem;
    }

    .fullscreen-photo-section:last-child {
        margin-bottom: 0;
    }

    .photo-overlay {
        padding: 2rem;
        justify-content: center;
        align-items: center;
    }

    .overlay-text {
        white-space: normal;
        text-align: center;
        font-size: 1.5rem;
        line-height: 1.4;
    }

}