/* ==========================================================================
   1. Corporate Variables, Alternating Four-Color Gradient & Reset
   ========================================================================== */
:root {
    --bg-canvas: #f8f9fb;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f4f8;
    --bg-sidebar: #0d1321;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-on-dark: #f3f4f6;

    /* Four-Color Alternating Palette */
    --c-blue: #4285f4;
    --c-red: #ea4335;
    --c-amber: #fbbc05;
    --c-green: #34a853;

    /* Smooth Alternating Gradient */
    --gradient-alternating: linear-gradient(
        120deg,
        var(--c-blue) 0%,
        var(--c-red) 34%,
        var(--c-amber) 68%,
        var(--c-green) 100%
    );

    --border-hairline: #e5e7eb;
    --border-medium: #d1d5db;

    --sidebar-width: 268px;
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --speed-fast: 0.2s;
    --speed-med: 0.34s;
}

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

html {
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. Sidebar Navigation & Smooth Drawer Transitions
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.25rem 1.5rem;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform var(--speed-med) var(--ease-smooth);
}

.sidebar-top {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-monogram {
    display: inline-block;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ffffff;
    padding: 0.42rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--c-blue);
    border-radius: 0 6px 6px 0;
    margin-bottom: 0.85rem;
}

.sidebar-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    color: #9ca3af;
    font-weight: 600;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.72rem 0.95rem;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: color var(--speed-fast) ease, background-color var(--speed-fast) ease, border-color var(--speed-fast) ease;
}

.nav-num {
    font-family: monospace;
    font-size: 0.78rem;
    opacity: 0.65;
}

/* Understated Hover & Active States */
.nav-link:hover {
    color: #f9fafb;
    background-color: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #ffffff;
    background-color: rgba(66, 133, 244, 0.12);
    border-left-color: var(--c-blue);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    color: #e5e7eb;
    font-size: 0.78rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-green);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-sidebar);
    color: #ffffff;
    padding: 0 1.25rem;
    align-items: center;
    justify-content: space-between;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-title {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 26px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #f9fafb;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 19, 33, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--speed-med) ease;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   3. Main Content Container & Section Structure
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 3.5rem clamp(1.75rem, 5vw, 4.5rem);
    max-width: 1140px;
}

.section {
    padding: 4.25rem 0;
    border-bottom: 1px solid var(--border-hairline);
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.section-num {
    font-family: monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--c-blue);
    background: rgba(66, 133, 244, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.section-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   4. Hero Section (Long-Name Safe + Rounded Profile Photo)
   ========================================================================== */
.hero-section {
    padding-top: 2rem;
    padding-bottom: 4.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3.5rem;
}

.hero-info {
    min-width: 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-blue);
    margin-bottom: 0.75rem;
}

/* Fluid scale + clean wrapping so long names flow smoothly */
.hero-name {
    font-size: clamp(1.95rem, 3.4vw, 2.85rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.15rem;
    max-width: 20ch;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.hero-description {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 58ch;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.72rem 1.45rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color var(--speed-fast) ease, border-color var(--speed-fast) ease, color var(--speed-fast) ease;
}

.btn-primary {
    background-color: var(--bg-sidebar);
    color: #ffffff;
    border: 1px solid var(--bg-sidebar);
}

.btn-primary:hover {
    background-color: #1f2937;
    border-color: #1f2937;
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle);
    border-color: #9ca3af;
}

/* Rounded Profile Photo with Smooth Alternating Gradient Ring */
.hero-profile {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-ring {
    width: 215px;
    height: 215px;
    padding: 3px;
    border-radius: 50%;
    background: var(--gradient-alternating);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.profile-inner {
    width: 100%;
    height: 100%;
    padding: 4px;
    background-color: var(--bg-canvas);
    border-radius: 50%;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background-color: #e5e7eb;
}

/* ==========================================================================
   5. Expandable Divs with Smooth Alternating Gradient Borders
   ========================================================================== */
.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.gradient-card {
    background: var(--gradient-alternating);
    padding: 1.5px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.03);
    transition: box-shadow var(--speed-fast) ease;
}

/* Subtle hover: gentle elevation in shadow only */
.gradient-card:hover {
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.07);
}

.card-inner {
    background-color: var(--bg-surface);
    border-radius: 10.5px;
    overflow: hidden;
}

.card-header {
    width: 100%;
    background: none;
    border: none;
    padding: 1.35rem 1.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--speed-fast) ease;
}

.card-header:hover {
    background-color: #fafbfc;
}

.card-meta {
    display: block;
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--c-blue);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.card-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Smooth Plus/Minus Indicator */
.expand-icon {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-left: 1.25rem;
}

.expand-icon::before,
.expand-icon::after {
    content: "";
    position: absolute;
    border-radius: 2px;
    background-color: var(--text-muted);
    transition: transform var(--speed-med) var(--ease-smooth), background-color var(--speed-fast) ease;
}

.expand-icon::before {
    top: 7px;
    left: 0;
    width: 16px;
    height: 2px;
}

.expand-icon::after {
    top: 0;
    left: 7px;
    width: 2px;
    height: 16px;
}

.expandable-card.expanded .expand-icon::after {
    transform: rotate(90deg);
    background-color: var(--c-blue);
}

.expandable-card.expanded .expand-icon::before {
    background-color: var(--c-blue);
}

/* Smooth Accordion Drawer */
.card-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--speed-med) var(--ease-smooth);
}

