/* ========== PHOTO PROTECTION ========== */
/* Disable drag and selection on portfolio images */
.photo-protect {
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.photo-protect img {
    -webkit-user-drag: none;
    user-drag: none;
}
.photo-protect video {
    -webkit-user-drag: none;
    user-drag: none;
}
/* Video fullscreen — fill entire screen */
video:fullscreen,
video:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover;
    background: #000;
}
/* Invisible watermark overlay — appears on screenshot/save */
.photo-protect::after {
    content: attr(data-watermark);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.04);
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.03);
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    overflow: hidden;
    text-transform: uppercase;
}
/* Tiled watermark for larger images (detail/lightbox) */
.photo-protect-tiled::after {
    content: attr(data-watermark) '   ·   ' attr(data-watermark) '   ·   ' attr(data-watermark) '   ·   ' attr(data-watermark) '   ·   ' attr(data-watermark) '   ·   ' attr(data-watermark);
    font-size: 1rem;
    line-height: 4;
    white-space: normal;
    word-spacing: 2rem;
}

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

:root {
    --color-bg: #faf8f5;
    --color-surface: #ffffff;
    --color-text: #2d2d2d;
    --color-text-light: #6b6b6b;
    --color-accent: #c47d5a;
    --color-accent-light: #e8c4b0;
    --color-accent-dark: #a0614a;
    --color-heart: #e74c6f;
    --color-border: #e8e4df;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.portfolio-bg-image {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -1;
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== NAVBAR ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo .logo-icon {
    color: var(--color-accent);
}

.nav-center {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-accent);
    color: white;
}

/* ========== CATEGORY DROPDOWN ========== */
.nav-categories-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-cat-dropdown {
    position: relative;
}

.nav-cat-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
}

.nav-cat-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 200;
    flex-direction: column;
}

.nav-cat-menu.open {
    display: flex;
}

.nav-cat-item {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    border-radius: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-cat-item:hover,
.nav-cat-item.active {
    background: var(--color-accent);
    color: white;
}

/* Nav dropdown menus */
.nav-dropdown-wrap { position: relative; }
.nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 6px;
    z-index: 200;
    flex-direction: column;
}
.nav-dropdown-menu.open {
    display: flex;
}
.nav-dropdown-item {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.nav-dropdown-item:hover { background: rgba(0,0,0,0.05); }
.nav-dropdown-item.active { background: var(--color-accent); color: #fff; }

/* Mobile sub-links */
.mobile-link-sub { padding-left: 2rem; font-size: 0.9rem; opacity: 0.75; }

/* ========== USER AVATAR + DROPDOWN ========== */
.nav-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-text);
    color: white;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.nav-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-heart);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--color-bg);
    line-height: 1;
}

.nav-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.nav-avatar-btn:hover,
.nav-avatar-btn.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

.nav-user-menu {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 200;
    overflow: hidden;
}

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

.nav-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    transition: var(--transition);
}

.nav-dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-accent);
}

/* ========== MOBILE MENU ========== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-links {
    position: absolute;
    top: 64px;
    right: 0;
    width: 280px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    padding: 16px 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    transition: var(--transition);
}

.mobile-link:hover,
.mobile-link.active {
    background: var(--color-bg);
    color: var(--color-accent);
}

.mobile-link-register {
    margin: 8px 16px;
    background: var(--color-accent);
    color: white !important;
    border-radius: var(--radius-sm);
    justify-content: center;
}

.mobile-link-register:hover {
    background: var(--color-accent-dark);
}

.mobile-link-dashboard {
    color: var(--color-accent);
}

.mobile-link-logout {
    color: var(--color-text-light);
}

.mobile-separator {
    height: 1px;
    background: var(--color-border);
    margin: 8px 16px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

.mobile-notif-badge {
    background: var(--color-heart);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: auto;
}

/* ========== HERO ========== */
.hero {
    padding: 100px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ========== GALLERY SECTION ========== */
.gallery-section {
    padding: 60px 0 80px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.media-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.media-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: rgba(255,255,255,0.8);
    border: 1.5px solid var(--color-border, #e8e4df);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text, #2d2d2d);
    text-decoration: none;
    transition: all 0.2s;
}
.media-tab:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-1px);
}
.media-tab.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.media-tab.active svg { stroke: #fff; }

/* ========== PHOTO GRID ========== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Masonry layout — uses grid with auto rows */
.photo-grid-masonry {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 10px;
    gap: 16px;
}

.photo-grid-masonry .photo-card {
    grid-row-end: span 25;
}

.photo-grid-masonry .photo-card-portrait {
    grid-row-end: span 35;
}

.photo-grid-masonry .photo-card-image {
    aspect-ratio: auto;
    height: 100%;
}

.photo-grid-masonry .photo-card-image img {
    aspect-ratio: auto;
    height: 100%;
}

.photo-grid-masonry .photo-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 16px 12px 12px;
}

