/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0c0c0c;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;

    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;

    --gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8860b;

    --accent: var(--gold);

    --gradient-gold: linear-gradient(135deg, var(--gold), var(--gold-light));
    --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(212, 175, 55, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.2);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(12, 12, 12, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.create-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-gold);
    border: none;
    border-radius: var(--radius-full);
    color: #000;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gold {
    color: var(--gold);
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Filter Section ===== */
.filter-section {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.filter-header h2 {
    font-size: 1.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn:hover,
.view-btn.active {
    background: var(--bg-card-hover);
    color: var(--gold);
    border-color: var(--border-gold);
}

.filter-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 0.625rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tag:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.filter-tag.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
}

/* ===== Gallery Section ===== */
.gallery-section {
    padding: 3rem 0 6rem;
}

.gallery {
    display: grid;
    gap: 1.5rem;
}

.gallery.grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.gallery.masonry {
    columns: 4 280px;
    column-gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.gallery.grid .gallery-item {
    aspect-ratio: 1;
    margin-bottom: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-category {
    font-size: 0.8rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gallery-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
}

.gallery-item:hover .gallery-actions {
    opacity: 1;
    transform: translateY(0);
}

.gallery-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.gallery-action:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
}

/* Load More Button */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.load-more-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.load-more-btn:hover {
    background: var(--gold);
    color: #000;
}

.load-more-btn.loading .spinner {
    display: block;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== About Section ===== */
.about-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.tech-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.tech-badge {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.about-visual {
    position: relative;
    height: 400px;
}

.floating-gallery {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-img {
    position: absolute;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: floatImg 6s ease-in-out infinite;
}

.img-1 {
    width: 200px;
    height: 280px;
    top: 20%;
    left: 10%;
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    animation-delay: 0s;
}

.img-2 {
    width: 180px;
    height: 240px;
    top: 10%;
    right: 15%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    animation-delay: -2s;
}

.img-3 {
    width: 160px;
    height: 200px;
    bottom: 10%;
    left: 35%;
    background: linear-gradient(135deg, #10b981, #059669);
    animation-delay: -4s;
}

@keyframes floatImg {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* ===== Footer ===== */
.footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand p {
    margin-left: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: white;
    color: black;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-nav.prev {
    left: 2rem;
}

.lightbox-nav.next {
    right: 2rem;
}

.lightbox-nav:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: black;
}

.lightbox-content {
    display: flex;
    max-width: 1200px;
    max-height: 90vh;
    gap: 2rem;
    padding: 0 5rem;
}

.lightbox-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.lightbox-info {
    width: 300px;
    padding: 2rem 0;
}

.lightbox-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.lightbox-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.lightbox-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.lightbox-meta span {
    padding: 0.375rem 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--gold);
}

.lightbox-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
}

.like-btn.liked {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-gold);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 1001;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    color: var(--gold);
    font-weight: bold;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .gallery.masonry {
        columns: 3;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-visual {
        display: none;
    }

    .lightbox-content {
        flex-direction: column;
        padding: 2rem;
    }

    .lightbox-info {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .gallery.masonry {
        columns: 2;
    }

    .hero-stats {
        gap: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .lightbox-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .gallery.masonry {
        columns: 1;
    }

    .filter-tags {
        justify-content: center;
    }
}