:root {
    --primary-bg: #F7F4EA;
    --secondary-bg: #EDF4E8;
    --accent-bg: #FFFFFF;
    --button-bg: #074300;
    --button-hover-bg: #125607;
    --primary-text: #18311D;
    --secondary-text: #125607;
    --muted-text: #536854;
    --inverse-text: #FFFFFF;
    --surface-highlight: #E2EEDD;
    --border-color: #C9D9C4;
    --soft-border: rgba(7, 67, 0, 0.12);
    --soft-shadow: 0 12px 40px rgba(7, 67, 0, 0.08);
    --strong-shadow: 0 18px 48px rgba(7, 67, 0, 0.14);
    --font-family-primary: 'Manrope', sans-serif;
    --font-family-secondary: 'Fraunces', serif;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.875rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3.5rem;
    --transition-fast: 180ms ease;
    --transition-normal: 260ms ease;
    --transition-slow: 420ms ease;
    --easing-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    padding-top: 0;
    font-family: var(--font-family-primary);
    font-size: 1rem;
    font-weight: 400;
    color: var(--primary-text);
    line-height: 1.65;
    transition: opacity 220ms ease;
    background:
        radial-gradient(circle at top left, rgba(226, 238, 221, 0.9), transparent 36%),
        radial-gradient(circle at top right, rgba(201, 217, 196, 0.55), transparent 28%),
        linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--button-bg), #4ade80);
    z-index: 2000;
    transition: width 80ms linear;
    pointer-events: none;
}

body.page-exit {
    opacity: 0;
    pointer-events: none;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

a:hover {
    color: var(--button-hover-bg);
}

p {
    margin: 0 0 1rem;
    color: var(--muted-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.8rem;
    font-family: var(--font-family-secondary);
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-text);
    letter-spacing: -0.02em;
}

main {
    flex: 1;
}

.resize-animation-stopper *,
.resize-animation-stopper *::before,
.resize-animation-stopper *::after {
    transition: none !important;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    padding: 0.75rem 1rem;
    background: var(--button-bg);
    color: var(--inverse-text);
    border-radius: var(--radius-sm);
    z-index: 2000;
}

.skip-link:focus {
    top: 16px;
}

/* Keyboard focus ring */
:focus-visible {
    outline: 2px solid var(--button-bg);
    outline-offset: 3px;
}

.button:focus-visible {
    outline-offset: 4px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1400;
    width: 100%;
    margin: 0 0 0.85rem;
    border-bottom: 1px solid rgba(201, 217, 196, 0.92);
    background: rgba(247, 244, 234, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(7, 67, 0, 0.06);
    transition: box-shadow var(--transition-normal), background var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(247, 244, 234, 0.98);
    box-shadow: 0 10px 24px rgba(7, 67, 0, 0.08);
}

.navbar.scrolled .nav-container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.75rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: padding var(--transition-normal);
}

.nav-logo {
    min-width: 0;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: inherit;
}

.brand-link:hover {
    transform: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--button-bg), var(--button-hover-bg));
    color: var(--inverse-text);
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 10px 18px rgba(7, 67, 0, 0.18);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.brand-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-meta strong {
    font-family: var(--font-family-secondary);
    font-size: 1rem;
    color: var(--primary-text);
}

.brand-meta small {
    color: var(--muted-text);
    font-size: 0.78rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.3rem;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    color: var(--primary-text);
    font-weight: 600;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover {
    background: var(--surface-highlight);
    color: var(--secondary-text);
}

.nav-menu li.active .nav-link {
    background: var(--surface-highlight);
    color: var(--secondary-text);
    font-weight: 700;
    box-shadow: 0 0 0 1.5px rgba(7, 67, 0, 0.18) inset;
}

.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--soft-border);
    border-radius: 12px;
    background: var(--button-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(7, 67, 0, 0.16);
}

.bar {
    width: 20px;
    height: 2px;
    margin: 2.5px 0;
    background: var(--inverse-text);
    border-radius: 999px;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 49, 29, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    z-index: 1300;
}

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

.page-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.4rem 1.1rem 0.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.9fr;
    gap: 1.5rem;
    align-items: stretch;
}

.hero-copy,
.hero-panel {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(201, 217, 196, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--soft-shadow);
}

.hero-copy {
    padding: clamp(1.4rem, 3vw, 2.4rem);
    animation: hero-enter 680ms var(--easing-out-expo) both;
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow,
.section-kicker,
.project-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-highlight);
    color: var(--secondary-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 0.85rem;
}