.expandable-card.expanded .card-body {
    grid-template-rows: 1fr;
}

.card-body-content {
    overflow: hidden;
    padding: 0 1.65rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: padding var(--speed-med) var(--ease-smooth);
}

.expandable-card.expanded .card-body-content {
    padding: 1.15rem 1.65rem 1.5rem 1.65rem;
    border-top: 1px solid var(--border-hairline);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.1rem;
}

.card-links {
    margin-top: 1.15rem;
    display: flex;
    gap: 1.5rem;
}

.card-links a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-blue);
    text-decoration: none;
    transition: color var(--speed-fast) ease;
}

.card-links a:hover {
    color: var(--c-green);
}

/* ==========================================================================
   6. Drop-In Styled Language Divs (Alternating 4-Color Left Accents)
   ========================================================================== */
.language-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

/* Place <div class="lang-badge">Language</div> anywhere */
.lang-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.95rem;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid var(--border-hairline);
    border-left: 3px solid var(--c-blue);
    border-radius: 8px;
    transition: border-color var(--speed-fast) ease, background-color var(--speed-fast) ease;
}

.lang-badge:nth-child(4n + 2) {
    border-left-color: var(--c-red);
}

.lang-badge:nth-child(4n + 3) {
    border-left-color: var(--c-amber);
}

.lang-badge:nth-child(4n + 4) {
    border-left-color: var(--c-green);
}

/* Very subtle hover */
.lang-badge:hover {
    border-color: var(--border-medium);
    background-color: #fafbfc;
}

/* ==========================================================================
   7. Contact Section
   ========================================================================== */
.contact-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: 12px;
    padding: 0.5rem 1.65rem;
}

.contact-row {
    display: flex;
    align-items: center;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-hairline);
}

.contact-row:last-child {
    border-bottom: none;
}

.contact-label {
    width: 120px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.contact-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--speed-fast) ease;
}

.contact-value:hover {
    color: var(--c-blue);
}

/* ==========================================================================
   8. Mobile Responsive Layout
   ========================================================================== */
@media (max-width: 960px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        padding-top: 5rem;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 5.5rem 1.5rem 3rem 1.5rem;
    }

    /* Mobile: Centered Rounded Profile Photo, Name, and Short Description */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-profile {
        order: -1;
    }

    .profile-ring {
        width: 165px;
        height: 165px;
    }

    .hero-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-name {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}