.photo-grid-masonry .photo-card-info h3 {
    color: #fff;
    font-size: 0.85rem;
}

.photo-grid-masonry .photo-card-info .badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.photo-grid-masonry .photo-card-info .stat {
    color: rgba(255,255,255,0.8);
}

.photo-grid-masonry .photo-card-info .stat-icon {
    color: rgba(255,255,255,0.8);
}

.photo-grid-masonry .photo-card {
    position: relative;
    overflow: hidden;
}

/* List layout */
.photo-grid-list {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    gap: 32px;
}

.photo-grid-list .photo-card-image img {
    aspect-ratio: 16/9;
}

/* Two column layout */
.photo-grid-two-col {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.photo-grid-two-col .photo-card-image {
    aspect-ratio: 3/2;
}

.photo-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

/* ---- Card style: shadow (elevated) ---- */
.card-style-shadow .photo-card {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border: none;
}

.card-style-shadow .photo-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    transform: translateY(-8px);
}

/* ---- Card style: minimal (no border, text only) ---- */
.card-style-minimal .photo-card {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.card-style-minimal .photo-card-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.card-style-minimal .photo-card-info {
    padding: 10px 2px;
}

.card-style-minimal .photo-card:hover {
    transform: none;
    box-shadow: none;
}

.card-style-minimal .photo-card:hover .photo-card-image img {
    transform: scale(1.03);
}

.photo-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow var(--transition);
}

/* Fallback if JS is disabled */
@media (prefers-reduced-motion: reduce) {
    .photo-card {
        opacity: 1;
        transform: none;
    }
}

.photo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.photo-card.visible:hover {
    transform: translateY(-6px);
}

.photo-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.photo-card-portrait .photo-card-image {
    aspect-ratio: 3 / 4;
}
/* ========== FEATURED PHOTO (Photo of the day) ========== */
.featured-photo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    margin: 1.5rem auto 2.5rem;
    max-width: 800px;
    position: relative;
    transition: transform 0.3s;
}
.featured-photo-link:hover {
    transform: translateY(-3px);
}
.featured-photo-link:hover .featured-photo-title {
    color: var(--color-accent);
}
.featured-photo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.featured-photo-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s;
}
.featured-photo-link:hover .featured-photo-image {
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.18);
}
.featured-photo-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
}
.featured-photo-title {
    margin: 0.85rem 0 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    transition: color 0.2s;
}

@media (max-width: 768px) {
    .featured-photo-link { margin: 1rem 0 2rem; max-width: 100%; padding: 0 0.5rem; }
    .featured-photo-badge { padding: 0.3rem 0.7rem; font-size: 0.65rem; }
    .featured-photo-image img { max-height: 70vh; }
    .featured-photo-title { font-size: 1rem; margin-top: 0.7rem; }
}

.project-card-image {
    aspect-ratio: unset !important;
}
.project-card-image img {
    height: auto !important;
    object-fit: contain !important;
}