.hero-lead {
    font-size: 1.05rem;
    max-width: 62ch;
}

.hero-actions,
.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
}

.hero-actions {
    margin-top: 1.25rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    min-width: 150px;
    padding: 0.78rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--button-bg), var(--button-hover-bg));
    color: var(--inverse-text);
    font-weight: 700;
    text-align: center;
    box-shadow: 0 12px 20px rgba(7, 67, 0, 0.16);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.button:hover {
    color: var(--inverse-text);
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 18px 28px rgba(7, 67, 0, 0.22);
}

.button:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 6px 12px rgba(7, 67, 0, 0.14);
    opacity: 1;
}

.button-secondary {
    background: transparent;
    color: var(--secondary-text);
    border-color: var(--border-color);
    box-shadow: none;
}

.button-secondary:hover {
    background: var(--surface-highlight);
    color: var(--primary-text);
    opacity: 1;
    border-color: rgba(7, 67, 0, 0.3);
    box-shadow: 0 6px 16px rgba(7, 67, 0, 0.1);
}

.button-secondary:active {
    transform: translateY(0) scale(0.97) !important;
    box-shadow: none !important;
}

.hero-panel {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.metric {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(237, 244, 232, 0.9), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(201, 217, 196, 0.9);
}

.metric-value {
    display: block;
    margin-bottom: 0.2rem;
    font-family: var(--font-family-secondary);
    font-size: 1.5rem;
    color: var(--primary-text);
}

.metric-label {
    margin: 0;
    font-size: 0.92rem;
}

.hero-note {
    margin: 0;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(226, 238, 221, 0.7);
    color: var(--primary-text);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.25rem 1.1rem 3rem;
}

.section-block,
.info-card,
.project-card,
.timeline-item {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(201, 217, 196, 0.9);
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
}

.section-block {
    margin-bottom: 1.25rem;
    padding: clamp(1.15rem, 2.5vw, 1.7rem);
}

.section-block:hover,
.info-card:hover,
.project-card:hover,
.timeline-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--strong-shadow);
    border-color: rgba(7, 67, 0, 0.18);
    background: rgba(255, 255, 255, 0.96);
}

/* Inline prose link treatment */
.section-block p a:not(.button):not(.btn),
.story-copy p a:not(.button):not(.btn) {
    text-decoration: underline;
    text-decoration-color: rgba(18, 86, 7, 0.3);
    text-underline-offset: 3px;
    font-weight: 600;
    transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}

.section-block p a:not(.button):not(.btn):hover,
.story-copy p a:not(.button):not(.btn):hover {
    text-decoration-color: var(--button-hover-bg);
    color: var(--button-hover-bg);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.section-header p {
    margin: 0;
}

.content-grid,
.highlight-grid,
.contact-grid,
.resume-grid,
.project-gallery {
    display: grid;
    gap: 1rem;
}

.content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.highlight-grid,
.project-gallery,
.contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resume-grid {
    grid-template-columns: 1.15fr 0.85fr;
}

.info-card,
.contact-card,
.project-card {
    padding: 1rem;
}

.info-card h3,
.contact-card h3,
.project-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.45rem;
}

.bullet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bullet-list li {
    position: relative;
    margin-bottom: 0.75rem;
    padding-left: 1.15rem;
    color: var(--muted-text);
}

.bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.68rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--secondary-text);
}

.pill-row,
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    background: var(--surface-highlight);
    color: var(--secondary-text);
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(7, 67, 0, 0.09);
}

.timeline {
    display: grid;
    gap: 0.9rem;
}

.timeline-item {
    position: relative;
    padding: 1rem 1rem 1rem 1.2rem;
    border-left: 4px solid var(--button-bg);
}

.timeline-meta {
    margin-bottom: 0.45rem;
    color: var(--secondary-text);
    font-size: 0.9rem;
    font-weight: 700;
}

.media-feature {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

.media-stack {
    display: grid;
    gap: 0.9rem;
}

.media-frame {
    overflow: hidden;
    min-height: 240px;
    border-radius: 22px;
    border: 1px solid rgba(201, 217, 196, 0.95);
    box-shadow: 0 10px 24px rgba(7, 67, 0, 0.08);
    background: linear-gradient(135deg, var(--secondary-bg), var(--surface-highlight));
}

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

.media-copy p:last-child {
    margin-bottom: 0;
}

.about-page .container {
    max-width: 1260px;
}

.about-page .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.about-page .section-header p {
    max-width: 68ch;
}

.about-intro-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.story-section {
    display: grid;
    gap: 1rem;
}

.story-section-split {
    grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 1.4rem;
}

.story-section-split.reverse .story-gallery {
    order: 2;
}

.story-section-split.reverse .story-copy {
    order: 1;
}

.story-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.story-gallery .media-frame {
    min-height: 320px;
}

.story-copy {
    max-width: none;
    padding: 1.1rem 1.2rem;
    border-radius: 22px;
    border: 1px solid rgba(201, 217, 196, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 244, 232, 0.82));
    box-shadow: 0 10px 24px rgba(7, 67, 0, 0.05);
}

