:root {
    /* Palette: Strict No-Blue Constraint */
    --bg-canvas: #1e1612;      /* Espresso brown base */
    --bg-surface: #33251c;     /* Surface brown */
    --accent-primary: #f59e0b; /* Amber */
    --text-primary: #f5ecdf;   /* Warm cream */
    --text-muted: #b8a99a;     /* Muted cream/tan */
    --border-subtle: #4d3a2e;  /* Distinct, non-blue border */
    
    /* Typography Variables */
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --font-mono: ui-monospace, Consolas, "Courier New", monospace;
    
    /* Layout & Animation */
    --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
    --header-height: 80px;
    --timeline-width: 2px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 1rem;
    overflow-wrap: anywhere;
    hyphens: auto;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .mono {
    font-family: var(--font-mono);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 1.75rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; color: var(--accent-primary); }

p { margin-bottom: 1.5rem; max-width: 72ch; }

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.3s var(--ease-kinetic), color 0.3s var(--ease-kinetic);
}

a:hover, a:focus {
    text-decoration-color: var(--accent-primary);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0; /* Square per instructions */
}

/* Rounded specifics */
.avatar, .badge {
    border-radius: 50%;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--accent-primary);
    color: var(--bg-canvas);
    font-family: var(--font-mono);
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    transition: transform 0.3s var(--ease-kinetic), opacity 0.3s ease;
}

.btn:hover, .btn:focus {
    transform: translateY(-2px);
    opacity: 0.9;
    text-decoration: none;
}

/* Header */
.site-header {
    position: relative; /* Static flow per instructions */
    width: 100%;
    padding: 1rem;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px; /* Floating box with rounded ends */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
}

.brand-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Strictly far-left inside container */
}

.brand-logo::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--accent-primary);
    border-radius: 50%; /* Brand mark badge */
}

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

.desktop-nav a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
}

.desktop-nav a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 99;
}

.mobile-nav-overlay.active {
    display: flex;
    animation: slideDown 0.3s var(--ease-kinetic) forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Layout: Vertical Flow Timeline */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

/* The vertical connecting line */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--timeline-width);
    background-color: var(--border-subtle);
}

.timeline-section {
    position: relative;
    margin-bottom: 6rem;
}

.timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-2rem - 6px); /* Center on the 2px line */
    width: 14px;
    height: 14px;
    background-color: var(--bg-canvas);
    border: 2px solid var(--accent-primary);
    border-radius: 0; /* Square sections per instructions */
}

/* Numbered Labels */
.section-label {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Grid & Cards */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 0; /* Flat, 1px border, no shadow */
    padding: 1.5rem;
    position: relative;
}

.card h3 {
    margin-top: 0;
}

/* Background Patterns */
.bg-pattern {
    background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
    background-size: 24px 24px;
}

.hero-section {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 4rem 0;
}

@media (min-width: 769px) {
    .hero-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .hero-content {
        flex: 1;
        padding-right: 2rem;
    }
    
    .hero-visual {
        flex: 1;
        position: relative;
        min-height: 450px;
    }
}

/* Overlapping 3D Image Layout for Hero */
.hero-img-stack {
    position: relative;
    width: 100%;
    height: 400px;
}

.img-overlap {
    position: absolute;
    border: 1px solid var(--border-subtle);
}

.img-1 { top: 0; left: 0; width: 60%; z-index: 1; aspect-ratio: 1/1; }
.img-2 { top: 20%; right: 5%; width: 50%; z-index: 2; aspect-ratio: 4/5; }
.img-3 { bottom: 0; left: 20%; width: 45%; z-index: 3; aspect-ratio: 16/9; }

/* Read Content Centering */
.reading-content {
    max-width: 72ch;
    margin: 0 auto;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-subtle);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

th {
    font-family: var(--font-mono);
    background-color: var(--bg-surface);
}

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

label {
    display: block;
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

input, textarea, select {
    width: 100%;
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.75rem;
    font-family: var(--font-body);
    border-radius: 0;
}

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

/* Utility / Interaction Classes */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s var(--ease-kinetic);
}

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

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
    padding: 2rem 1rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 769px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        align-items: center;
    }
}

.footer-col { flex: 1; }
.footer-center { display: flex; gap: 1rem; justify-content: center; }
.footer-right { display: flex; gap: 1rem; justify-content: flex-end; font-size: 0.85rem; }

.footer-legal-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-menu-btn { display: block; }
    h1 { font-size: 2rem; }
    .timeline-container { padding-left: 1.5rem; }
    .timeline-section::before { left: calc(-1.5rem - 6px); }
    .hero-img-stack { height: 300px; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0.75rem 1rem; }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
