body {
    background-color: var(--bg-paper);
    color: var(--ink-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, .serif { font-family: 'Cormorant Garamond', serif; }
.mono { font-family: 'IBM Plex Mono', monospace; }

/* --- PAGE SHELL --- */
.home-nav {
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
    background: rgba(249, 248, 246, 0.85);
    border: 1px solid rgba(229, 226, 222, 0.8);
    border-radius: 1rem;
    box-shadow: 0 20px 45px -28px rgba(28, 25, 23, 0.65);
    backdrop-filter: blur(12px);
}

.home-nav-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.home-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.home-brand-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-style: italic;
    color: var(--ink-primary);
}

.home-brand-subtitle {
    margin: 0;
    font-size: 0.625rem;
    letter-spacing: 0.28em;
    color: var(--ink-secondary);
}

.home-mode-toggle {
    width: 100%;
}

.home-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.home-nav-links .nav-link {
    position: relative;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    color: var(--ink-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, box-shadow 200ms ease;
}

.home-nav-links .nav-link::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.15rem;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-clay), var(--accent-sage));
    border-radius: 999px;
    opacity: 0.2;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 200ms ease, opacity 200ms ease;
}

.home-nav-links .nav-link:hover,
.home-nav-links .nav-link:focus-visible {
    color: var(--accent-clay);
}

.home-nav-links .nav-link:hover::after,
.home-nav-links .nav-link:focus-visible::after {
    opacity: 0.9;
    transform: scaleX(1);
}

.home-nav-links .nav-link.active {
    font-weight: 700;
    color: var(--accent-clay);
    background: linear-gradient(
        120deg,
        color-mix(in srgb, var(--accent-clay) 18%, transparent),
        color-mix(in srgb, var(--accent-sage) 20%, transparent)
    );
    box-shadow: 0 12px 32px -24px rgba(31, 29, 27, 0.4);
}

.home-nav-links .nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.home-main {
    max-width: 64rem;
    margin: 0 auto;
    padding: 6rem 1.5rem 8rem;
    position: relative;
    z-index: 10;
}

.home-hero {
    margin-bottom: 8rem;
    max-width: 56rem;
}

.hero-eyebrow {
    font-size: 0.625rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-secondary);
    padding-left: 0.25rem;
    border-left: 2px solid var(--line-subtle);
    margin-bottom: 1.5rem;
}

.hero-heading {
    margin: 0 0 2.5rem;
    font-size: clamp(2.75rem, 5vw + 1rem, 4.5rem);
    line-height: 1.1;
    font-weight: 300;
    color: var(--ink-primary);
}

.hero-grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
    align-items: center;
}

.hero-copy {
    grid-column: 1 / -1;
}

.hero-text {
    font-size: 1.25rem;
    color: var(--ink-secondary);
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 2.5rem;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-label {
    font-size: 0.625rem;
    letter-spacing: 0.2em;
    color: var(--line-subtle);
}

.hero-intent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-visual {
    position: relative;
    grid-column: 1 / -1;
    border-radius: 1.25rem;
    border: 1px solid var(--line-subtle);
    padding: 1.25rem;
    background: radial-gradient(circle at 25% 20%, rgba(77, 124, 15, 0.08), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(168, 75, 47, 0.08), transparent 40%),
        rgba(255, 255, 255, 0.72);
    box-shadow: 0 24px 60px -36px rgba(28, 25, 23, 0.45), 0 8px 30px -26px rgba(28, 25, 23, 0.35);
    overflow: hidden;
    isolation: isolate;
    --visual-accent: var(--accent-sage);
    --visual-secondary: rgba(77, 124, 15, 0.22);
    --visual-ambient: rgba(77, 124, 15, 0.15);
    transition: border-color 0.3s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.hero-visual[data-mode="human"] {
    --visual-accent: var(--accent-clay);
    --visual-secondary: rgba(168, 75, 47, 0.22);
    --visual-ambient: rgba(168, 75, 47, 0.12);
    background: radial-gradient(circle at 20% 25%, rgba(168, 75, 47, 0.1), transparent 45%),
        radial-gradient(circle at 76% 68%, rgba(77, 124, 15, 0.06), transparent 40%),
        rgba(255, 255, 255, 0.78);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0.15rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero-visual .visual-halo {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 40% 40%, var(--visual-secondary), transparent 55%),
        radial-gradient(circle at 72% 60%, var(--visual-ambient), transparent 50%);
    filter: blur(32px);
    transform: scale(1.05);
    z-index: 0;
}

.visual-panel {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(229, 226, 222, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.visual-grid {
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(to right, rgba(31, 29, 27, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(31, 29, 27, 0.06) 1px, transparent 1px);
    background-size: 70px 70px;
    mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8), transparent 70%);
    animation: grid-shift 16s linear infinite;
}

.grid-node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff, var(--visual-accent));
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.65),
        0 18px 30px -14px rgba(31, 29, 27, 0.35);
    animation: node-pulse 6s ease-in-out infinite;
}