.photo-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.photo-card-video-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

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

.view-btn {
    padding: 10px 28px;
    background: white;
    color: var(--color-text);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.photo-card-info {
    padding: 20px;
}

.photo-card-info h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-lg {
    padding: 6px 16px;
    font-size: 0.8rem;
}

.photo-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-icon {
    flex-shrink: 0;
}

.stat-icon-heart {
    color: var(--color-heart);
}

.stat-icon-comment {
    color: var(--color-text-light);
}

/* ========== PHOTO DETAIL ========== */
.photo-detail {
    padding: 0 0 80px;
}

/* Showcase: the image area */
.detail-showcase {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0a0a0a;
}

.detail-showcase-landscape {
    height: calc(100vh - 64px);
}

.detail-showcase-portrait {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

.detail-showcase-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-showcase-landscape .detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-showcase-portrait .detail-photo {
    max-height: calc(100vh - 120px);
    max-width: min(100%, 700px);
    width: auto;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.clickable-photo {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.detail-showcase {
    cursor: zoom-in;
}

.detail-showcase .detail-back-btn,
.detail-showcase .detail-action-pill {
    cursor: pointer;
}

.clickable-photo:hover {
    transform: scale(1.01);
}

/* Floating bar over image */
.detail-floating-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.detail-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

.detail-back-btn:hover {
    background: rgba(255,255,255,0.3);
}

.detail-floating-actions {
    display: flex;
    gap: 8px;
}

.detail-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 100px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.detail-action-pill:hover {
    background: rgba(255,255,255,0.3);
}

.detail-action-pill.liked {
    background: var(--color-heart);
    color: #fff;
}

/* Content below image */
.detail-content {
    padding: 48px 0 60px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 48px;
    align-items: start;
    margin-bottom: 48px;
}

.detail-info-main {
    max-width: 700px;
}

.detail-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    margin-bottom: 16px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.detail-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-date {
    color: var(--color-text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-description {
    margin-top: 24px;
    line-height: 1.8;
    color: var(--color-text-light);
    font-size: 1.05rem;
    padding: 20px 24px;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-accent);
}

.detail-info-side {
    position: sticky;
    top: 80px;
}

.detail-side-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.detail-comments-wrap {
    max-width: 700px;
}

/* ========== LIGHTBOX ========== */
/* Enhanced Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    flex-direction: column;
}
.lightbox.active {
    display: flex;
    animation: lightboxIn 0.3s ease;
}
@keyframes lightboxIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.lightbox-img-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}
.lightbox-img-wrap img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.15s ease;
    will-change: transform;
}
.lightbox-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 1001;
}
.lightbox-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}
.lightbox-counter {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-right: auto;
    padding: 0 12px;
}
.lightbox-hints {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
}

/* Video in detail */
.detail-video {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    background: #000;
    border-radius: 4px;
}

/* Video link */
.detail-video-link {
    margin-top: 1rem;
}
.detail-video-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--color-accent);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.detail-video-link a:hover { opacity: 0.85; }

/* EXIF data */
.detail-exif {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}
.detail-exif-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    opacity: 0.7;
}
.detail-exif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.exif-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.exif-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
}
.exif-value {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Video badge */
.badge-video {
    background: #ef4444;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Prev/Next navigation */
.detail-nav-desktop {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.detail-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.detail-nav-btn:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Mobile prev/next fixed bar */
.detail-nav-mobile {
    display: none;
}
@media (max-width: 640px) {
    .detail-nav-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: var(--color-surface, #fff);
        border-top: 1px solid var(--color-border, #eee);
        padding: 0.6rem 1rem;
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }
    .detail-nav-mobile-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.5rem 1rem;
        background: var(--color-accent);
        color: #fff;
        border-radius: 8px;
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 500;
    }
    /* Add bottom padding to content so it's not hidden behind the bar */
    .detail-comments-wrap {
        padding-bottom: 70px;
    }
    /* Hide desktop nav buttons on mobile */
    .detail-nav-desktop {
        display: none;
    }
}

.detail-below {
    max-width: 800px;
    margin: 0 auto;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: var(--font-body);
    width: 100%;
    justify-content: center;
}

.like-btn:hover {
    background: #fef0f3;
    color: var(--color-heart);
}

.like-btn .heart-svg {
    color: var(--color-text-light);
    transition: var(--transition);
    flex-shrink: 0;
}

.like-btn.liked {
    background: #fef0f3;
    color: var(--color-heart);
}

.like-btn.liked .heart-svg {
    color: var(--color-heart);
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: var(--font-body);
    color: var(--color-text);
    position: relative;
    width: 100%;
    justify-content: center;
}

.share-btn:hover {
    background: rgba(196, 125, 90, 0.08);
    color: var(--color-accent);
}

.share-btn svg {
    flex-shrink: 0;
}

.share-toast {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    animation: toastFade 2s ease forwards;
}

@keyframes toastFade {
    0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

.detail-actions {
    display: none; /* actions are now in the side card */
}

/* ========== COMMENTS ========== */
.comments-section {
    padding: 32px;
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.comments-section h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.comments-section h3 svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-author svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.comment-form input,
.comment-form textarea {
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--color-surface);
    transition: border-color var(--transition);
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(196, 125, 90, 0.08);
}

.btn-submit {
    align-self: flex-start;
    padding: 10px 28px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.btn-submit:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 125, 90, 0.25);
}

.comment-message {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.comment-message.error {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment {
    padding: 16px 20px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.comment:hover {
    background: var(--color-border);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.88rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.comment-text {
    color: var(--color-text-light);
    line-height: 1.6;
    font-size: 0.9rem;
}

.no-comments {
    text-align: center;
    color: var(--color-text-light);
    padding: 40px 20px;
    font-size: 0.9rem;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* ========== AUTH PAGES ========== */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 60px 24px;
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.auth-form input {
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.btn-auth {
    padding: 14px 32px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    margin-top: 8px;
}

.btn-auth:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

.auth-error {
    background: #fce4ec;
    color: #c62828;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.auth-error p {
    margin-bottom: 4px;
}

.auth-error p:last-child {
    margin-bottom: 0;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.auth-switch a {
    color: var(--color-accent);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ========== AUTH PROMPT ========== */
.auth-prompt {
    padding: 20px 24px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 24px;
    color: var(--color-text-light);
    font-size: 0.9rem;
    border: 1px dashed var(--color-border);
}

.auth-prompt a {
    color: var(--color-accent);
    font-weight: 600;
    padding: 6px 16px;
    background: rgba(196, 125, 90, 0.08);
    border-radius: 100px;
}

.auth-prompt a:hover {
    background: rgba(196, 125, 90, 0.15);
}

/* ========== ABOUT PAGE ========== */
.about-section {
    padding: 60px 0 80px;
}

.about-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    gap: 0;
}

.about-photo {
    width: 280px;
    flex-shrink: 0;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    padding: 40px;
    flex: 1;
}

.about-name {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 8px;
}

.about-intro {
    color: var(--color-accent);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.about-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.about-detail a {
    color: var(--color-accent);
}

.about-bio {
    margin-top: 24px;
    line-height: 1.8;
    color: var(--color-text-light);
}

.about-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 12px 28px;
    background: var(--color-accent);
    color: white;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.about-contact-btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .about-card {
        flex-direction: column;
    }
    .about-photo {
        width: 100%;
        height: 250px;
    }
    .about-content {
        padding: 24px;
    }
    .about-name {
        font-size: 1.5rem;
    }
}

/* ========== CONTACT PAGE ========== */
.contact-section {
    padding: 60px 0 80px;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 48px 40px;
}

.contact-title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 8px;
    text-align: center;
}

.contact-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-form label {
    font-size: 0.85rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    align-self: center;
}

.contact-submit:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

.contact-success {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: #e8f5e9;
    border-radius: var(--radius-sm);
    color: #2e7d32;
}

.contact-success svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-success strong {
    display: block;
    margin-bottom: 4px;
}

.contact-error {
    background: #fce4ec;
    color: #c62828;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .contact-card {
        padding: 28px 20px;
    }
    .contact-form-row {
        grid-template-columns: 1fr;
    }
}

/* ========== NAV AUTH LINKS ========== */
.nav-link-register {
    background: var(--color-accent);
    color: white !important;
}

.nav-link-register:hover {
    background: var(--color-accent-dark);
}

.like-btn-login {
    text-decoration: none;
    font-size: 0.85rem;
}

/* ========== SCROLL FEED (mobile only) ========== */
.feed {
    display: none;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: calc(var(--real-vh, 100vh) - 64px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.feed-slide {
    height: calc(var(--real-vh, 100vh) - 64px);
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.feed-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Feed carousel (horizontal swipe inside vertical feed) */
.feed-carousel {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.feed-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}
.feed-carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}
.feed-carousel-slide .feed-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feed-carousel-dots {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 6;
}
.feed-cdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: all 0.25s;
}
.feed-cdot.active {
    background: #fff;
    width: 16px;
    border-radius: 3px;
}

/* Feed video */
video.feed-img {
    object-fit: cover;
}

.feed-sound-icon {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 1.2rem;
    background: rgba(0,0,0,0.5);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: transform 0.2s;
}
.feed-sound-flash {
    transform: scale(1.3);
}

.feed-img-landscape {
    object-fit: cover;
}

.feed-img-portrait {
    object-fit: contain;
    background: #111;
}

.feed-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: none;
}

.feed-info {
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 80px;
    z-index: 2;
    color: white;
}

.feed-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.feed-featured-badge {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 3;
}
.feed-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feed-actions {
    position: absolute;
    right: 12px;
    bottom: 100px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.feed-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    text-decoration: none;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5));
    transition: transform 0.15s ease;
}

.feed-action-btn:active {
    transform: scale(1.2);
}

.feed-like-btn.liked {
    color: var(--color-heart);
}

.feed-action-count {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========== COMMENT BOTTOM SHEET ========== */
.feed-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
}

.feed-sheet-backdrop.open {
    display: block;
}

.feed-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background: var(--color-surface);
    border-radius: 20px 20px 0 0;
    z-index: 301;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.feed-sheet.open {
    transform: translateY(0);
}

.feed-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.feed-sheet-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.feed-sheet-close {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px;
}

.feed-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-sheet-comment {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.feed-sheet-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.feed-sheet-comment-body {
    flex: 1;
    min-width: 0;
}

.feed-sheet-comment-user {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text);
}

.feed-sheet-comment-text {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 2px;
    line-height: 1.4;
}

.feed-sheet-comment-date {
    font-size: 0.7rem;
    color: var(--color-text-light);
    margin-top: 4px;
    opacity: 0.7;
}

.feed-sheet-loading,
.feed-sheet-empty {
    text-align: center;
    color: var(--color-text-light);
    padding: 32px;
    font-size: 0.9rem;
}

.feed-sheet-footer {
    border-top: 1px solid var(--color-border);
    padding: 12px 16px;
    flex-shrink: 0;
}

.feed-comment-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.feed-comment-input-wrap input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
}

.feed-comment-input-wrap input:focus {
    border-color: var(--color-accent);
}

.feed-comment-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.feed-comment-send:hover {
    background: var(--color-accent-dark);
}

.feed-login-prompt {
    display: block;
    text-align: center;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--color-text);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 32px 24px;
    font-size: 0.85rem;
    margin-top: auto;
}
.footer-signature {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    opacity: 0.5;
}
.footer-signature a {
    color: inherit;
    text-decoration: none;
}
.footer-signature a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ========== PROJECTS ========== */
/* Portfolio home — projects showcase */
.projects-section { margin-top: 3rem; }
.projects-showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.project-showcase-card { text-decoration: none; color: var(--color-text); transition: transform 0.3s; }
.project-showcase-card:hover { transform: translateY(-4px); }
.project-showcase-cover { position: relative; border-radius: var(--radius, 12px); overflow: hidden; background: var(--color-surface); }
.project-showcase-cover img { width: 100%; height: auto; display: block; transition: transform 0.5s; }
.project-showcase-card:hover .project-showcase-cover img { transform: scale(1.05); }
.project-showcase-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0.3; }
.project-showcase-count { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.7rem; padding: 3px 8px; border-radius: 100px; backdrop-filter: blur(4px); }
.project-showcase-title { display: block; font-size: 1rem; font-weight: 600; margin-top: 0.5rem; color: var(--color-text); text-decoration: none; }
.project-showcase-title:hover { color: var(--color-accent); }

/* Project carousel */
.project-carousel {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: var(--radius, 12px);
    overflow: hidden;
    background: var(--color-surface);
}
.project-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease;
}
.project-carousel-slide {
    min-width: 100%;
    height: 100%;
}
.project-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
}
.project-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.2s;
}
.project-dot.active {
    background: #fff;
    width: 18px;
    border-radius: 3px;
}
.project-carousel-hint {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.35);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 3;
    opacity: 0.7;
    transition: opacity 0.3s;
    pointer-events: none;
    animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(3px); }
}