.story-copy p + p {
    margin-top: 0.9rem;
}

.subsection-divider {
    width: 100%;
    height: 1px;
    margin: 1rem 0 1.2rem;
    background: linear-gradient(90deg, rgba(7, 67, 0, 0.18), rgba(7, 67, 0, 0));
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    color: inherit;
}

.project-card p {
    flex: 1;
}

.project-card .button {
    margin-top: 0.35rem;
}

.cta-panel {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 1rem;
}

.contact-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 244, 232, 0.9));
    border: 1px solid rgba(201, 217, 196, 0.9);
    border-radius: 22px;
}

.contact-card .button {
    margin-top: 0.5rem;
}

.site-footer {
    margin-top: 2rem;
    background: rgba(237, 244, 232, 0.72);
    border-top: 1px solid rgba(201, 217, 196, 0.92);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.75rem 1.1rem 2.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-title {
    margin: 0 0 0.25rem;
    font-family: var(--font-family-secondary);
    font-size: 1.05rem;
    color: var(--primary-text);
}

.footer-note {
    margin: 0;
    max-width: 60ch;
}

.reveal-ready {
    opacity: 0;
    transform: translateY(18px);
}

.visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 560ms var(--easing-out-expo) var(--reveal-delay, 0ms),
        transform 560ms var(--easing-out-expo) var(--reveal-delay, 0ms);
}

/* Staggered reveals within multi-column grids */
.content-grid > .reveal-ready:nth-child(2),
.highlight-grid > .reveal-ready:nth-child(2),
.project-gallery > .reveal-ready:nth-child(2),
.contact-grid > .reveal-ready:nth-child(2),
.about-intro-grid > .reveal-ready:nth-child(2),
.features-grid > .reveal-ready:nth-child(2) {
    --reveal-delay: 80ms;
}

.highlight-grid > .reveal-ready:nth-child(3),
.project-gallery > .reveal-ready:nth-child(3),
.contact-grid > .reveal-ready:nth-child(3),
.about-intro-grid > .reveal-ready:nth-child(3) {
    --reveal-delay: 160ms;
}

@media (max-width: 900px) {
    .hero-grid,
    .resume-grid,
    .cta-panel,
    .content-grid,
    .highlight-grid,
    .project-gallery,
    .contact-grid,
    .media-feature,
    .about-intro-grid,
    .story-section-split {
        grid-template-columns: 1fr;
    }

    .metric-grid,
    .story-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .story-section-split.reverse .story-gallery,
    .story-section-split.reverse .story-copy {
        order: initial;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 0;
    }

    .about-page .section-header {
        align-items: flex-start;
    }

    .navbar {
        top: 0;
        margin-bottom: 0.65rem;
        overflow: visible;
    }

    .nav-container {
        position: relative;
        padding: 0.7rem 0.8rem;
    }

    .brand-meta small {
        display: none;
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 1360;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.45rem);
        right: 0.8rem;
        left: 0.8rem;
        width: auto;
        height: auto;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        background: rgba(247, 244, 234, 0.99);
        border: 1px solid rgba(201, 217, 196, 0.95);
        border-radius: 18px;
        box-shadow: 0 14px 30px rgba(7, 67, 0, 0.12);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-normal), transform var(--transition-normal);
        z-index: 1350;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        justify-content: flex-start;
        width: 100%;
        padding: 0.85rem 1rem;
    }

    .nav-menu li.active .nav-link {
        border-left: 3px solid var(--button-bg);
        padding-left: calc(1rem - 3px);
        box-shadow: none;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-overlay {
        background: rgba(24, 49, 29, 0.14);
    }

    .page-hero,
    .container,
    .footer-inner {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .page-hero h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .section-block,
    .card,
    .info-card,
    .project-card,
    .timeline-item,
    .hero-panel,
    .hero-copy {
        border-radius: 20px;
    }

    .metric-grid,
    .story-gallery {
        grid-template-columns: 1fr;
    }

    .story-gallery .media-frame {
        min-height: 240px;
    }
}

/* Custom scrollbar (Webkit) */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(7, 67, 0, 0.18);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(7, 67, 0, 0.32);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-copy {
        animation: none;
    }
}

