/* ============================================
   Matrimonial Biodata — Refined Elegant Theme
   ============================================ */

:root {
    --burgundy: #6B2D3E;
    --burgundy-deep: #4A1E2B;
    --gold: #B8956A;
    --gold-light: #D4BA94;
    --gold-muted: #C9A96E;
    --cream: #FAF7F2;
    --cream-warm: #F3EDE4;
    --ivory: #FFFDF8;
    --white: #FFFFFF;
    --text-primary: #2A2017;
    --text-secondary: #6B5E52;
    --text-muted: #9B8E82;
    --border-light: rgba(184, 149, 106, 0.15);
    --border-medium: rgba(184, 149, 106, 0.25);
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-subtle: 0 1px 3px rgba(42, 32, 23, 0.04);
    --shadow-card: 0 2px 12px rgba(42, 32, 23, 0.06);
    --shadow-elevated: 0 8px 30px rgba(42, 32, 23, 0.08);
    --radius: 10px;
    --transition: all 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--ivory);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ─── Navigation ──────────────────────────── */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.main-nav.scrolled {
    box-shadow: var(--shadow-card);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--burgundy);
    letter-spacing: 0.5px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

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

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 100px;
    transition: var(--transition);
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.nav-links a:hover {
    color: var(--burgundy);
    background: rgba(107, 45, 62, 0.05);
}

.nav-cta {
    background: var(--burgundy) !important;
    color: var(--white) !important;
    padding: 7px 18px !important;
}

.nav-cta:hover {
    background: var(--burgundy-deep) !important;
}

/* ─── Hero ────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(160deg, var(--cream) 0%, var(--ivory) 40%, var(--cream-warm) 100%);
    padding: 100px 24px 80px;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(184, 149, 106, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(107, 45, 62, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 960px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 64px;
    position: relative;
    z-index: 1;
}

.hero-image-wrapper {
    flex-shrink: 0;
}

.hero-image-frame {
    width: 300px;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-elevated);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-text {
    flex: 1;
}

.hero-blessing {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--gold);
    font-style: italic;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-divider-line {
    width: 48px;
    height: 1.5px;
    background: var(--gold);
    margin: 20px 0;
}

.hero-tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.8px;
    margin-bottom: 36px;
}

.hero-scroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--burgundy);
    color: var(--white);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: var(--transition);
}

.hero-scroll-btn:hover {
    background: var(--burgundy-deep);
    transform: translateY(-1px);
}

/* ─── Section Basics ──────────────────────── */
.section-line {
    max-width: 120px;
    height: 1px;
    background: var(--border-medium);
    margin: 0 auto;
}

.section {
    padding: 72px 24px;
}

.section-alt {
    background: var(--cream);
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.section-subtitle {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    margin-bottom: 40px;
}

/* ─── About Section ──────────────────────── */
.about-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.about-text-block {
    flex: 1;
}

.about-text-block p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 16px;
    line-height: 1.85;
}

.about-text-block p:last-child {
    margin-bottom: 0;
}

.about-text-block a {
    color: var(--burgundy);
    border-bottom: 1px solid var(--border-medium);
    transition: var(--transition);
}

.about-text-block a:hover {
    border-color: var(--burgundy);
}

.about-photo {
    flex-shrink: 0;
    width: 240px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-light);
}

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

/* ─── Glance / Detail Rows ────────────────── */
.glance-grid,
.jathakam-grid,
.pref-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-subtle);
}

.glance-row,
.jathakam-row,
.pref-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
}

.glance-row:hover,
.jathakam-row:hover,
.pref-row:hover {
    background: rgba(184, 149, 106, 0.04);
}

/* Remove bottom border from last two items in a 2-col grid */
.glance-grid .glance-row:nth-last-child(-n+2),
.jathakam-grid .jathakam-row:nth-last-child(-n+2),
.pref-grid .pref-row:nth-last-child(-n+2) {
    border-bottom: none;
}

.glance-label,
.jathakam-label,
.pref-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 16px;
}

.glance-value,
.jathakam-value,
.pref-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

/* ─── Journey / Career ────────────────────── */
.journey-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.journey-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.journey-header {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.journey-entry {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light);
}

.journey-entry:last-child {
    border-bottom: none;
}

.journey-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 16px;
}

