@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-border: #334155;
    --text: #F8FAFC;
    --muted: #cbd5e1;
    --primary: #38BDF8;
    --secondary: #818CF8;
    --accent: #0D9488;
    --success: #22C55E;
    --error: #EF4444;
    --warning: #F59E0B;
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--primary);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
    color: var(--secondary);
    text-decoration: underline;
    text-decoration-color: var(--secondary);
}

img, video, .rounded-lg, .rounded-md, .rounded {
    border-radius: var(--radius);
}

button, input, textarea, select {
    border-radius: var(--radius);
}

.section-space {
    padding-top: clamp(64px, 8vw, 120px);
    padding-bottom: clamp(64px, 8vw, 120px);
}

.surface {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
}

.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--bg);
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4cd4ff, #9aa7ff);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}

.link-muted {
    color: var(--muted);
}

.link-muted:hover {
    color: var(--text);
}

.gradient-arch {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.bg-surface {
    background: var(--surface);
}

.text-soft {
    color: var(--text);
}

.text-muted {
    color: var(--muted);
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-accent { background: var(--accent); }
.bg-surface-strong { background: #111827; }

.input-control, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"], textarea, select {
    background: #1E293B;
    border: 1px solid #334155;
    color: var(--text);
    padding: 12px 16px;
    border-radius: var(--radius);
    width: 100%;
}

.input-control:focus, input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.tag-badge {
    background: #0D9488;
    color: #E0F2F1;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.surface-border {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
}

.shadow-soft {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.border-surface-border {
    border-color: var(--surface-border) !important;
}

/* Site footer */
.site-footer {
    background: #020617;
    color: var(--text);
    padding: 64px 0;
    margin-top: 64px;
    border-top: 1px solid #334155;
}

.hero-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.hero-name {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    color: var(--text);
    line-height: 1.05;
}

.hero-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    line-height: 1.2;
}

.hero-sub-cyan { color: var(--primary); }
.hero-sub-indigo { color: var(--secondary); }

@media (min-width: 768px) {
    .hero-stack { align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-name { font-size: clamp(2.25rem, 10vw, 3rem); }
}

.footer-grid {
    align-items: start;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--secondary);
}

.footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.footer-social:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-meta {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-meta {
        flex-direction: row;
        justify-content: center;
        gap: 24px;
    }
}

.footer-meta-text {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0;
}

.footer-meta-link {
    color: var(--muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-meta-link:hover {
    color: var(--primary);
}

/* Minimalist page headers */
.page-header {
    padding: 80px 0 60px 0;
    text-align: center;
}

.page-header-left {
    text-align: left;
}

.page-header-left .header-accent {
    margin: 0;
}

.page-header h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.header-accent {
    width: 70px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px 0;
    }
    
    .page-header h1 {
        font-size: clamp(2rem, 7vw, 2.8rem);
    }
}

/* Gallery filter bar */
.filter-bar {
    background: transparent;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid transparent;
}

.filter-bar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-bottom-color: var(--surface-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Privacy consent checkbox */
.privacy-consent {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    padding: 16px 0;
}

.privacy-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary);
    transition: border-color 0.2s ease;
}

.privacy-consent input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.privacy-consent input[type="checkbox"]:hover {
    border-color: var(--primary);
}

.privacy-consent label {
    cursor: pointer;
    user-select: none;
}

/* Masonry grid for public gallery */
.masonry {
    column-gap: 1rem;
    column-fill: balance;
    column-count: 1;
}

.masonry-item {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1rem;
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(8px);
}

/* Image protection overlay */
.img-protect {
    position: relative;
}

.img-protect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Honeypot field hiding */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* Transition helper to keep previous timing */
.transition-all {
    transition: all 0.3s ease;
}

/* Gallery filter buttons */
.filter-btn {
    background: #f3f4f6;
    color: #374151;
}

.filter-btn:hover {
    background: #e5e7eb;
}

.filter-btn.active {
    background: #2563eb;
    color: #ffffff;
}

/* Line clamp helpers (non-plugin) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fade-in animation used on home page */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

/* Login page masonry background */
.masonry-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    padding: 16px;
    z-index: -1;
    column-count: 7;
    column-gap: 8px;
    overflow: hidden;
    filter: blur(3px);
}

.masonry-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1;
    pointer-events: none;
}

.masonry-bg .masonry-item {
    break-inside: avoid;
    margin-bottom: 8px;
    position: relative;
    z-index: 0;
}

.masonry-bg .masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

@media (max-width: 1440px) {
    .masonry-bg { column-count: 6; }
}

@media (max-width: 1280px) {
    .masonry-bg { column-count: 6; }
}

@media (max-width: 1024px) {
    .masonry-bg { column-count: 5; }
}

@media (max-width: 768px) {
    .masonry-bg { column-count: 4; padding: 12px; }
}

@media (max-width: 480px) {
    .masonry-bg { column-count: 3; padding: 10px; }
}

/* Login card stacking order */
.login-card {
    position: relative;
    z-index: 10;
}

/* Database error fallback page */
.db-error-page {
    font-family: 'Inter', sans-serif;
    max-width: 600px;
    margin: 100px auto;
    padding: 20px;
    background: #f5f5f5;
}

.db-error-box {
    background: #ffeeee;
    border: 2px solid #cc3333;
    border-radius: 8px;
    padding: 20px;
}