/* Project detail page */
.project-detail { padding: 2rem 0; }
.project-back { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--color-accent); text-decoration: none; font-size: 0.9rem; margin-bottom: 1.5rem; }
.project-back:hover { text-decoration: underline; }
.project-header { margin-bottom: 2rem; }
.project-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-description { color: var(--color-text); opacity: 0.7; line-height: 1.7; margin-bottom: 0.5rem; }
.project-count { font-size: 0.8rem; opacity: 0.5; }
.project-actions-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}
.project-actions-bar .detail-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.project-actions-bar .detail-action-pill:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
/* Preview button */
.project-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
    padding: 0.6rem 1.4rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.project-preview-btn:hover { opacity: 0.85; }

/* Preview overlay */
.project-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
}
.project-preview-overlay.active { display: flex; }
.project-preview-video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    outline: none;
}
.project-preview-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s;
}
.project-preview-close:hover { background: rgba(255,255,255,0.25); }

.project-actions-bar .detail-action-pill.liked {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.project-gallery { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 3rem; }
.project-gallery-item img { width: 100%; border-radius: var(--radius, 8px); }
.project-gallery-text { margin-top: 0.5rem; text-align: center; }
.project-gallery-caption { font-size: 0.9rem; font-weight: 600; opacity: 0.8; }
.project-gallery-desc { font-size: 0.85rem; opacity: 0.6; margin-top: 0.25rem; line-height: 1.6; font-style: italic; }
@media (max-width: 640px) {
    .projects-showcase { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .project-header h1 { font-size: 1.5rem; }
    .project-gallery { gap: 1rem; }
}

/* Projects view — horizontal scroll rows */
.projects-list { display: flex; flex-direction: column; gap: 3rem; padding: 1rem 0; }
.project-row-header h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.project-row-header h2 a { color: var(--color-text); text-decoration: none; }
.project-row-header h2 a:hover { color: var(--color-accent); }
.project-row-header p { font-size: 0.9rem; opacity: 0.6; margin-bottom: 0.25rem; }
.project-row-count { font-size: 0.75rem; opacity: 0.4; }
.project-row-carousel { position: relative; margin-top: 1rem; }
.project-hscroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}
.project-hscroll::-webkit-scrollbar { display: none; }
.project-hscroll-item {
    min-width: 320px;
    max-width: 450px;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
}
.project-hscroll-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    border-radius: var(--radius, 10px);
    background: rgba(0,0,0,0.03);
    cursor: pointer;
}
.project-hscroll-caption {
    display: block;
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 0.3rem;
    font-style: italic;
}
.project-hscroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 4;
    transition: opacity 0.2s, background 0.2s;
}
.project-hscroll-arrow:hover { background: rgba(0,0,0,0.7); }
.project-hscroll-prev { left: 8px; }
.project-hscroll-next { right: 8px; }
@media (max-width: 640px) {
    .project-hscroll-arrow { width: 30px; height: 30px; }
}
.project-row-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.75rem;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}
.project-row-link:hover { text-decoration: underline; }

