:root {
    /* THEME: DEEP VOID */
    --bg-color: hsla(0, 0%, 3%, 1); 
    --text-color: hsla(0, 0%, 97%, 1); 
    --accent-color: #D35400; 
    --subtle-color: #666;    
    
    /* TYPE SCALE */
    --font-display: clamp(6rem, 16vw, 14rem);
    --font-h2: clamp(1.5rem, 3vw, 2.5rem);
    --font-body: 1.125rem;

    /* ANIMATION */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* SPACING */
    --space-xl: 3rem; 
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html, body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Arimo', sans-serif;
    min-height: 100vh;
    overflow-x: hidden; 
}

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------
   GLOBAL NAVIGATION
--------------------------------------------------------- */
.sticky-nav {
    position: fixed; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 2rem; z-index: 1000;
    transition: background-color 0.8s ease, padding 0.5s ease;
}
.sticky-nav.scrolled {
    background-color: var(--bg-color);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

/* Nav Left (Meta) */
.meta-wrapper {
    display: flex; gap: var(--space-xl); align-items: center;
    font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subtle-color);
}
.meta-wrapper span { position: relative; opacity: 0.8; color: var(--text-color); white-space: nowrap; }
.meta-wrapper span::after {
    content: ''; position: absolute; width: 1px; height: 100%; background: var(--text-color);
    right: calc(var(--space-xl) / -2); top: 0; opacity: 0.3;
}
.meta-wrapper span:last-of-type::after { display: none; }

/* Nav Right (Menu) */
.menu-container { display: flex; align-items: center; gap: 1.5rem; }
.hidden-links {
    display: flex; gap: 1.5rem; align-items: center;
    opacity: 0; max-width: 0; overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}
.hidden-links.active { opacity: 1; max-width: 600px; }

.nav-link {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em;
    transition: color 0.2s ease; white-space: nowrap;
}
.nav-link:hover { color: var(--accent-color); }

.start-btn {
    background: none; border: 1px solid var(--subtle-color); color: var(--text-color);
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em;
    padding: 0.5rem 1rem; cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.start-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }

/* Nav Avatar */
.nav-avatar { height: 30px; width: auto; border-radius: 2px; filter: grayscale(100%); transition: filter 0.3s ease; display: block; }
.nav-avatar:hover { filter: grayscale(0%); }
body.is-index .nav-avatar-link { display: none; }

/* ---------------------------------------------------------
   LAYOUT: HOME PAGE (index.html)
--------------------------------------------------------- */
.layout-home {
    display: flex; flex-direction: column; justify-content: space-between;
    height: 100vh; padding: 80px 2rem 2rem 2rem;
}

.header-section { flex-grow: 1; display: flex; align-items: center; }
.title-block { display: flex; align-items: flex-end; gap: 0; }
.left-col { padding-right: 0.5vw; }
.avatar-slice {
    height: 12.8vw;          /* Matches the line-height of BOROWSKI exactly */
    width: 6vw;              /* The width of the slice */
    overflow: hidden;        /* Crops the excess image */
    display: flex;
    align-items: flex-end;   /* Aligns to the bottom baseline */
}

/* FIX: Target the animation wrapper explicitly */
.avatar-slice > div {
    height: 100%;            /* Force the wrapper to fill the slice */
    width: 100%;             /* Force the wrapper to fill the width */
}

.avatar-slice img {
    height: 100%;            /* Now correctly fills the wrapper */
    width: auto;             /* Maintains aspect ratio */
    object-fit: cover;       /* Ensures the slice is filled */
    display: block;          /* Removes invisible bottom margin */
}
.index-h1 {
    font-family: 'League Gothic', sans-serif; font-size: 16vw; line-height: 0.8;
    text-transform: uppercase; letter-spacing: -0.02em; margin: 0;
    transform: scaleX(0.85); transform-origin: left bottom;
    display: flex; flex-direction: column;
}
.offset-adrian { padding-left: 6px; }
.manifesto {
    font-size: 0.9rem; letter-spacing: 0.1em; color: var(--accent-color);
    text-transform: uppercase; margin-top: 1rem;
}

/* Home Footer */
.home-footer {
    display: flex; justify-content: space-between; align-items: flex-end;
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem;
}

/* ---------------------------------------------------------
   LAYOUT: ARCHIVE PAGES (brands.html, essays.html)
--------------------------------------------------------- */
.layout-archive { padding: 20vh 0; max-width: 1400px; margin: 0 auto; width: 100%; }

