/* ===== CSS Variables ===== */
:root {
    --background: 30 15% 6%;
    --foreground: 45 20% 95%;
    --card: 30 12% 10%;
    --card-foreground: 45 20% 95%;
    --primary: 25 95% 53%;
    --primary-foreground: 0 0% 100%;
    --secondary: 30 15% 15%;
    --secondary-foreground: 45 20% 90%;
    --muted: 30 10% 20%;
    --muted-foreground: 30 10% 60%;
    --accent: 25 95% 53%;
    --border: 30 15% 18%;
    --ring: 25 95% 53%;

    --gradient-primary: linear-gradient(135deg, hsl(25, 95%, 53%), hsl(35, 100%, 60%));
    --gradient-card: linear-gradient(145deg, hsl(30, 12%, 12%), hsl(30, 12%, 8%));
    --shadow-glow: 0 0 40px hsla(25, 95%, 53%, 0.15);
    --shadow-card: 0 10px 40px -10px hsla(0, 0%, 0%, 0.5);

    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Gallery Section ===== */
.gallery-section {
    min-height: 100vh;
    padding: 4rem 1rem;
}

@media (min-width: 768px) {
    .gallery-section {
        padding: 6rem 2rem;
    }
}

@media (min-width: 1024px) {
    .gallery-section {
        padding: 6rem 4rem;
    }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== Header ===== */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeUp 0.6s ease-out;
}

@media (min-width: 768px) {
    .gallery-header {
        margin-bottom: 4rem;
    }
}

.gallery-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: hsla(25, 95%, 53%, 0.1);
    color: hsl(var(--primary));
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid hsla(25, 95%, 53%, 0.2);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3.5rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 600px;
    margin: 0 auto;
}

.highlight {
    color: hsl(var(--primary));
    font-weight: 600;
}

.photo-count {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* ===== Filter Navigation ===== */
.filter-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    animation: fadeUp 0.6s ease-out 0.2s both;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary));
    color: hsl(var(--muted-foreground));
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    border-color: hsl(var(--muted-foreground));
}

.filter-btn-active {
    background: var(--gradient-primary);
    color: hsl(var(--primary-foreground));
    border-color: transparent;
    box-shadow: 0 4px 15px hsla(25, 95%, 53%, 0.4);
}

.filter-btn-active:hover {
    background: var(--gradient-primary);
    color: hsl(var(--primary-foreground));
}

/* ===== Gallery Grid ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    animation: fadeUp 0.6s ease-out 0.3s both;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== Gallery Card ===== */
.gallery-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--gradient-card);
    border: 1px solid hsl(var(--border));
    cursor: pointer;
    transition: var(--transition-smooth);
    animation: fadeUp 0.5s ease-out both;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border-color: hsla(25, 95%, 53%, 0.3);
}

.gallery-card.portrait {
    grid-row: span 2;
}

.gallery-card-skeleton {
    position: absolute;
    inset: 0;
    background: hsl(var(--muted));
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.gallery-card-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, hsla(var(--secondary), 0.2), transparent);
    animation: shimmer 2s infinite;
}

.gallery-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.gallery-card.portrait .gallery-card-image {
    height: 100%;
    min-height: 400px;
}

.gallery-card:hover .gallery-card-image {
    transform: scale(1.08);
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsla(0, 0%, 0%, 0.8), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background: linear-gradient(to top, hsla(0, 0%, 0%, 0.6), transparent);
    pointer-events: none;
}

.tag-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: hsla(25, 95%, 53%, 0.9);
    color: hsl(var(--primary-foreground));
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .tag-badge {
    opacity: 1;
}

.gallery-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 10;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: all 0.4s ease;
}

.gallery-card:hover .gallery-card-content {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.gallery-card-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.gallery-card:hover .gallery-card-title::after {
    width: 100%;
}

.gallery-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.gallery-card-date svg {
    color: hsl(var(--primary));
}

/* ===== Loader ===== */
.gallery-loader {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.loader-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid hsl(var(--muted));
    border-top-color: hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.gallery-loader.hidden {
    display: none;
}

/* ===== End Message ===== */
.end-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.end-line {
    width: 4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, hsl(var(--border)), transparent);
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: hsla(0, 0%, 0%, 0.95);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.lightbox-container {
    position: relative;
    z-index: 1;

    width: 80vw;
    /* 🔥 80% of screen width */
    max-width: 1200px;
    /* prevents too wide on big screens */
    max-height: 90vh;

    animation: scaleIn 0.3s ease;
}

.lightbox-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #0a66c2;
    text-decoration: none;
}

.lightbox-linkedin:hover {
    text-decoration: underline;
}


.lightbox-close {
    position: absolute;
    top: 0rem;
    right: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
}

.lightbox-close:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
}

@media (min-width: 768px) {
    .lightbox-nav {
        display: flex;
    }
}

.lightbox-nav:hover:not(:disabled) {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-prev {
    left: -4rem;
}

.lightbox-next {
    right: -4rem;
}

.lightbox-content {
    background: hsl(var(--card));
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid hsl(var(--border));
    max-height: 90vh;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    /* 🔥 ALWAYS COLUMN */
}


.lightbox-image {
    width: 100%;
    height: 65vh;
    /* 🔥 BIG IMAGE */
    max-height: 65vh;
    object-fit: contain;
    /* Like reference */
    background: #000;
}


.lightbox-info {
    padding: 1.75rem 2rem;
    overflow-y: auto;
    background: hsl(var(--card));
}

@media (max-width: 768px) {
    .lightbox-image {
        height: 45vh;
    }

    .lightbox-title {
        font-size: 1.5rem !important;
    }

    .lightbox-info {
        padding: 1.25rem;
    }
}

.lightbox-category {
  position: absolute;
  top: 10px;
  left: 14px;

  display: inline-flex;
  align-items: center;

  padding: 0.45rem 0.9rem;
  border-radius: 9999px;

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: #000000;

  /* 3D glossy background */
  background: linear-gradient(
    145deg,
    rgba(255, 170, 0, 0.95),
    rgba(255, 120, 0, 0.85)
  );

  /* Depth & glow */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),   /* top shine */
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),      /* bottom depth */
    0 6px 14px rgba(255, 140, 0, 0.45);        /* outer glow */

  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover lift (optional) */
.lightbox-category:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 6px rgba(0, 0, 0, 0.35),
    0 10px 22px rgba(255, 140, 0, 0.6);
}


.lightbox-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
}

.lightbox-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.lightbox-date svg {
    color: hsl(var(--primary));
}

.lightbox-description {
    color: hsl(var(--muted-foreground));
    font-size: 0.9375rem;
    line-height: 1.7;
}

.lightbox-mobile-nav {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
}

@media (min-width: 768px) {
    .lightbox-mobile-nav {
        display: none;
    }
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    font-family: var(--font-body);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mobile-nav-btn:hover:not(:disabled) {
    background: hsl(var(--muted));
}

.mobile-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ===== Utilities ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}