/* Project cards — carousel view */
.projects-cards {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 0;
}
.project-card-full {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 12px);
    overflow: hidden;
}
.pcard-carousel {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #111;
    cursor: grab;
}
.pcard-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease;
}
.pcard-slide {
    min-width: 100%;
    height: 100%;
}
.pcard-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pcard-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 4;
    transition: opacity 0.2s, background 0.2s;
}
.pcard-arrow:hover { background: rgba(0,0,0,0.7); }
.pcard-prev { left: 10px; }
.pcard-next { right: 10px; }
.pcard-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
}
.pcard-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.25s;
}
.pcard-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}
.pcard-info {
    padding: 1rem 1.25rem;
}
.pcard-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}
.pcard-title:hover { color: var(--color-accent); }
.pcard-desc {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 0.3rem;
    line-height: 1.5;
}
.pcard-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    opacity: 0.5;
}
.pcard-meta a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    opacity: 1;
}
.pcard-meta a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .projects-cards { gap: 1.5rem; }
    .pcard-arrow { width: 30px; height: 30px; }
    .pcard-info { padding: 0.75rem 1rem; }
}

/* Mobile projects view (unused) */
.mobile-projects-view { display: none; }
@media (max-width: 640px) {
    .mobile-projects-view { display: block; }
    .project-hscroll-item { min-width: 260px; max-width: 300px; }
}

