/* ============================================
   Matrimonial Bio Data — Premium Stylesheet
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary palette — warm golds & maroons */
    --gold-50: #fefce8;
    --gold-100: #fef9c3;
    --gold-200: #fef08a;
    --gold-300: #fde047;
    --gold-400: #facc15;
    --gold-500: #c8a02a;
    --gold-600: #a07d1e;
    --gold-700: #7a5d16;
    --gold-800: #5c4512;

    --maroon-50: #fdf2f8;
    --maroon-100: #fce7f3;
    --maroon-400: #a0344e;
    --maroon-500: #881337;
    --maroon-600: #6b1029;
    --maroon-700: #500c1f;
    --maroon-800: #3b0917;

    --cream: #faf7f0;
    --cream-dark: #f0ead6;
    --ivory: #fffdf5;

    /* Neutrals */
    --text-primary: #1a1412;
    --text-secondary: #4a3f35;
    --text-muted: #8a7e72;
    --border-light: #e8dfd0;
    --border-gold: #d4b861;

    /* Glassmorphism */
    --glass-bg: rgba(255, 253, 245, 0.72);
    --glass-border: rgba(212, 184, 97, 0.3);
    --glass-shadow: rgba(136, 19, 55, 0.06);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Typography */
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    overflow-x: hidden;

    /* Rich gradient background */
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(254, 240, 138, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 85% 90%, rgba(160, 52, 78, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(212, 184, 97, 0.1) 0%, transparent 70%),
        linear-gradient(160deg, #f5efe0 0%, #faf7f0 30%, #f8f0e0 60%, #f0e6d0 100%);
    background-attachment: fixed;

    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* ---------- Background Particles ---------- */
.bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particle-float 18s infinite var(--ease-out);
}

.particle-1 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(212, 184, 97, 0.15) 0%, transparent 70%);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
    animation-duration: 22s;
}
.particle-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(160, 52, 78, 0.1) 0%, transparent 70%);
    top: 60%;
    right: -3%;
    animation-delay: 4s;
    animation-duration: 20s;
}
.particle-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.2) 0%, transparent 70%);
    bottom: 5%;
    left: 30%;
    animation-delay: 8s;
    animation-duration: 25s;
}
.particle-4 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(200, 160, 42, 0.12) 0%, transparent 70%);
    top: 25%;
    right: 20%;
    animation-delay: 2s;
    animation-duration: 18s;
}
.particle-5 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(136, 19, 55, 0.08) 0%, transparent 70%);
    top: 45%;
    left: 15%;
    animation-delay: 10s;
    animation-duration: 24s;
}
.particle-6 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(212, 184, 97, 0.18) 0%, transparent 70%);
    bottom: 20%;
    right: 15%;
    animation-delay: 6s;
    animation-duration: 16s;
}

@keyframes particle-float {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(1.1);
    }
}

/* ---------- Main Card ---------- */
.biodata-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    padding: var(--space-3xl) var(--space-2xl);
    
    /* Glassmorphism card */
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    
    /* Layered shadows for depth */
    box-shadow:
        0 4px 6px -1px rgba(136, 19, 55, 0.04),
        0 10px 15px -3px rgba(136, 19, 55, 0.06),
        0 25px 50px -12px rgba(136, 19, 55, 0.1),
        0 0 0 1px rgba(212, 184, 97, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);

    /* Entry animation */
    animation: card-enter 1s var(--ease-out) both;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Decorative Border ---------- */
.card-border {
    position: absolute;
    inset: 10px;
    border: 2px double var(--border-gold);
    border-radius: calc(var(--radius-xl) - 6px);
    pointer-events: none;
    opacity: 0.5;
}

/* ---------- Corner Ornaments ---------- */
.ornament {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
    opacity: 0.4;
    z-index: 2;
}

.ornament::before,
.ornament::after {
    content: "";
    position: absolute;
    background: var(--gold-500);
}

.ornament-tl {
    top: 20px;
    left: 20px;
}
.ornament-tl::before {
    top: 0; left: 0;
    width: 24px; height: 2px;
}
.ornament-tl::after {
    top: 0; left: 0;
    width: 2px; height: 24px;
}

.ornament-tr {
    top: 20px;
    right: 20px;
}
.ornament-tr::before {
    top: 0; right: 0;
    width: 24px; height: 2px;
}
.ornament-tr::after {
    top: 0; right: 0;
    width: 2px; height: 24px;
}

.ornament-bl {
    bottom: 20px;
    left: 20px;
}
.ornament-bl::before {
    bottom: 0; left: 0;
    width: 24px; height: 2px;
}
.ornament-bl::after {
    bottom: 0; left: 0;
    width: 2px; height: 24px;
}

.ornament-br {
    bottom: 20px;
    right: 20px;
}
.ornament-br::before {
    bottom: 0; right: 0;
    width: 24px; height: 2px;
}
.ornament-br::after {
    bottom: 0; right: 0;
    width: 2px; height: 24px;
}

/* ---------- Header ---------- */
.header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    animation: fade-up 0.8s 0.2s var(--ease-out) both;
}

.header-ornament {
    margin-bottom: var(--space-sm);
    color: var(--gold-500);
}

.header-swirl {
    width: 120px;
    height: 18px;
    display: inline-block;
    opacity: 0.5;
}

.om-symbol {
    font-size: 2.5rem;
    color: var(--maroon-500);
    line-height: 1;
    margin-bottom: var(--space-xs);
    text-shadow: 0 2px 8px rgba(136, 19, 55, 0.15);
    animation: gentle-glow 4s ease-in-out infinite alternate;
}

