:root {
    --bg-main: #ffffff;
    --text-main: #000000;
    --text-muted: #666666;
    --border-color: #eeeeee;
    --accent: #333333;
    --transition-fast: all 0.3s ease;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    margin: 0;
    overflow-x: hidden;
    letter-spacing: 0.02em;
    padding-top: 85px; /* Offset for fixed navbar */
}


/* Minimalist Navigation */
.navbar {
    background-color: var(--bg-main) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 3rem;
    box-shadow: none;
}

.navbar-brand {
    color: var(--text-main) !important;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 300;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-left: 2rem;
    transition: var(--transition-fast);
    opacity: 0.55;
    text-decoration: none;
}

.nav-link:hover {
    opacity: 0.85;
}

.nav-link.active {
    font-weight: 700 !important;
    opacity: 1 !important;
    text-decoration: underline !important;
    text-underline-offset: 6px;
    text-decoration-thickness: 1.5px;
}

/* No underline or bubbles for minimal style */
.nav-link::after { display: none; }

/* Mobile Navigation (< 992px) */
@media (max-width: 991.98px) {
    body {
        padding-top: 105px;
    }

    .navbar {
        padding: 0.9rem 1rem 0.65rem !important;
    }

    .navbar > .container-fluid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .navbar-brand {
        margin: 0 0 0.45rem 0 !important;
        text-align: center !important;
        font-size: 1.05rem !important;
        letter-spacing: 2px !important;
        display: block !important;
    }

    .navbar-toggler {
        display: none !important;
    }

    .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        width: 100% !important;
        justify-content: center !important;
    }

    .navbar-nav {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.35rem 0.95rem !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
        width: 100% !important;
    }

    .nav-item {
        display: inline-block !important;
    }

    .nav-link {
        margin: 0 !important;
        padding: 0.2rem 0.35rem !important;
        font-size: 0.72rem !important;
        letter-spacing: 0.15em !important;
        white-space: nowrap !important;
    }

    .nav-link.active {
        text-underline-offset: 4px !important;
    }

    /* Remove arrows in carousel on mobile / tablet */
    .carousel-control-prev,
    .carousel-control-next,
    .lightbox-arrow-btn {
        display: none !important;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 108px;
    }

    .navbar-brand {
        font-size: 0.95rem !important;
        letter-spacing: 2px !important;
    }

    .navbar-nav {
        gap: 0.25rem 0.75rem !important;
    }

    .nav-link {
        font-size: 0.68rem !important;
        letter-spacing: 0.12em !important;
    }

    #view-toggle-bar {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* Hero Section - Reduced Flashiness */