/* ─────────────────────────────────────────────────────────────────
   Project page shared styles
   Used by project-weather-agent.html and project-reddit-pm-dashboard.html
───────────────────────────────────────────────────────────────── */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted-text);
}

.breadcrumb a {
    color: var(--secondary-text);
    font-weight: 600;
}

.breadcrumb-sep {
    opacity: 0.45;
}

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

.project-tag-cluster .skill-tag {
    font-size: 0.78rem;
}

.project-meta-panel {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.project-meta-item {
    padding: 0.8rem 1rem;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(237, 244, 232, 0.88));
    border: 1px solid rgba(201, 217, 196, 0.9);
}

.meta-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-text);
}

.meta-value {
    margin: 0;
    font-weight: 600;
    color: var(--primary-text);
    font-size: 0.93rem;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 0.4rem;
    vertical-align: middle;
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.arch-diagram {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    margin: 1.25rem 0 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.arch-step {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arch-step-box {
    width: 100%;
    padding: 0.9rem 0.6rem 0.75rem;
    border-radius: 16px;
    border: 1px solid rgba(201, 217, 196, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(237, 244, 232, 0.82));
    text-align: center;
    flex: 1;
    box-sizing: border-box;
}

.arch-step-box.highlight {
    border-color: rgba(7, 67, 0, 0.28);
    background: linear-gradient(180deg, rgba(226, 238, 221, 0.98), rgba(201, 217, 196, 0.82));
}

.arch-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin: 0 auto 0.5rem;
    font-size: 1.1rem;
    background: var(--surface-highlight);
}

.arch-step-box.highlight .arch-step-icon {
    background: linear-gradient(135deg, var(--button-bg), var(--button-hover-bg));
}

.arch-step-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--secondary-text);
    margin-bottom: 0.25rem;
}

.arch-step-desc {
    font-size: 0.75rem;
    color: var(--muted-text);
    margin: 0;
    line-height: 1.4;
}

.arch-arrow {
    flex-shrink: 0;
    padding: 0 0.45rem;
    color: var(--secondary-text);
    font-size: 1.15rem;
    line-height: 1;
    align-self: center;
}

.arch-note {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(226, 238, 221, 0.6);
    border: 1px solid rgba(7, 67, 0, 0.1);
    font-size: 0.87rem;
    color: var(--muted-text);
}

.arch-note strong {
    color: var(--primary-text);
}

.demo-section {
    background: linear-gradient(155deg, #071402 0%, #0C2703 100%) !important;
    border-color: rgba(7, 67, 0, 0.45) !important;
}

.demo-section .section-kicker {
    background: rgba(18, 86, 7, 0.5);
    color: #a8e8a0;
    border: 1px solid rgba(168, 232, 160, 0.18);
}

.demo-section h2 {
    color: rgba(255, 255, 255, 0.96);
}

.demo-section h3 {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-family-secondary);
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.demo-divider {
    border: none;
    border-top: 1px solid rgba(168, 232, 160, 0.12);
    margin: 2.75rem 0;
}

.demo-desc {
    color: rgba(255, 255, 255, 0.62) !important;
    font-size: 0.96rem;
}

.api-key-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 200, 50, 0.08);
    border: 1px solid rgba(255, 200, 50, 0.22);
    margin-bottom: 1.2rem;
    font-size: 0.84rem;
    color: rgba(255, 220, 130, 0.92);
    line-height: 1.55;
}

.api-key-notice code {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.demo-input-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.demo-input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(168, 232, 160, 0.22);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--font-family-primary);
    font-size: 0.96rem;
    outline: none;
    transition: border-color 200ms ease, background 200ms ease;
}

.demo-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.demo-input:focus {
    border-color: rgba(168, 232, 160, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

.demo-submit {
    flex-shrink: 0;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--button-bg), var(--button-hover-bg));
    color: var(--inverse-text);
    font-family: var(--font-family-primary);
    font-weight: 700;
    font-size: 0.96rem;
    cursor: pointer;
    transition: opacity 200ms ease, transform 200ms ease;
    box-shadow: 0 8px 18px rgba(7, 67, 0, 0.38);
    white-space: nowrap;
}

.demo-submit:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}

.demo-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.demo-result {
    min-height: 88px;
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(168, 232, 160, 0.14);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.93rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.38);
    font-style: italic;
    transition: color 300ms ease, border-color 300ms ease;
}