@keyframes gentle-glow {
    from { text-shadow: 0 2px 8px rgba(136, 19, 55, 0.15); }
    to   { text-shadow: 0 2px 16px rgba(136, 19, 55, 0.3), 0 0 40px rgba(212, 184, 97, 0.1); }
}

.subheading {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--maroon-400);
    letter-spacing: 0.08em;
    margin-bottom: var(--space-lg);
}

.title {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    
    /* Gold gradient text */
    background: linear-gradient(
        145deg,
        var(--maroon-600) 0%,
        var(--maroon-500) 30%,
        var(--gold-600) 60%,
        var(--maroon-500) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Title divider */
.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.divider-line {
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.divider-diamond {
    color: var(--gold-500);
    font-size: 0.65rem;
    animation: diamond-spin 8s linear infinite;
}

@keyframes diamond-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---------- Profile Section ---------- */
.profile-section {
    text-align: center;
    margin-bottom: var(--space-2xl);
    animation: fade-up 0.8s 0.4s var(--ease-out) both;
}

.photo-frame {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-lg);
}

.photo-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--gold-300),
        var(--maroon-400),
        var(--gold-500),
        var(--maroon-500),
        var(--gold-300)
    );
    opacity: 0.25;
    filter: blur(16px);
    animation: glow-rotate 8s linear infinite;
}

@keyframes glow-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 4px solid var(--ivory);
    box-shadow:
        0 0 0 2px var(--border-gold),
        0 8px 24px rgba(136, 19, 55, 0.15);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-out);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 0 2px var(--border-gold),
        0 12px 32px rgba(136, 19, 55, 0.2);
}

.photo-ring {
    position: absolute;
    inset: -8px;
    border: 2px dashed var(--border-gold);
    border-radius: 50%;
    opacity: 0.35;
    animation: ring-spin 30s linear infinite;
}

@keyframes ring-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xs);
}

.profile-tagline {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ---------- Info Sections ---------- */
.info-section {
    margin-bottom: var(--space-xl);
    animation: fade-up 0.8s var(--ease-out) both;
}

.info-section:nth-child(4) { animation-delay: 0.5s; }
.info-section:nth-child(5) { animation-delay: 0.65s; }
.info-section:nth-child(6) { animation-delay: 0.8s; }

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--maroon-500), var(--maroon-600));
    color: white;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(136, 19, 55, 0.2);
}

.section-icon svg {
    width: 16px;
    height: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--maroon-600);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-gold), transparent);
    min-width: 40px;
}

/* ---------- Details Grid ---------- */
.details-grid {
    background: rgba(255, 253, 245, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
    overflow: hidden;
}

.detail-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: background-color 0.3s var(--ease-out);
}

.detail-row:hover {
    background: rgba(212, 184, 97, 0.08);
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(232, 223, 208, 0.6);
}

.detail-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    padding-top: 2px;
}

.detail-value {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 500;
}

.detail-sub {
    display: inline;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    margin-left: 4px;
}

/* ---------- Photo Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-out);
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(136, 19, 55, 0.18);
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover .gallery-photo {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 20, 18, 0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: var(--space-md);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

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

.gallery-caption {
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---------- Social Buttons ---------- */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.social-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: white;
    font-family: var(--font-body);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    background: rgba(255, 255, 255, 0.1);
}

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

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.instagram-btn {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 4px 14px rgba(225, 48, 108, 0.3);
}

.social-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.social-btn-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.social-btn-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.social-btn-sub {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 1px;
}

.social-arrow {
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.3s var(--ease-spring), opacity 0.3s;
}

.social-btn:hover .social-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    margin-top: var(--space-2xl);
    animation: fade-up 0.8s 0.95s var(--ease-out) both;
}

.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.footer-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    font-style: italic;
    color: var(--maroon-500);
    letter-spacing: 0.05em;
    animation: gentle-glow 4s ease-in-out infinite alternate;
}

/* ---------- Shared Animation ---------- */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .particle { animation: none; opacity: 0; }
    .biodata-card { animation: none; opacity: 1; }
    .header,
    .profile-section,
    .info-section,
    .footer { animation: none; opacity: 1; transform: none; }
    .om-symbol { animation: none; }
    .divider-diamond { animation: none; }
    .photo-glow { animation: none; }
    .photo-ring { animation: none; }
    .footer-text { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    body {
        padding: var(--space-md) var(--space-sm);
    }

    .biodata-card {
        padding: var(--space-2xl) var(--space-lg);
        border-radius: var(--radius-lg);
    }

    .card-border {
        inset: 6px;
        border-radius: calc(var(--radius-lg) - 4px);
    }

    .title {
        font-size: 2rem;
    }

    .profile-photo {
        width: 140px;
        height: 140px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .detail-row {
        grid-template-columns: 130px 1fr;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }

    .detail-label {
        font-size: 0.75rem;
    }

    .detail-value {
        font-size: 0.82rem;
    }

    .section-title {
        font-size: 1.15rem;
    }
    
    .ornament {
        display: none;
    }

    .gallery-grid {
        gap: var(--space-sm);
    }

    .social-btn {
        padding: var(--space-sm) var(--space-md);
    }

    .social-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 420px) {
    .biodata-card {
        padding: var(--space-xl) var(--space-md);
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .detail-label::after {
        content: ":";
    }

    .detail-value {
        padding-left: var(--space-sm);
    }

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

    .gallery-item {
        aspect-ratio: 1;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .bg-particles {
        display: none;
    }

    .biodata-card {
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: white;
        border: 1px solid #ccc;
        max-width: 100%;
        animation: none;
    }

    .header,
    .profile-section,
    .info-section,
    .footer {
        animation: none;
    }

    .photo-glow,
    .photo-ring,
    .particle {
        display: none;
    }

    .om-symbol,
    .divider-diamond,
    .footer-text {
        animation: none;
    }
}