.hero {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero p {
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Masonry Grid */
.masonry-grid {
    margin: 0 auto;
    width: 100%;
}

.grid-item {
    width: 25%; /* 4 columns default on desktop */
    padding: 0 14px;
    margin-bottom: 28px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.grid-item.loaded {
    opacity: 1;
    transform: translateY(0);
}

#home-grid .grid-item .project-card {
    border: none;
}

@media (min-width: 1600px) {
    .grid-item {
        width: 25%; /* 4 columns on large screens */
        padding: 0 16px;
        margin-bottom: 32px;
    }
}

@media (max-width: 1200px) {
    .grid-item {
        width: 33.333%; /* 3 columns on medium/laptop screens */
        padding: 0 12px;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .grid-item {
        width: 50%; /* 2 columns on tablets */
        padding: 0 10px;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .grid-item {
        width: 100%; /* 1 column on mobile phones */
        padding: 0 15px;
        margin-bottom: 28px;
    }
}

/* Project Card - Sharp Edges */
.project-card {
    position: relative;
    width: 100%;
    border-radius: 0 !important; /* Sharp corners */
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: var(--transition-fast);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 !important; /* Sharp corners */
    transition: var(--transition-fast);
}

.project-card:hover img {
    filter: grayscale(1) contrast(1.1); /* Minimalist hover effect */
}

.project-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: var(--transition-fast);
    padding: 20px;
    text-align: center;
}

.project-card:hover .project-info {
    opacity: 1;
}

.project-info h3 {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-main);
}

.project-info p {
    font-size: 0.75rem;
    margin: 10px 0 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Mobile Project Card - Display project name below main picture */
@media (max-width: 991.98px) {
    .project-card {
        overflow: visible !important;
    }

    .project-card:hover img {
        filter: none !important;
    }

    .project-card .project-info {
        position: static !important;
        opacity: 1 !important;
        background: transparent !important;
        height: auto !important;
        width: 100% !important;
        padding: 10px 0 4px 0 !important;
        text-align: center !important;
        display: block !important;
    }

    .project-card .project-info h3 {
        font-size: 0.82rem !important;
        font-weight: 300 !important;
        letter-spacing: 0.22em !important;
        text-transform: uppercase !important;
        color: var(--text-main) !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.4 !important;
    }

    .project-card:hover .project-info {
        opacity: 1 !important;
        background: transparent !important;
    }
}

/* Gallery Item for Project Detail */
.gallery-item {
    width: 100%;
    margin-bottom: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 !important; /* Sharp corners */
    box-shadow: none !important;
}

.gallery-item .caption {
    padding: 15px 0;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

/* About Page Specifics */
.about-content {
    color: #000000;
}

.about-content h2 {
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #000000;
}

.about-content p {
    font-weight: 300;
    font-size: 1rem;
    line-height: 2;
    color: #000000;
}

.about-content a {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.about-content a:hover {
    opacity: 0.6;
}

.img-profile {
    border-radius: 0 !important; /* Sharp corners */
    padding: 0 !important;
    border: none;
    clip-path: none !important;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

/* Button Refactoring */
.btn {
    border-radius: 0 !important;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 10px 30px;
    transition: var(--transition-fast);
}

.btn-outline-warning {
    border-color: #000;
    color: #000;
}

.btn-outline-warning:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}

.btn-warning {
    background: #000;
    border-color: #000;
    color: #fff;
}

.btn-warning:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* View Toggle Bar Styling */
#view-toggle-bar {
    background-color: var(--bg-main);
    z-index: 100;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

#view-toggle-bar .btn {
    border: 1px solid #000;
    color: #000;
    background: transparent;
    padding: 6px 15px;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    transition: var(--transition-fast);
}

#view-toggle-bar .btn:hover,
#view-toggle-bar .btn.active {
    background-color: #000;
    color: #fff;
}

/* Map Custom Styling */
#home-map {
    background-color: #f8f9fa;
}

/* Custom Marker dot */
.custom-map-marker {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-dot {
    width: 10px;
    height: 10px;
    background-color: #000;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #000;
    transition: transform 0.2s ease;
}

.custom-map-marker:hover .marker-dot {
    transform: scale(1.3);
    background-color: #fff;
    box-shadow: 0 0 0 2px #000;
}

/* Leaflet Popup Styling Override to match minimalist theme */
.leaflet-popup-content-wrapper {
    background: #fff !important;
    color: #000 !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #000 !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 220px !important;
}

.map-popup {
    padding: 0;
}

.map-popup img {
    border-bottom: 1px solid #eee;
}

.map-popup div {
    padding: 12px;
}

.popup-link:hover {
    color: #666 !important;
    border-bottom-color: #666 !important;
}

.leaflet-popup-tip {
    background: #fff !important;
    border-left: 1px solid #000;
    border-bottom: 1px solid #000;
    box-shadow: none !important;
}

/* ==========================================================================
   Project Carousel Styling (Minimalist Photography View)
   ========================================================================== */
.project-carousel-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.carousel-top-bar {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.carousel-back-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: var(--transition-fast);
    opacity: 0.6;
}

.carousel-back-link:hover {
    opacity: 1;
    color: var(--text-main);
}

.carousel-counter {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--text-muted);
}

#projectCarousel {
    position: relative;
    width: 100%;
}

.carousel-image-frame {
    width: 100%;
    height: 72vh;
    min-height: 400px;
    max-height: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
}

.carousel-photo {
    max-height: 72vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 0 !important;
    user-select: none;
    -webkit-user-drag: none;
}

/* Custom Arrows */
.carousel-control-prev,
.carousel-control-next {
    width: auto;
    padding: 0 1.5rem;
    background: transparent;
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-arrow-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #000;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.carousel-control-prev:hover .carousel-arrow-btn,
.carousel-control-next:hover .carousel-arrow-btn {
    background-color: #000;
    color: #fff;
}

/* Thumbnail Strip */
.carousel-thumbnails-strip {
    width: 100%;
    overflow-x: auto;
    padding: 14px 0 24px;
    text-align: center;
    scrollbar-width: thin;
}

.carousel-thumbnails-strip::-webkit-scrollbar {
    height: 4px;
}

.carousel-thumbnails-strip::-webkit-scrollbar-track {
    background: transparent;
}

.carousel-thumbnails-strip::-webkit-scrollbar-thumb {
    background: #ddd;
}

.thumbnails-container {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.thumbnail-item {
    width: 64px;
    height: 48px;
    border: 1px solid transparent;
    padding: 0;
    background: transparent;
    opacity: 0.35;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0 !important;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-item:hover {
    opacity: 0.8;
}

.thumbnail-item.active {
    opacity: 1;
    border-color: #000;
}

@media (max-width: 768px) {
    .carousel-image-frame {
        height: 58vh;
        min-height: 280px;
    }

    .carousel-photo {
        max-height: 58vh;
    }

    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }

    .thumbnails-container {
        justify-content: flex-start;
    }

    .thumbnail-item {
        width: 52px;
        height: 38px;
    }
}

/* ==========================================================================
   Project Grid Photo & Toolbar (Grid / Carousel Dual View)
   ========================================================================== */
.project-grid-photo {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    width: 100%;
    transition: var(--transition-fast);
}

.project-grid-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-fast);
}

.project-grid-photo:hover img {
    filter: contrast(1.05);
    opacity: 0.92;
}

#project-toolbar {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    padding-left: 14px;
    padding-right: 14px;
}