.journey-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.profile-link {
    color: var(--burgundy);
    border-bottom: 1px solid var(--border-medium);
    transition: var(--transition);
    font-weight: 500;
}

.profile-link:hover {
    border-color: var(--burgundy);
    opacity: 0.8;
}

/* ─── Family ──────────────────────────────── */
.family-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.family-member {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
}

.family-member:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.family-role {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--burgundy);
    margin-bottom: 8px;
}

.family-detail {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.family-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.family-summary {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 20px 24px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-subtle);
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ─── Photo Gallery ───────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/4;
    border: 1px solid var(--border-light);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.gallery-hover {
    position: absolute;
    inset: 0;
    background: rgba(42, 32, 23, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-hover {
    opacity: 1;
}

.gallery-item:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
}

/* ─── Lightbox ────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition);
}

.lightbox-close:hover { color: white; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* ─── Contact ─────────────────────────────── */
.contact-layout {
    text-align: center;
}

.contact-note {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 28px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
    color: var(--text-secondary);
}

.contact-link:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.contact-link svg {
    flex-shrink: 0;
    color: var(--burgundy);
}

.contact-link-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.contact-link-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

.footer-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ─── Scroll Animations ───────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ──────────────────────────── */

@media (max-width: 768px) {
    .section { padding: 56px 20px; }
    .section-title { font-size: 1.6rem; }

    /* Nav */
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--ivory);
        flex-direction: column;
        padding: 72px 20px 40px;
        gap: 2px;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.08);
        transition: right 0.3s ease;
        z-index: 999;
    }
    .nav-links.open { right: 0; }
    .nav-links a {
        font-size: 0.9rem;
        padding: 10px 14px;
        width: 100%;
        border-radius: 8px;
    }
    .nav-cta { margin-top: 8px; text-align: center !important; }

    /* Hero */
    .hero { padding: 90px 20px 60px; min-height: auto; }
    .hero-content { flex-direction: column; text-align: center; gap: 40px; }
    .hero-image-frame { width: 220px; height: 290px; }
    .hero-text { text-align: center; }
    .hero-name { font-size: 2.6rem; }
    .hero-divider-line { margin: 16px auto; }
    .hero-tagline { font-size: 0.88rem; }

    /* About */
    .about-layout { flex-direction: column-reverse; }
    .about-photo { width: 100%; max-width: 280px; margin: 0 auto; }
    .about-photo img { height: 260px; }

    /* Grids to single column */
    .glance-grid, .jathakam-grid, .pref-grid { grid-template-columns: 1fr; }
    .glance-row, .jathakam-row, .pref-row { flex-direction: column; gap: 2px; }
    .glance-value, .jathakam-value, .pref-value { text-align: left; }
    .glance-grid .glance-row:nth-last-child(-n+2),
    .jathakam-grid .jathakam-row:nth-last-child(-n+2),
    .pref-grid .pref-row:nth-last-child(-n+2) { border-bottom: 1px solid var(--border-light); }
    .glance-grid .glance-row:last-child,
    .jathakam-grid .jathakam-row:last-child,
    .pref-grid .pref-row:last-child { border-bottom: none; }

    /* Journey */
    .journey-layout { grid-template-columns: 1fr; }
    .journey-entry { flex-direction: column; gap: 2px; }
    .journey-value { text-align: left; }

    /* Family */
    .family-cards { grid-template-columns: 1fr; }
    .family-summary { flex-direction: column; gap: 12px; }

    /* Gallery */
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .gallery-item:first-child { grid-row: span 1; aspect-ratio: 3/4; }

    /* Contact */
    .contact-links { flex-direction: column; align-items: center; }
    .contact-link { width: 100%; max-width: 300px; justify-content: center; }

    /* Lightbox */
    .lightbox-prev, .lightbox-next { width: 36px; height: 36px; font-size: 1.2rem; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
    .section { padding: 44px 16px; }
    .section-title { font-size: 1.4rem; }
    .hero { padding: 80px 16px 48px; }
    .hero-image-frame { width: 180px; height: 240px; }
    .hero-name { font-size: 2.1rem; }
    .hero-scroll-btn { padding: 10px 22px; font-size: 0.8rem; }
    .gallery-grid { gap: 8px; }
    .contact-link { padding: 16px 20px; }
}