.grid-link {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--visual-accent), transparent);
    opacity: 0.6;
    animation: signal 8s ease-in-out infinite;
    transform-origin: left center;
}

.visual-glass {
    position: relative;
    border-radius: 50%;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.35));
    border: 1px solid rgba(229, 226, 222, 0.7);
    box-shadow: 0 18px 38px -22px rgba(31, 29, 27, 0.4);
    animation: float 12s ease-in-out infinite;
}

.visual-orbit {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px dashed rgba(31, 29, 27, 0.12);
    animation: orbit 14s linear infinite;
}

.orbit-node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--visual-accent);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.35);
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    animation: pulse 5s ease-in-out infinite;
}

.visual-core {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--visual-accent), rgba(31, 29, 27, 0.8));
    box-shadow:
        0 12px 30px -18px rgba(31, 29, 27, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    opacity: 0.95;
}

@keyframes grid-shift {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-35px, -25px, 0); }
}

@keyframes node-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px var(--visual-ambient)); }
    50% { transform: scale(1.1) translateY(-2px); filter: drop-shadow(0 0 18px var(--visual-ambient)); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}

@keyframes signal {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.85; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes orbit {
    to { transform: rotate(360deg); }
}

/* --- PHYSICS CANVAS (Background) --- */
#ink-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; opacity: 0.15; mix-blend-mode: multiply;
}

/* --- INTERACTIVE CARDS (Physics Enabled) --- */
.physics-card {
    background: linear-gradient(180deg, #fff, #f9f7f3);
    border: 1px solid var(--line-subtle);
    border-radius: 6px;
    will-change: transform;
    transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    z-index: 10;
    cursor: default;
    overflow: hidden;
    box-shadow: 0 12px 30px -18px rgba(31, 29, 27, 0.22), inset 0 1px 0 rgba(255,255,255,0.9);
}
.physics-card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 4px;
    border: 1px solid rgba(229, 226, 222, 0.7);
    box-shadow: inset 0 16px 40px rgba(31, 29, 27, 0.04);
    pointer-events: none;
}
.physics-card:hover,
.physics-card:focus-within {
    border-color: rgba(168, 75, 47, 0.55);
    box-shadow: 0 18px 46px -22px rgba(31, 29, 27, 0.35), inset 0 1px 0 rgba(255,255,255,0.9);
    z-index: 20;
    transform: translateY(-6px);
}

