:root {
    --primary-color: #E31B21;
    /* Updated per request */
    --secondary-color: #a81216;
    --accent-color: #E31B21;
    /* Using primary as accent for consistency or a lighter shade if needed */
    --text-color: #333;
    --light-bg: #F5EBE1;
    /* Updated per request */
    --white: #ffffff;
    --font-heading: 'Encode Sans', sans-serif;
    /* Updated font */
    --font-body: 'Encode Sans', sans-serif;
    /* Updated font */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.narrow-container {
    max-width: 800px;
}

.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.text-white {
    color: var(--white);
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.7);
}

/* Scroll Progress */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.8rem 0;
    /* Slightly smaller padding */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: transform 0.4s ease-in-out, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

    /* Default hidden state */
    transform: translateY(-100%);
}

.navbar.visible {
    transform: translateY(0);
}

.nav-content {
    display: flex;
    justify-content: center;
    /* Center alignment */
    align-items: center;
}

/* .nav-brand removed */

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 1.5rem;
    /* Symmetry spacing */
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    /* Changed from 100vh to fix iframe resizing loops */
    height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--white);
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Default PC Image */
    background-image: url('https://placehold.co/1920x1080?text=Desktop+Banner(PC)');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Overlay and Text removed as they are now part of the image design */
.hero-overlay,
.hero-content,
.hero-tag,
.hero-title,
.hero-lead {
    display: none;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    opacity: 0.8;
    animation: floating 2s infinite;
}

@keyframes floating {
    0% {
        transform: translate(-50%, 0px);
    }

    50% {
        transform: translate(-50%, 10px);
    }

    100% {
        transform: translate(-50%, 0px);
    }
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

/* Intro Text */
.intro-section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #444;
}

.dropcap:first-letter {
    float: left;
    font-size: 4rem;
    line-height: 0.8;
    font-weight: 700;
    margin-right: 10px;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.highlight-box {
    text-align: center;
    margin: 3rem 0;
}

.quote-container {
    background: rgba(227, 27, 33, 0.05);
    /* Light red bg */
    border-radius: 8px;
    padding: 3rem 2rem;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.pull-quote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    font-style: italic;
    color: var(--text-color);
    text-align: center;
    position: relative;
    z-index: 2;
}

.pull-quote cite {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: normal;
    color: var(--primary-color);
    margin-top: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Bio Section */
.bio-section {
    background-color: var(--white);
}

.bio-card {
    background: var(--white);
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bio-header {
    background: linear-gradient(135deg, var(--primary-color), #c41419);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--white);
    border-radius: 12px 12px 0 0;
}

.bio-avatar img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.bio-title h3 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.bio-title p {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.bio-item {
    display: flex;
    flex-direction: column;
}

.bio-item.full-width {
    grid-column: 1 / -1;
}

.bio-item .label {
    font-weight: 600;
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.bio-item .value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* Timeline Section */
.timeline-section {
    background-color: var(--light-bg);
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

#timeline-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.timeline-item {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    /* Centered relative to container width, controlled by margins */
    margin-bottom: 4rem;
    width: 100%;
}

.timeline-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 45%;
    /* Keep some space for the center */
    position: relative;
    border-top: 3px solid var(--primary-color);
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--white);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 20px;
    /* Align with top of card roughly */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: all 0.3s;
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    background: var(--primary-color);
}

/* Alternating Sides */
.timeline-item:nth-child(even) {
    justify-content: flex-start;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
    text-align: right;
}

/* For even items (left side), content is on left, empty space on right. */
/* Wait, flex justification is better. */

/* Resetting basic approach for timeline */
.timeline-item {
    display: flex;
    width: 100%;
    margin-bottom: 3rem;
    align-items: flex-start;
}

/* Odd items (Right side) */
.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

/* Even items (Left side) */
.timeline-item:nth-child(even) {
    flex-direction: row;
}

/* Spacer logic to push content to sides */
.timeline-item::before {
    content: '';
    flex: 1;
}

.timeline-content {
    flex: 1;
    /* Takes up 50% roughly */
    max-width: 45%;
    margin: 0 2rem;
    /* Spacing from center line */
}

/* Date Tag */
.timeline-date {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.timeline-item.timeline-current .timeline-content {
    border: 2px solid var(--primary-color);
    background: #fff5f5;
}

/* Vision/Insight */
.insight-box {
    background: var(--white);
    padding: 2rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 2rem 0;
}

.insight-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(rgba(227, 27, 33, 0.9), rgba(168, 18, 22, 0.95)), url('https://placehold.co/1920x1080?text=Stats');
    background-size: cover;
    background-attachment: fixed;
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: #333;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Article Images */
.article-image {
    margin: 2rem 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-image figcaption {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    font-family: var(--font-heading);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .section {
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {

    /* Navbar Mobile */
    .nav-content {
        flex-direction: column;
        padding-bottom: 0.5rem;
    }

    .nav-brand {
        margin-bottom: 0.5rem;
    }

    .nav-links {
        display: flex;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        /* Scrollbar space */
        justify-content: center;
        -webkit-overflow-scrolling: touch;
        margin-left: 0;
    }

    .nav-links a {
        margin: 0 10px;
        font-size: 0.85rem;
        margin-left: 0;
        margin-right: 15px;
    }

    /* Scrollbar hide for cleaner look */
    .nav-links::-webkit-scrollbar {
        height: 0px;
        background: transparent;
    }

    /* Hero Mobile Background */
    .hero {
        height: 600px;
    }

    .hero-bg {
        background-image: url('https://placehold.co/600x800?text=Mobile+Banner(Mobile)');
        background-position: center top;
    }

    /* Timeline Mobile */
    .timeline-item {
        flex-direction: column !important;
        align-items: center;
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        margin-bottom: 2rem;
        width: 100%;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-content {
        max-width: 100%;
        margin: 0;
        text-align: left !important;
        width: 100%;
    }

    .timeline-dot {
        display: none;
    }

    /* Force hide SVG on mobile */
    #timeline-svg {
        display: none !important;
    }

    /* Bio & General */
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bio-header {
        flex-direction: column;
        text-align: center;
    }

    .pull-quote {
        font-size: 1.2rem;
    }

    .dropcap:first-letter {
        font-size: 3rem;
        margin-right: 5px;
    }

    /* Stats */
    .stat-number {
        font-size: 2.5rem;
    }

    /* Typography */
    .section-title {
        font-size: 1.5rem;
    }
}