/* ========== RESPONSIVE — TABLET ========== */
@media (max-width: 968px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .photo-grid-masonry { grid-template-columns: repeat(2, 1fr); }
    .photo-grid-list { grid-template-columns: 1fr; }
    .photo-grid-two-col { grid-template-columns: repeat(2, 1fr); }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero {
        padding: 70px 24px;
    }

    /* Tablet: hide center nav, show hamburger */
    .menu-toggle {
        display: flex;
    }

    .nav-center {
        display: none;
    }

    /* Keep right nav visible on tablet */
    .nav-right {
        display: flex;
    }
}

/* ========== RESPONSIVE — MOBILE ========== */
@media (max-width: 640px) {
    .menu-toggle {
        display: flex;
    }

    .nav-center,
    .nav-right {
        display: none;
    }

    .photo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .photo-grid-masonry { grid-template-columns: 1fr; }
    .photo-grid-two-col { grid-template-columns: 1fr; }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero {
        padding: 60px 20px;
    }

    .detail-title {
        font-size: 1.6rem;
    }

    .gallery-section {
        padding: 40px 0 60px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Mobile : adapt photo detail */
    .detail-showcase-landscape {
        height: auto;
        max-height: 70vh;
    }

    .detail-showcase-portrait {
        min-height: auto;
        padding: 20px 16px;
    }

    .detail-showcase-portrait .detail-photo {
        max-height: 70vh;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-info-side {
        position: static;
    }

    .detail-side-actions {
        flex-direction: row;
        padding: 12px;
    }

    .comments-section {
        padding: 20px;
    }

    .detail-title {
        font-size: 1.6rem;
    }

    .detail-floating-bar {
        padding: 12px 16px;
    }

    /* ===== Hide desktop grid, show feed ===== */
    .desktop-view {
        display: none;
    }

    .feed {
        display: block;
    }

    /* Hide footer when feed is present + lock body scroll */
    body:has(.feed) .footer {
        display: none;
    }

    body:has(.feed) {
        overflow: hidden;
    }
}