@media (min-width: 1600px) {
    #project-toolbar {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 1200px) {
    #project-toolbar {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 768px) {
    #project-toolbar {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 576px) {
    #project-toolbar {
        padding-left: 15px;
        padding-right: 15px;
        gap: 0.5rem;
    }
}

.project-header-info {
    margin-left: auto;
    text-align: right;
    max-width: 65%;
}

.project-toolbar-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-main);
    text-align: right;
    margin-left: auto;
}

.project-toolbar-desc {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    color: var(--text-main);
    line-height: 1.6;
    text-align: right;
    margin-left: auto;
}

@media (max-width: 768px) {
    .project-header-info {
        max-width: 100%;
        margin-top: 0.5rem;
        text-align: right;
    }
}

/* ==========================================================================
   Fullscreen Lightbox Carousel
   ========================================================================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    width: 100%;
}

.lightbox-counter {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--text-muted);
}

.lightbox-close-btn {
    background: transparent;
    border: none;
    color: #000;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem 2.5rem;
    width: 100%;
    overflow: hidden;
}

.lightbox-image-container {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    cursor: pointer;
}

#lightbox-image {
    max-height: 82vh;
    max-width: 86vw;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0 !important;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.15s ease-in-out;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

.lightbox-arrow-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #000;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.lightbox-arrow-btn:hover {
    background-color: #000;
    color: #fff;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .lightbox-header {
        padding: 1rem 1.5rem;
    }

    .lightbox-content {
        padding: 0 0.5rem 1.5rem;
        justify-content: center;
    }

    .lightbox-image-container {
        padding: 0;
    }

    #lightbox-image {
        max-height: 78vh;
        max-width: 95vw;
    }

    .lightbox-arrow-btn {
        display: none !important;
    }
}




/* =========================================================
   PERSONAL — Scattered layout
   ========================================================= */
.personal-scattered {
    position: relative;
    width: 100%;
    /* Height scales with viewport so photos fill the page naturally */
    height: 160vw;
    max-height: 2200px;
    min-height: 700px;
    overflow: visible;
}

.personal-photo {
    position: absolute;
    cursor: default;
    opacity: 0;
    animation: fadeInPhoto 0.6s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.personal-photo:hover {
    transform: rotate(0deg) scale(1.06) !important;
    z-index: 10;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

@media (max-width: 767px) {
    .personal-photo:hover {
        transform: none !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    }
}

.personal-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

@keyframes fadeInPhoto {
    from { opacity: 0; transform: translateY(12px) rotate(var(--rot, 0deg)); }
    to   { opacity: 1; transform: translateY(0)   rotate(var(--rot, 0deg)); }
}

@media (max-width: 768px) {
    .personal-scattered {
        height: 320vw;
    }
    .personal-photo {
        /* slightly larger on mobile so they're visible */
        width: 38% !important;
    }
}

@media (max-width: 480px) {
    .personal-scattered {
        height: 450vw;
    }
    .personal-photo {
        width: 48% !important;
    }
}

#view-toggle-bar {
    display: none !important;
}

/* <picture> wrapper must not affect layout (gallery images are built by app.js) */
picture { display: contents; }
