:root {
    /* Premium Royal Palette */
    --color-bg-deep: #0a0f1c; /* Deepest Navy */
    --color-bg-surface: #131b2f; /* Dark Navy Surface */
    --color-primary: #d4af37; /* Royal Gold */
    --color-primary-glow: rgba(212, 175, 55, 0.4);
    --color-accent: #0ea5e9; /* Sky Blue accent */
    --color-text-main: #f8fafc; /* Pearl White */
    --color-text-muted: #94a3b8; /* Slate Gray */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-glass-bg: rgba(19, 27, 47, 0.6);
    --color-glass-border: rgba(255, 255, 255, 0.1);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 35px 0 rgba(0, 0, 0, 0.5), 0 0 20px var(--color-primary-glow);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-bg-deep);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Scrollbar for a Premium Feel */
::-webkit-scrollbar {
    width: 6px;
    height: 4px; /* Thin horizontal scrollbar for mobile */
}
::-webkit-scrollbar-track {
    background: var(--color-bg-deep);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5); /* Soft gold */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Typography Helpers */
.fw-bold { font-weight: 600; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Animated Background */
.bg-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--color-bg-deep);
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: drift 20s infinite alternate ease-in-out;
}

.shape-primary {
    width: 50vw; height: 50vw;
    background: rgba(212, 175, 55, 0.15); /* Gold blob */
    top: -10%; right: -10%;
}

.shape-accent {
    width: 60vw; height: 60vw;
    background: rgba(14, 165, 233, 0.1); /* Blue blob */
    bottom: -20%; left: -10%;
    animation-delay: -10s;
}

.bg-mesh {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, 50px) scale(1.1); }
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: start;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--color-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 40px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}
.sidebar::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 0 30px 0;
}

.bismillah {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-primary);
    text-align: center;
    line-height: 1.4;
    opacity: 0.9;
}

.profile-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
}

/* Profile Image with Ring */
.profile-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top; /* Important fix applied */
    border: 4px solid var(--color-bg-surface);
    position: relative;
    z-index: 2;
}

.status-ring {
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--color-primary), var(--color-accent), var(--color-primary));
    z-index: 1;
    animation: spin 4s linear infinite;
}

.status-ring::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--color-bg-surface);
    border-radius: 50%;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Quick Info Sidebar */
.quick-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.info-item:hover {
    background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(212,175,55,0.05) 100%);
    transform: translateY(-4px); /* Fixes the right-side clipping issue */
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), inset 0 0 15px rgba(212, 175, 55, 0.05);
}

.info-item:hover .icon-box {
    background: var(--color-primary);
    color: var(--color-bg-deep);
    box-shadow: 0 0 15px var(--color-primary-glow);
    transform: scale(1.15) rotate(10deg);
}

.icon-box {
    width: 40px; height: 40px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-normal);
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Main Content area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 100px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.header-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--color-primary), #a67c00);
    color: var(--color-bg-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-main);
    letter-spacing: 1px;
}

.card {
    padding: 30px;
}

/* Data Rows */
.data-row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-fast);
}

.data-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.data-row:first-child {
    padding-top: 0;
}

.data-row.align-top {
    align-items: flex-start;
}

.data-row:hover .data-label {
    color: var(--color-primary);
}

.data-label {
    flex: 0 0 160px;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.data-value {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.highlight {
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.9rem;
    display: block;
}

.blood-badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-main);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

.blood-badge-premium:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.droplet-icon {
    color: #ef4444;
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
}

/* Family Background */
.family-member {
    margin-bottom: 25px;
}
.family-member:last-child {
    margin-bottom: 0;
}

.member-role {
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: 15px;
    display: inline-block;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 2px;
}

.divider {
    height: 1px;
    background: var(--color-border);
    margin: 25px 0;
}

.premium-list {
    list-style: none;
}

.premium-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.premium-list li::before {
    content: "◈";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: 0.8rem;
    top: 3px;
}

/* Educational Timeline */
.timeline {
    padding: 30px;
}

.timeline-item {
    position: relative;
    padding-left: 35px;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 5px; top: 0; bottom: -30px;
    width: 2px;
    background: var(--color-border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: 0; top: 0;
    width: 12px; height: 12px;
    background: var(--color-bg-deep);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition-normal);
}

.timeline-item:hover .timeline-marker {
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary-glow);
    transform: scale(1.3);
}

.timeline-year {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-subtitle {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Extraordinary Timeline Hover Effects */
.timeline-item.interactive-hover:hover {
    transform: none; /* Override generic hover */
    box-shadow: none;
    border-color: transparent;
}

.timeline-content {
    padding: 15px 25px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    position: relative;
    z-index: 1;
}

.timeline-item:hover .timeline-content {
    background: rgba(19, 27, 47, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(212, 175, 55, 0.25),
        inset 0 0 20px rgba(212, 175, 55, 0.08);
    transform: scale(1.03) translateX(15px);
}

/* Training Grid */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.training-card {
    padding: 25px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.training-icon {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.year-badge {
    position: absolute;
    top: 15px; right: 15px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* Contact Details */
.address-text {
    line-height: 1.8;
    color: var(--color-text-muted);
    font-size: 1.05rem;
}
.address-text strong {
    color: var(--color-text-main);
    font-weight: 500;
}

.contact-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.btn-whatsapp {
    background: #16a34a;
    color: white;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.btn-whatsapp:hover {
    background: #15803d;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.btn-phone {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.btn-phone:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

/* Hover Effects wrapper */
.interactive-hover {
    transition: var(--transition-normal);
}
.interactive-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

/* Floating Action Button (Mobile) */
.fab-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px; height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 100;
    text-decoration: none;
    transition: var(--transition-normal);
}

.fab-whatsapp:hover {
    transform: scale(1.1) rotate(5deg);
}

.fab-pulse {
    position: absolute;
    width: 100%; height: 100%;
    background: #25D366;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Footer */
.footer {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding-top: 20px;
}
.pulse-heart {
    color: #ef4444;
    animation: heartbeat 1.5s infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Scroll Animations */
.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.stagger-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px auto;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        height: auto;
    }
    
    .sidebar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0;
        justify-content: center;
    }
    
    .profile-card {
        width: 100%;
    }
    
    .quick-info {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .info-item {
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .data-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .data-label {
        flex: auto;
        color: var(--color-primary);
        font-size: 0.85rem;
    }
    
    .section {
        padding: 0;
    }
    
    .card, .timeline, .training-card, .profile-card {
        padding: 20px;
    }
    
    .name {
        font-size: 1.6rem;
    }
    
    .fab-whatsapp {
        bottom: 20px; right: 20px;
    }
}