.demo-result.loading {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    animation: shimmer-pulse 1.6s ease infinite;
}

.demo-result.success {
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(168, 232, 160, 0.35);
    font-style: normal;
}

.demo-result.success p,
.demo-result.success li,
.demo-result.success strong,
.demo-result.success em,
.demo-result.success h1,
.demo-result.success h2,
.demo-result.success h3 {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.demo-result.success p + p {
    margin-top: 0.55rem;
}

.demo-result.success ul,
.demo-result.success ol {
    margin: 0.4rem 0 0;
    padding-left: 1.25rem;
}

.demo-result.success li {
    margin-bottom: 0.25rem;
}

.demo-result.success li:last-child {
    margin-bottom: 0;
}

.demo-result.error {
    color: rgba(255, 160, 160, 0.95);
    border-color: rgba(255, 100, 100, 0.28);
    font-style: normal;
}

@keyframes shimmer-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

.demo-suggestions {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.demo-suggestion {
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(168, 232, 160, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.79rem;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.demo-suggestion:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(168, 232, 160, 0.35);
}

.learned-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.85rem;
}

.learned-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(237, 244, 232, 0.85));
    border: 1px solid rgba(201, 217, 196, 0.9);
}

.learned-num {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--button-bg), var(--button-hover-bg));
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 0.1rem;
}

.learned-text {
    color: var(--muted-text);
    margin: 0;
    line-height: 1.65;
}

.learned-text strong {
    display: block;
    color: var(--primary-text);
    margin-bottom: 0.2rem;
    font-size: 0.96rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--surface-highlight);
    color: var(--secondary-text);
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid rgba(7, 67, 0, 0.1);
}

.tech-pill-icon {
    font-size: 0.95rem;
    line-height: 1;
}

/* ── Address Form Demo ────────────────────────────────────── */

.addr-form {
    margin-top: 1.25rem;
}

.addr-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
}

.addr-field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.addr-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.addr-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.28);
    margin-left: 0.3rem;
    font-size: 0.73rem;
}

.addr-input,
.addr-select {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(168, 232, 160, 0.2);
    background: rgba(255, 255, 255, 0.05);
    appearance: none;
    -webkit-appearance: none;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-family-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 200ms ease, background-color 200ms ease;
    width: 100%;
}

.addr-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(168,232,160,0.7)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1rem;
    cursor: pointer;
}

.addr-input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.addr-input:focus,
.addr-select:focus {
    border-color: rgba(168, 232, 160, 0.45);
    background-color: rgba(255, 255, 255, 0.08);
}

.addr-select option {
    background: #0C2703;
    color: rgba(255, 255, 255, 0.9);
}

.addr-hint {
    font-size: 0.77rem;
    color: rgba(255, 255, 255, 0.28);
    min-height: 1.1em;
}

.addr-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.addr-reset {
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(168, 232, 160, 0.18);
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-family-primary);
    font-size: 0.84rem;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.addr-reset:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(168, 232, 160, 0.3);
}

@media (max-width: 560px) {
    .addr-field-pair {
        grid-template-columns: 1fr;
    }
}

/* ── Reddit PM Dashboard page-specific styles ────────────── */

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.1rem 1.15rem 1.15rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(237, 244, 232, 0.85));
    border: 1px solid rgba(201, 217, 196, 0.9);
}

.feature-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1.1rem;
    background: var(--surface-highlight);
    flex-shrink: 0;
}

.feature-card-title {
    margin: 0;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--primary-text);
}

.feature-card-desc {
    margin: 0;
    font-size: 0.87rem;
    color: var(--muted-text);
    line-height: 1.6;
}

.coming-soon-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 200, 50, 0.08);
    border: 1px solid rgba(255, 200, 50, 0.22);
    margin-bottom: 1.4rem;
    font-size: 0.84rem;
    color: rgba(255, 220, 130, 0.92);
    line-height: 1.55;
}

.dashboard-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 220px;
    border-radius: 18px;
    border: 1px dashed rgba(168, 232, 160, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 2rem 1.5rem;
}

.dashboard-placeholder-icon {
    font-size: 2rem;
    opacity: 0.35;
}

@media (max-width: 768px) {
    .arch-diagram {
        flex-direction: column;
        align-items: stretch;
        overflow-x: visible;
    }

    .arch-arrow {
        transform: rotate(90deg);
        align-self: center;
        margin: 0.1rem 0;
    }

    .arch-step {
        width: 100%;
    }

    .demo-input-row {
        flex-direction: column;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal-ready {
        opacity: 1;
        transform: none;
    }
}