:root {
    /* Color Palette - Premium Soft Rose Gold and Warm Neutral */
    --primary-bg: #fffbf9;
    --text-primary: #2d2a26;
    --text-secondary: #5c5855;
    --accent-color: #d4af37; /* Metallic Gold Accent */
    --accent-light: #f7e6c1;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(255, 255, 255, 0.5);
    
    /* Gradient Background Colors */
    --gradient-1: #ffd1d1;
    --gradient-2: #ffe6cf;
    --gradient-3: #f5d1ff;

    /* Typographic Settings */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing and Radius */
    --border-radius: 20px;
    --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 16px 50px rgba(212, 175, 55, 0.15);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--primary-bg);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Immersive Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(120deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    background-size: 300% 300%;
    animation: flowBg 15s ease infinite;
    opacity: 0.4;
    filter: blur(80px);
}

@keyframes flowBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 50px;
    margin-bottom: 40px;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.photo-container {
    position: relative;
    flex-shrink: 0;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.photo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), #ffb2e6);
    filter: blur(20px);
    opacity: 0.6;
    z-index: 1;
    animation: pulse 4s infinite alternate;
}

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

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 400;
}

.quick-facts {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 1);
}

.badge i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* Card Grids */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .quick-facts {
        justify-content: center;
    }
}

.card {
    padding: 35px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-divider {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-light);
    display: inline-block;
}

.icon-box {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.icon-box i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* Accent Card variants */
.accent-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(247, 230, 193, 0.6));
}
.accent-card .icon-box.accent {
    background: var(--accent-color);
}
.accent-card .icon-box.accent i {
    color: white;
}

/* Lists */
.detail-list {
    list-style: none;
}

.detail-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
    position: relative;
}

.detail-list li.vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.detail-list li.vertical .value {
    text-align: left;
    width: 100%;
}

.detail-list li:last-child {
    border-bottom: none;
}

.detail-list li::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.detail-list li:hover::after {
    width: 100%;
}

.label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 160px;
}

.value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
    flex: 1;
}

/* Timeline specific */
.timeline {
    position: relative;
    padding-left: 20px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

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

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

.timeline h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.timeline-subtitle {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.timeline-desc {
    font-size: 0.9rem;
    color: #777;
}

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

.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    transition: background 0.3s;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.9);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 2px;
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-item .label {
    font-size: 0.85rem;
    min-width: auto;
    margin-bottom: 4px;
}

.contact-item .value {
    text-align: left;
    font-size: 0.95rem;
    white-space: nowrap;   /* prevent phone/email breaking mid-word */
}

/* Address spans can still wrap, and honour \n */
.contact-item.full-width .value {
    white-space: pre-line;
    word-break: break-word;
}

.full-width {
    grid-column: 1 / -1;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.positive {
    background: #e6f6ee;
    color: #1a8f59;
}

/* Inline link value (e.g. LinkedIn) */
.link-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0a66c2;
    font-weight: 600;
    text-decoration: none;
    background: rgba(10, 102, 194, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(10, 102, 194, 0.2);
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.link-value:hover {
    background: rgba(10, 102, 194, 0.15);
    border-color: rgba(10, 102, 194, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.15);
}

.link-value i {
    font-size: 1.05rem;
    color: #0a66c2;
}

/* Animations using GSAP or CSS */
.section-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    /* Set dynamic delay if visible at same time */
    transition-delay: calc(var(--delay) * 0.1s);
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer i {
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.3); }
    60% { transform: scale(1); }
}

.mt-top {
    margin-top: 25px;
}

/* Top Action Bar (Buttons & Language) */
.top-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    z-index: 100;
    position: relative;
    flex-wrap: wrap;
    gap: 15px;
}

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

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.75);
    padding: 10px 18px;
    border-radius: 30px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

.btn i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.lang-lbl {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d1d1d1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Export Mode Overrides (PDF and Image) */
.export-mode {
    background: #fffcf9 !important; /* A solid, clean background for exports */
}

.export-mode::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: linear-gradient(120deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    opacity: 0.15; /* A soft overlay so glassmorphism feels natural but flat */
}

.export-mode .card, .export-mode .hero {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Turn off transitions & show everything for export */
.export-mode .section-fade {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 20px;
    border-top: 1px solid var(--card-border);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.online-ref {
    font-size: 0.85rem !important;
    opacity: 0.8;
}

.online-ref a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.online-ref a:hover {
    text-decoration: underline;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 650px) {

    .detail-list li .value {
        text-align: right;
        color: var(--text-primary);
        font-weight: 600;
        word-break: break-word;
    }
    
    .detail-list li .label {
        color: var(--accent-color);
        min-width: 110px;
        flex-shrink: 0;
    }

    /* Stack grid elements */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Reduce spacing for small screens */
    .hero {
        padding: 30px 20px;
    }

    .card {
        padding: 25px 20px;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }
    
    .profile-photo {
        width: 140px;
        height: 140px;
    }

    /* Make action buttons and language stack/center nicely */
    .top-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
    }

    .lang-toggle {
        justify-content: center;
        margin-top: 5px;
    }
}

