/* ===========================================================
   Model Listing — Luxury Fashion Stylesheet
   Core CSS3 · No frameworks
   =========================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --color-bg: #ffffff;
    --color-bg-alt: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-secondary: #6b7280;
    --color-text-light: #9ca3af;
    --color-accent: #1a1a2e;
    --color-accent-warm: #c8a97e;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    --max-width: 1320px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

img.loaded {
    opacity: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-light);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--color-accent);
}

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

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

.header-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    position: relative;
    padding-bottom: 2px;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-accent-warm);
    transition: width var(--transition-smooth);
}

.header-nav a:hover {
    color: var(--color-text);
}

.header-nav a:hover::after {
    width: 100%;
}

/* ── Hero Section ── */
.hero {
    text-align: center;
    padding: 80px 40px 60px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent-warm), transparent);
}

.hero-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent-warm);
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.hero-title em {
    font-style: italic;
    color: var(--color-accent-warm);
}

.hero-description {
    max-width: 560px;
    margin: 0 auto;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
}

/* ── Model Grid ── */
.models-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 40px 100px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

/* ── Model Card ── */
.model-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    cursor: pointer;
    position: relative;
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.model-card-link {
    display: block;
}

.model-card-image {
    position: relative;
    width: 100%;
    padding-top: 130%;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.model-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.model-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

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

.model-card-info {
    padding: 24px 24px 28px;
    text-align: center;
}

.model-card-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.model-card-location {
    font-size: 0.82rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
}

/* ── Profile Page ── */
.profile-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-height));
    max-width: var(--max-width);
    margin: 0 auto;
}

.profile-image-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.profile-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 600px;
}

.profile-details-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 60px 60px 80px;
}

.profile-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent-warm);
    margin-bottom: 12px;
    font-weight: 500;
}

.profile-name {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 32px;
    color: var(--color-text);
}

.profile-bio {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 40px;
    font-weight: 300;
    max-width: 500px;
}

/* ── Profile Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    margin-bottom: 40px;
}

.stat-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}

.stat-item:hover {
    background: var(--color-bg-alt);
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-text);
}

.stat-value a {
    color: var(--color-accent-warm);
}

.stat-value a:hover {
    text-decoration: underline;
}

/* ── Portfolio / Gallery Section ── */
.portfolio-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 40px 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent-warm);
    margin-bottom: 12px;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 400;
    color: var(--color-text);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    cursor: pointer;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background var(--transition-smooth);
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.15);
}

.gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform var(--transition-smooth);
    pointer-events: none;
}

.gallery-zoom-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-text);
    fill: none;
    stroke-width: 2;
}

.gallery-item:hover .gallery-zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
    cursor: zoom-out;
}

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

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

/* ── Hire Me Section ── */
.hire-section {
    text-align: center;
    padding: 60px 40px 100px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hire-divider {
    width: 80px;
    height: 1.5px;
    background: var(--color-accent-warm);
    margin: 0 auto 40px;
}

.hire-text {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: 12px;
}

.hire-subtext {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 40px;
}

.btn-hire {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 56px;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-hire::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-accent-warm), #b8956a);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    border-radius: inherit;
}

.btn-hire:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(26, 26, 46, 0.3);
}

.btn-hire:hover::before {
    opacity: 1;
}

.btn-hire span {
    position: relative;
    z-index: 1;
}

.btn-hire svg {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--color-border-light);
}

.footer-text {
    font-size: 0.8rem;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
}

/* ── Back Link ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    padding: 12px 0;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-text);
}

.back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: transform var(--transition-fast);
}

.back-link:hover svg {
    transform: translateX(-4px);
}

/* ── Fade-in Animation ── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Empty / Error States ── */
.empty-state {
    text-align: center;
    padding: 120px 40px;
}

.empty-state h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--color-text-secondary);
    font-weight: 300;
}

/* ===========================================================
   Responsive
   =========================================================== */

/* ── Tablet ── */
@media (max-width: 1024px) {
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-image-section img {
        min-height: 500px;
        max-height: 65vh;
    }

    .profile-details-section {
        padding: 48px 40px 60px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-inner {
        padding: 0 24px;
    }

    .hero {
        padding: 60px 24px 40px;
    }

    .models-section {
        padding: 20px 24px 80px;
    }
}

/* ── Mobile ── */
@media (max-width: 640px) {
    :root {
        --header-height: 64px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .header-nav {
        gap: 20px;
    }

    .header-nav a {
        font-size: 0.75rem;
    }

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

    .hero-description {
        font-size: 0.92rem;
    }

    .model-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .models-section {
        padding: 12px 16px 60px;
    }

    .hero {
        padding: 48px 16px 32px;
    }

    .profile-details-section {
        padding: 32px 20px 48px;
    }

    .profile-name {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .portfolio-section {
        padding: 60px 16px 40px;
    }

    .hire-section {
        padding: 40px 16px 60px;
    }

    .btn-hire {
        padding: 18px 40px;
        font-size: 0.82rem;
    }

    .profile-image-section img {
        min-height: 400px;
    }
}

@media (max-width: 400px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Externalized inline styles ── */
.nav-icon {
    vertical-align: -2px;
    margin-right: 4px;
}

.db-error {
    text-align: center;
    margin-top: 100px;
    font-family: sans-serif;
    color: #333;
}
