@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@400;700&display=swap');

:root {
    --bg-color: #f8f9fa;
    --text-color: #2d3748;
    --primary-color: #1a365d;
    /* Deep Slate Blue */
    --secondary-color: #2f855a;
    /* Soft Sage */
    --accent-color: #3182ce;
    /* Modern Blue */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --section-padding: 6rem 2rem;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
}

/* Layered Cake Structure */
.section-layer {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--section-padding);
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-layer:nth-child(even) {
    background-color: #ffffff;
}

.section-layer:nth-child(odd) {
    background-color: #f1f5f9;
}

/* Hero Section Refined */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a365d 0%, #2a4365 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero-container {
    max-width: 900px;
    width: 100%;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .profile-header {
        flex-direction: row;
        justify-content: center;
        /* Center the side-by-side group */
        text-align: left;
    }

    .header-text {
        align-items: flex-start;
        text-align: left;
    }
}

.power-skills {
    display: flex;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    /* Bold */
    color: #FFD700;
    /* Accessible Gold on Dark Blue */
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    /* Centered on mobile */
}

@media (min-width: 768px) {
    .power-skills {
        justify-content: flex-start;
        /* Left-aligned relative to name on desktop */
    }
}

.power-skills .divider {
    opacity: 0.4;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3.5rem;
    color: white;
    margin: 0;
    letter-spacing: -0.02em;
}

.career-statement {
    font-size: 1.25rem;
    line-height: 1.8;
    font-weight: 300;
    opacity: 0.9;
    max-width: 800px;
    margin: 2.5rem auto 0;
}

/* Interactive Timeline */
#timeline-section {
    padding-left: 0;
    padding-right: 0;
    padding-top: 2rem;
    background-color: #b8c5d5;
}

.timeline-navigation {
    width: 95%;
    /* Allow some margin on the sides */
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding: 4rem 2rem;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    /* Enable scrolling if nodes overflow */
    -webkit-overflow-scrolling: touch;
}

.timeline-nodes-container {
    display: flex;
    justify-content: center;
    /* Changed from space-between to center */
    gap: 4rem;
    /* Use gap for spacing between centered nodes */
    align-items: flex-start;
    position: relative;
    width: 100%;
    padding-top: 2rem;
}

.timeline-node {
    flex: 0 0 auto;
    /* Prevent nodes from growing and overlapping */
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    /* Ensure nodes are above the line */
    transition: var(--transition);
    width: 180px;
    /* Consistent width for nodes */
}

.timeline-line {
    position: absolute;
    top: 2.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    /* Match the span of the nodes */
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
    pointer-events: none;
    /* Prevent the line from blocking clicks */
}

.node-dot {
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border: 4px solid #cbd5e0;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.timeline-node.active .node-dot {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(49, 130, 206, 0.2);
}

.timeline-node:hover .node-dot {
    border-color: var(--accent-color);
}

.node-info {
    text-align: center;
    opacity: 0.7;
    transition: var(--transition);
}

.timeline-node.active .node-info {
    opacity: 1;
}

.node-year {
    display: block;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.node-role {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.node-org {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Accomplishments Content */
.timeline-content-area {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 300px;
    background: white;
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    position: relative;
}

.accomplishments-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.accomplishments-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accomplishments-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.accomplishments-panel ul {
    list-style: none;
    padding-left: 1.5rem;
}

.accomplishments-panel li {
    margin-bottom: 1rem;
    position: relative;
    font-size: 1.1rem;
}

.accomplishments-panel li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
}

/* Quick Navigation Strip */
.quick-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1.75rem 2rem;
    background: var(--primary-color);
}

.quick-nav-link {
    color: white;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    padding: 0.9rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 2rem;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
}

.quick-nav-link::after {
    content: " →";
    opacity: 0.7;
    font-size: 1rem;
}

.quick-nav-link:hover {
    color: var(--primary-color);
    background: white;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.quick-nav-link:hover::after {
    opacity: 1;
}

/* Subject Sections */

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.subject-card {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.subject-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Contact & Footer */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

button {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

button:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .timeline-navigation {
        padding: 2rem 1rem;
        /* Less padding to bring content up */
        overflow-x: hidden;
        /* No more horizontal scroll */
    }

    .timeline-nodes-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        /* 2x3 Grid */
        gap: 1.5rem;
        justify-items: center;
        padding: 0;
    }

    .timeline-line {
        display: none;
        /* Hide line in grid view */
    }

    .timeline-node {
        width: 100%;
        max-width: 160px;
        flex: none;
    }

    .node-dot {
        margin-bottom: 0.75rem;
    }

    .timeline-content-area {
        padding: 2rem 1.5rem;
        margin-top: 1rem;
    }
}

/* =============================================
   Site-Wide Navigation Bar
   ============================================= */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 2rem;
    background: var(--primary-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
}

.site-nav-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    padding: 1rem 1.1rem;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.site-nav-link:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

.site-nav-link.active {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

/* =============================================
   Subject Page Template
   ============================================= */

/* Top nav bar with back arrow */
.sp-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.sp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0.85;
    transition: var(--transition);
    padding: 0.4rem 0.75rem;
    border-radius: 2rem;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.sp-back:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
}

.sp-back::before {
    content: "←";
    font-size: 1.1rem;
}

.sp-topbar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.04em;
}

/* Subject hero banner */
.sp-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2a4365 60%, #2c5282 100%);
    color: white;
    padding: 5rem 2rem 4rem;
    text-align: center;
}

.sp-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.sp-hero-tag {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #FFD700;
    margin-bottom: 1rem;
}

.sp-hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.sp-hero-sub {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.88;
    line-height: 1.7;
}

/* Stats row */
.sp-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2.5rem 2rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.sp-stat {
    text-align: center;
}

.sp-stat-value {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.sp-stat-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Main content area */
.sp-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.sp-section-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.sp-section-title {
    font-size: 1.9rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
}

/* Card grid */
.sp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-bottom: 4rem;
}

.sp-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.sp-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.sp-card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.sp-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.85;
}

.sp-card ul {
    padding-left: 1.5rem;
    margin-top: 0.75rem;
    list-style: disc;
}

.sp-card ul li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

/* Highlight / callout block */
.sp-callout {
    background: linear-gradient(135deg, #ebf8ff, #e6fffa);
    border-radius: 1.25rem;
    padding: 2.5rem;
    margin-bottom: 4rem;
    border-left: 5px solid var(--accent-color);
}

.sp-callout p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--primary-color);
    font-weight: 400;
}

/* Subject page footer */
.sp-footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2.5rem 2rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 768px) {
    .sp-hero h1 {
        font-size: 2rem;
    }



    .sp-stats {
        gap: 2rem;
    }

    .sp-content {
        padding: 2.5rem 1.25rem;
    }
}

/* ── Process Circle Diagram ─────────────────────────────── */
.sp-process {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 3rem 2rem;
    background: #f8f9fb;
    flex-wrap: wrap;
}

.sp-process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sp-circle {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: var(--navy, #1a2f5e);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    box-shadow: 0 6px 24px rgba(26,47,94,0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sp-circle:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26,47,94,0.3);
}

.sp-circle span {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

.sp-process-arrow {
    font-size: 3.5rem;
    color: var(--gold, #c9a84c);
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .sp-process {
        flex-direction: column;
        gap: 0.75rem;
    }

    .sp-process-arrow {
        transform: rotate(90deg);
    }

    .sp-circle {
        width: 150px;
        height: 150px;
    }
}