/* Layout - Intro Section */
.intro-section {
    height: 300vh;
    position: relative;
    z-index: 10;
}

.intro-sticky-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Four Corners */
.corner-element {
    position: absolute;
    font-family: var(--font-mono);
    color: var(--fg-dim);
    font-size: 0.85rem;
    padding: 2rem;
    z-index: 20;
}

.top-left {
    top: 0;
    left: 0;
}

.top-right {
    top: 0;
    right: 0;
}

.bottom-left {
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bottom-right {
    bottom: 0;
    right: 0;
}

.corner-element a {
    color: var(--fg-dim);
    transition: color 0.3s ease;
}

.corner-element a:hover {
    color: var(--fg);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    animation: pulseDot 2s infinite;
}

/* Center Content */
.intro-center {
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
    z-index: 20;
}

.eyebrow {
    font-family: var(--font-mono);
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    opacity: 0;
    /* Animated in via JS or CSS */
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.6s;
    /* after loader */
}

.headline {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3em;
}

.word-overflow {
    overflow: hidden;
    display: inline-block;
    padding-bottom: 0.2em;
    /* prevent descender clipping */
}

.word {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.word.italic {
    font-style: italic;
}

.word.accent {
    color: var(--accent);
}

.tagline {
    font-size: 1.1rem;
    color: var(--fg-muted);
    font-family: var(--font-body);
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 2.5s;
}

/* Scroll Cue */
.scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    color: var(--fg-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 3s;
    z-index: 20;
    --max-opacity: 0.4;
    /* Reduced from 1.0 — too prominent */
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
    animation: stretchDown 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    transform-origin: top;
}

/* Canvas background container */
.data-landscape-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Fixed UI Elements */
.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.nav-bar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, visibility 0.8s;
}

.nav-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.nav-brand {
    font-family: var(--font-mono);
    color: var(--fg);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.nav-links a {
    color: var(--fg-dim);
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--fg);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Scroll Ruler */
.scroll-ruler {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%) translateX(-20px);
    height: 30vh;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 90;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s;
}

.scroll-ruler.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.ruler-progress {
    width: 100%;
    background: var(--accent);
    transform-origin: top;
    transform: scaleY(0);
}

/* Waypoints */
.waypoints {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 90;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s;
}

.waypoints.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.waypoints button {
    background: none;
    border: none;
    color: var(--fg-dim);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
}

.waypoints button:hover,
.waypoints button.active {
    color: var(--accent);
    transform: translateX(-4px);
}

/* Status Strip */
.status-strip {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 3rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--fg-dim);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
    border-top: 1px solid var(--glass-border);
    z-index: 90;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s;
}

.status-strip.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--fg);
    transition: 0.3s;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .scroll-ruler,
    .waypoints {
        display: none !important;
    }

    .status-strip {
        padding: 0.75rem 1.5rem;
    }

    .nav-bar {
        padding: 1.5rem 1.5rem;
    }
}

/* Base Content Sections */
.content-section {
    padding: 8rem 2rem;
    position: relative;
    z-index: 10;
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.section-container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-meta {
    font-family: var(--font-mono);
    color: var(--fg-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--fg);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-line {
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 4rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--fg-dim);
    transform: translateX(-4.5px);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-dot.current {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px 2px rgba(0, 200, 150, 0.4);
}

.timeline-content {
    background: transparent;
    transition: transform 0.3s ease;
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.role {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--fg);
    margin: 0;
}

.dates {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--fg-dim);
}

.company {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.description {
    color: var(--fg-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--fg-dim);
    background: var(--glass-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

/* Scroll Reveals */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}