.archive-header {
    padding: 0 5vw; margin-bottom: 4rem; border-bottom: 1px solid #333;
    padding-bottom: 2rem; display: flex; justify-content: space-between; align-items: flex-end;
}
.archive-title {
    font-family: 'League Gothic', sans-serif; font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.8; color: #fff; text-transform: uppercase;
}
.archive-meta { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: #666; text-align: right; }

/* List Rows */
.list-row {
    display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: baseline;
    padding: 2rem 5vw; border-bottom: 1px solid #222; transition: all 0.2s ease;
}
.list-row:hover { background-color: #DADADA; padding-left: 6vw; color: #000; }
.list-row:hover * { color: #000 !important; }

.row-date { font-size: 0.9rem; color: #555; letter-spacing: 0.1em; }
.row-main { display: flex; flex-direction: column; gap: 0.5rem; }
.row-title {
    font-family: 'League Gothic', sans-serif; font-size: clamp(2rem, 4vw, 3.5rem);
    text-transform: uppercase; line-height: 0.9;
}
.row-subtitle { font-size: 0.7rem; color: var(--accent-color); text-transform: uppercase; letter-spacing: 0.2em; }
.row-status { font-size: 0.8rem; color: #444; text-transform: uppercase; letter-spacing: 0.1em; text-align: right; }

/* Essay Specifics */
.essay-head { display: grid; grid-template-columns: 1fr 4fr 1fr; align-items: baseline; }
.essay-subtitle { font-size: 1rem; color: #888; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------------------------------------------------------
   LAYOUT: CASE STUDIES
--------------------------------------------------------- */
#main-scroll-wrapper { height: 100vh; width: 100%; overflow-y: auto; scroll-behavior: smooth; }

.artifact-frame {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: zoom-in; transition: transform 0.3s ease;
}
.artifact-frame:hover { transform: scale(1.02); }
.artifact-frame img {
    max-width: 80%; height: auto; max-height: 80vh; object-fit: contain;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.artifact-caption {
    margin: 2rem 0; font-size: 0.7rem; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--accent-color);
}

.narrative-block { padding: 12vh 10vw; max-width: 1200px; margin: 0 auto; }
.narrative-block.right { text-align: right; margin-left: auto; }
.narrative-block h2 {
    font-family: 'League Gothic', sans-serif; font-size: var(--font-h2);
    text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 1rem;
}
.narrative-block p {
    font-size: 1.1rem; line-height: 1.6; color: #999; max-width: 50ch;
}
.narrative-block.right p { margin-left: auto; }

.high-signal-text { color: #fff; font-weight: 700; }
.angle-tag {
    display: inline-block; border: 1px solid var(--accent-color); color: var(--accent-color);
    font-size: 0.7rem; padding: 0.2rem 0.5rem; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 1rem;
}

/* ---------------------------------------------------------
   UTILITIES & ANIMATION
--------------------------------------------------------- */
#lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 2000;
    display: none; justify-content: center; align-items: center; cursor: zoom-out;
}
#lightbox img { max-width: 95%; max-height: 95%; object-fit: contain; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Index Seq Animation */
@keyframes revealSeq { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
.seq { opacity: 0; animation: revealSeq 1.2s var(--ease-out-expo) forwards; }
.seq-1 { animation-delay: 0.1s; } 
.seq-2 { animation-delay: 0.35s; } 
.seq-3 { animation-delay: 0.5s; } 
.seq-4 { animation-delay: 0.65s; } 
.seq-5 { animation-delay: 0.8s; } 
.seq-6 { animation-delay: 0.95s; } 
.seq-7 { animation-delay: 1.1s; } 
.seq-8 { animation-delay: 1.55s; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .meta-wrapper { flex-wrap: wrap; justify-content: center; width: 100%; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 0.5rem; }
    .meta-wrapper span::after { display: none; }
    .sticky-nav { flex-direction: column; align-items: flex-end; gap: 1rem; }
    .menu-container { flex-direction: row-reverse; width: 100%; justify-content: flex-end; }
    .hidden-links.active {
        position: absolute; top: 3.5rem; right: 0; flex-direction: column;
        background: var(--bg-color); padding: 1rem; border: 1px solid var(--subtle-color);
        align-items: flex-end; z-index: 10; width: 200px;
    }
    .index-h1 { font-size: 20vw; }
    .avatar-slice { height: 16vw; width: 8vw; }
    .list-row { grid-template-columns: 1fr; gap: 1rem; }
    .row-status { text-align: left; }
    .narrative-block { padding: 12vh 2rem; }
    .narrative-block.right { text-align: left; }
}