/* --- ORGANIC DISTORTION FILTER --- */
.distort-target { transition: all 0.5s ease; }
.physics-card:hover .distort-target { filter: url(#organic-distortion); }

.diagram-surface {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagram-label {
    font-size: 0.5rem;
    color: #9ca3af;
    letter-spacing: 0.18em;
}

.diagram-icon {
    width: 1rem;
    height: 1rem;
    color: var(--ink-primary);
}

/* --- SCHEMATICS --- */
.diagram-box {
    width: 100%; height: 180px;
    background: linear-gradient(180deg, #fafaf8, #f5f3ef);
    border-top: 1px solid rgba(229, 226, 222, 0.8);
    border-bottom: 1px solid var(--line-subtle);
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -12px 28px rgba(31, 29, 27, 0.04);
    transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.3s ease;
}
.physics-card:hover .diagram-box,
.physics-card:focus-within .diagram-box {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(77, 124, 15, 0.28), 0 12px 30px -16px rgba(77, 124, 15, 0.35);
    border-color: rgba(77, 124, 15, 0.45);
    transform: translateY(-2px);
}

/* 1. DOXIMITY (Membrane) */
.membrane-outer { width: 90px; height: 90px; border: 1px dashed var(--ink-secondary); border-radius: 50%; position: absolute; }
.membrane-inner { width: 40px; height: 70px; border: 1.5px solid var(--ink-primary); border-radius: 4px; position: relative; background: #fff; z-index: 2; display:flex; align-items:center; justify-content:center; }
.physics-card:hover .membrane-outer { animation: pulse-membrane 4s infinite ease-in-out; border-style: solid; border-color: var(--accent-clay); }
@keyframes pulse-membrane { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1) rotate(5deg); } }

/* 2. ANDWISE (Lens) */
.doc-stack { width: 50px; height: 70px; border: 1px solid var(--ink-primary); background: #fff; position: relative; padding: 6px; }
.ink-line { height: 2px; background: #DDD; margin-bottom: 4px; width: 100%; }
.lens-glass { width: 50px; height: 50px; border: 1.5px solid var(--accent-sage); border-radius: 50%; position: absolute; top: 10px; left: 10px; backdrop-filter: blur(2px); display:flex; align-items:center; justify-content:center; opacity:0; transition:all 0.5s ease; transform: scale(0.8); }
.physics-card:hover .lens-glass { opacity: 1; transform: scale(1.2); }

/* 3. TALENT FINDER (Balance) */
.balance-beam { width: 80px; height: 2px; background: var(--ink-primary); position: relative; transform: rotate(10deg); transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.beam-layout { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 0.5rem; }
.physics-card:hover .balance-beam { transform: rotate(0deg); }
.weight { width: 12px; height: 12px; border: 1px solid var(--ink-primary); background: #fff; border-radius: 50%; position: absolute; top: -5px; }

/* 4. BIO (Cell) */
.cell-wall { width: 70px; height: 70px; border: 1.5px solid var(--ink-secondary); border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; transition: all 0.5s ease; }
.cell-shell { display: flex; align-items: center; justify-content: center; }
.cell-nucleus { width: 0.5rem; height: 0.5rem; background: var(--ink-primary); border-radius: 50%; }
.physics-card:hover .cell-wall { border-radius: 50%; border-color: var(--accent-clay); animation: morph 6s infinite linear; }
@keyframes morph { 0% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; } 33% { border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%; } 66% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; } 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; } }

/* 5. AUDIT (Lock) */
.lock-body { width: 30px; height: 25px; border: 1.5px solid var(--ink-primary); border-radius: 2px; position: relative; top: 10px; background: #fff; z-index: 2; }
.lock-shackle { width: 20px; height: 25px; border: 1.5px solid var(--ink-secondary); border-bottom: none; border-radius: 10px 10px 0 0; position: absolute; top: -15px; left: 5px; transition: transform 0.4s ease; transform-origin: 2px 20px; }
.physics-card:hover .lock-shackle { transform: rotateY(180deg) translateX(10px); }
.audit-ring { width: 60px; height: 60px; border: 1px dashed var(--accent-clay); border-radius: 50%; position: absolute; opacity: 0; transition: opacity 0.5s; }
.physics-card:hover .audit-ring { opacity: 1; animation: spin-slow 10s linear infinite; }
@keyframes spin-slow { 100% { transform: rotate(360deg); } }

/* 6. BREAD SF (Network) */
.social-node { width: 6px; height: 6px; background: var(--ink-secondary); border-radius: 50%; position: absolute; transition: all 0.5s ease; }
.physics-card:hover .social-node { background: var(--accent-sage); transform: scale(1.5); }
.social-link { position: absolute; height: 1px; background: var(--line-subtle); transform-origin: left center; width: 0; transition: width 0.5s ease 0.1s; }
.physics-card:hover .social-link { width: 40px; background: var(--ink-secondary); }

.tag {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 8px; border-radius: 2px;
    background: #F5F5F4; color: var(--ink-secondary); font-family: 'IBM Plex Mono', monospace; border: 1px solid transparent;
}

.artifact-spec-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1.1rem;
    background: linear-gradient(90deg, rgba(168, 75, 47, 0.14), rgba(77, 124, 15, 0.12));
    border-bottom: 1px solid var(--line-subtle);
    border-radius: 6px 6px 0 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-primary);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.45);
}

.artifact-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(168, 75, 47, 0.14);
    color: var(--accent-clay);
    border: 1px solid rgba(168, 75, 47, 0.3);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
}

.artifact-code {
    font-size: 0.7rem;
    color: var(--accent-sage);
}

.artifact-diagram { margin-bottom: 1.5rem; }
.artifact-body { padding: 1rem 1.25rem 1.25rem; }
.artifact-header { margin-bottom: 0.75rem; }
.artifact-title { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--ink-primary); }
.artifact-subtitle { display: inline-block; margin-top: 0.15rem; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-secondary); }
.artifact-description { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-secondary); margin: 0 0 1rem; }
.artifact-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.timeline-marker {
    position: absolute; left: -5px; top: 6px; width: 9px; height: 9px;
    background: var(--bg-paper); border: 1px solid var(--ink-secondary); border-radius: 50%;
    transition: all 0.3s ease;
}
.group:hover .timeline-marker { background: var(--accent-clay); border-color: var(--accent-clay); transform: scale(1.3); }

.artifacts-section,
.log-section,
.writing-section,
.intent-section {
    margin-bottom: 8rem;
}

.intent-section {
    background: #fff;
    border: 1px solid var(--line-subtle);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 6px 18px -12px rgba(31, 29, 27, 0.18);
    transition: opacity 0.5s ease;
}

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

.intent-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink-primary);
}

.intent-tag {
    font-size: 0.75rem;
    color: var(--ink-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.intent-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.intent-card { display: flex; flex-direction: column; gap: 0.5rem; }
.intent-eyebrow { font-size: 0.7rem; letter-spacing: 0.06em; color: var(--accent-clay); }
.intent-card-title { margin: 0; font-weight: 700; color: var(--ink-primary); }
.intent-card-copy { margin: 0; font-size: 0.9375rem; color: var(--ink-secondary); }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line-subtle);
}

.section-title {
    margin: 0;
    font-size: 1.75rem;
    font-style: italic;
    color: var(--ink-primary);
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--ink-secondary);
}

.artifacts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    row-gap: 4rem;
}

.log-list {
    --timeline-axis: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 2.75rem;
    position: relative;
    padding: 1.25rem 0 1.25rem 0.5rem;
}

.log-list::before {
    content: "";
    position: absolute;
    left: var(--timeline-axis);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(77, 124, 15, 0.2), rgba(168, 75, 47, 0.45));
    border-radius: 999px;
    opacity: 0.9;
}

.log-entry {
    --entry-offset: 0px;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.log-entry:nth-child(2n) { --entry-offset: clamp(8px, 2vw, 32px); }
.log-entry:nth-child(2n + 1) { --entry-offset: clamp(-4px, 1vw, 18px); }

.log-body {
    position: relative;
    padding: 1.5rem 1.75rem 1.5rem 2.75rem;
    margin-left: calc(var(--timeline-axis) - 0.25rem);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(249, 248, 246, 0.96));
    border: 1px solid rgba(229, 226, 222, 0.9);
    border-radius: 0.9rem;
    box-shadow: 0 22px 46px -34px rgba(31, 29, 27, 0.5);
    transform: translateX(var(--entry-offset));
    transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.25s ease;
}

.log-body::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(168, 75, 47, 0.06), transparent 45%), radial-gradient(circle at bottom right, rgba(77, 124, 15, 0.05), transparent 40%);
    pointer-events: none;
}

.log-entry:hover .log-body {
    transform: translateX(calc(var(--entry-offset) + 6px));
    box-shadow: 0 24px 52px -30px rgba(31, 29, 27, 0.6);
    border-color: rgba(168, 75, 47, 0.45);
}

.timeline-marker {
    position: absolute;
    left: calc(var(--timeline-axis) - var(--entry-offset));
    top: 1.75rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #fff 22%, rgba(168, 75, 47, 0.9) 65%, rgba(77, 124, 15, 0.85) 100%);
    box-shadow: 0 0 0 6px var(--bg-paper), 0 10px 22px -10px rgba(31, 29, 27, 0.3);
    border: 1px solid rgba(168, 75, 47, 0.35);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.log-entry:hover .timeline-marker {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.96), 0 14px 26px -12px rgba(31, 29, 27, 0.45);
    border-color: rgba(77, 124, 15, 0.8);
}

.log-timeframe { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-secondary); margin: 0 0 0.35rem; }
.log-title { margin: 0 0 0.25rem; font-weight: 600; color: var(--ink-primary); }
.log-organization { margin: 0; font-size: 0.9375rem; color: var(--ink-secondary); }
.log-summary { margin: 0.4rem 0 0; font-size: 0.9375rem; color: #78716c; }

.writing-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.writing-card {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem 1.75rem;
    border: 1px solid var(--line-subtle);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 18px -12px rgba(31, 29, 27, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.writing-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    background: linear-gradient(180deg, var(--accent-clay), var(--accent-sage));
    opacity: 0.9;
}
.writing-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 24%, rgba(168, 75, 47, 0.08), transparent 34%),
        linear-gradient(135deg, rgba(77, 124, 15, 0.06), rgba(168, 75, 47, 0.05));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    mix-blend-mode: multiply;
}
.writing-card:hover {
    border-color: rgba(77, 124, 15, 0.45);
    box-shadow: 0 14px 28px -14px rgba(31, 29, 27, 0.18);
    transform: translateY(-2px);
}
.writing-card:hover::after { opacity: 1; }
.writing-card:focus-within {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}
.writing-meta {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--ink-secondary);
    text-transform: uppercase;
}
.writing-title {
    margin: 0;
    font-weight: 700;
    color: var(--ink-primary);
    font-size: 1.25rem;
    line-height: 1.3;
}
.writing-summary { margin: 0; font-size: 0.95rem; color: #6b655f; line-height: 1.7; }
.writing-link { font-size: 0.75rem; letter-spacing: 0.08em; color: var(--accent-clay); text-decoration: none; margin-top: auto; }
.writing-link:hover { color: var(--ink-primary); text-decoration: underline; text-decoration-color: var(--accent-sage); }
.writing-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.contact-footer { padding-top: 4rem; border-top: 1px solid var(--line-subtle); }
.contact-cta {
    position: relative;
    overflow: hidden;
    padding: 2.25rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(82, 82, 82, 0.15);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(245, 241, 236, 0.95));
    background-image: radial-gradient(circle at 20% 20%, rgba(166, 190, 181, 0.12), transparent 32%),
        radial-gradient(circle at 80% 10%, rgba(248, 201, 168, 0.15), transparent 34%),
        radial-gradient(circle at 50% 80%, rgba(94, 234, 212, 0.08), transparent 40%);
    box-shadow: 0 20px 60px -30px rgba(16, 15, 13, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.contact-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    opacity: 0.8;
    pointer-events: none;
    mix-blend-mode: screen;
}

.contact-intro { position: relative; z-index: 1; }
.contact-heading { margin: 0 0 0.75rem; font-size: 1.75rem; font-style: italic; color: var(--ink-primary); }
.contact-copy { margin: 0; font-size: 1rem; color: var(--ink-secondary); line-height: 1.6; max-width: 36ch; }

.contact-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    color: var(--ink-primary);
    text-decoration: none;
    background: linear-gradient(135deg, rgba(244, 244, 245, 0.9), rgba(222, 234, 228, 0.95));
    border: 1px solid rgba(78, 90, 87, 0.18);
    box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.contact-button i {
    width: 1rem;
    height: 1rem;
}

.contact-button:hover,
.contact-button:focus-visible {
    background: linear-gradient(135deg, rgba(222, 234, 228, 0.98), rgba(244, 244, 245, 0.98));
    box-shadow: 0 16px 38px -16px rgba(14, 116, 144, 0.45), 0 0 0 1px rgba(94, 234, 212, 0.55);
    transform: translateY(-1px);
}

.contact-socials {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.contact-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(82, 82, 82, 0.15);
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink-secondary);
    box-shadow: 0 8px 20px -14px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.contact-social:hover,
.contact-social:focus-visible {
    color: var(--ink-primary);
    border-color: rgba(78, 90, 87, 0.35);
    box-shadow: 0 12px 26px -14px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(94, 234, 212, 0.35);
    transform: translateY(-1px);
}

.contact-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.is-hidden { display: none !important; }
.is-transparent { opacity: 0; }

@media (min-width: 768px) {
    .home-nav { flex-direction: row; align-items: center; justify-content: space-between; }
    .home-nav-group { flex-direction: row; align-items: center; gap: 1.5rem; }
    .home-mode-toggle { width: auto; }
    .hero-grid { grid-template-columns: repeat(12, 1fr); }
    .hero-copy { grid-column: span 7; }
    .hero-visual { grid-column: span 5; }
    .intent-grid { grid-template-columns: repeat(3, 1fr); }
    .artifacts-grid { grid-template-columns: repeat(2, 1fr); }
    .writing-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-cta { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
    .contact-actions { align-items: flex-end; }
}

@media (min-width: 1024px) {
    .artifacts-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mode Toggle */
.mode-toggle {
    display: flex; gap: 8px; padding: 6px; background: #FFF; border: 1px solid var(--line-subtle); border-radius: 4px; flex-wrap: wrap;
}
.toggle-btn {
    padding: 8px 12px; font-size: 10px; font-family: 'IBM Plex Mono', monospace; color: var(--ink-secondary); border-radius: 2px; cursor: pointer; transition: all 0.2s;
}
.toggle-btn.active { background: var(--ink-primary); color: #FFF; font-weight: 500; }

/* Intent Buttons */
.intent-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(168, 75, 47, 0.35); /* clay wash */
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-clay);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 45%),
        linear-gradient(135deg, rgba(168, 75, 47, 0.08), rgba(77, 124, 15, 0.08));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04),
        0 6px 16px -12px rgba(28, 25, 23, 0.35);
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    transform: translateY(0) scale(1);
    will-change: transform;
}
.intent-btn:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 60%),
        linear-gradient(135deg, rgba(168, 75, 47, 0.2), rgba(77, 124, 15, 0.18));
    color: #6b2e14;
    border-color: rgba(77, 124, 15, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(77, 124, 15, 0.06),
        0 10px 22px -12px rgba(77, 124, 15, 0.4);
    transform: translateY(-1px) scale(1.01);
}
.intent-btn.active {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.05) 70%),
        linear-gradient(135deg, rgba(168, 75, 47, 0.9), rgba(77, 124, 15, 0.85));
    color: #fff;
    border-color: var(--accent-clay);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        0 10px 24px -12px rgba(168, 75, 47, 0.5);
    transform: translateY(1px) scale(0.99);
}
.intent-btn:focus-visible {
    outline: 2px solid var(--accent-sage);
    outline-offset: 3px;
    box-shadow: 0 0 0 2px rgba(168, 75, 47, 0.55);
}
.intent-btn.selected {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.08) 70%),
        linear-gradient(135deg, rgba(168, 75, 47, 1), rgba(77, 124, 15, 0.95));
    color: #fff;
    border-color: rgba(168, 75, 47, 0.8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.14),
        0 12px 26px -12px rgba(168, 75, 47, 0.55);
    outline: 1px solid rgba(255, 255, 255, 0.5);
}
.intent-btn .intent-icon {
    width: 1rem;
    height: 1rem;
}
