:root {
    --cream: #f4ede1;
    --cream-ink: #1a1410;
    --cream-mute: #6b5f52;
    --black: #0a0a0a;
    --black-soft: #141414;
    --green: #7dff9a;
    --green-dim: #4a9f5e;
    --mono-ink: #e8e8e8;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Fraunces', Georgia, serif;
    background: var(--black);
    color: var(--mono-ink);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- grain overlay ---------- */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: .18;
    mix-blend-mode: overlay;
}

/* ---------- split layout ---------- */
.split {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
}

.half {
    flex: 1 1 50%;
    position: relative;
    overflow: hidden;
    transition: flex-basis .7s var(--ease), filter .7s var(--ease);
    padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* hover expansion */
@media (hover: hover) and (min-width: 780px) {
    .split:has(.left:hover) .left { flex-basis: 62%; }
    .split:has(.left:hover) .right { flex-basis: 38%; filter: brightness(.55) saturate(.7); }
    .split:has(.right:hover) .right { flex-basis: 62%; }
    .split:has(.right:hover) .left { flex-basis: 38%; filter: brightness(.85) saturate(.85); }
}

/* divider rule — attached to the left half so it follows the flex boundary */
.left::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(125,255,154,.25) 20%, rgba(26,20,16,.25) 80%, transparent);
    z-index: 5;
    pointer-events: none;
}

/* ===========================================================
   LEFT — photographer
   =========================================================== */
.left {
    background: var(--cream);
    color: var(--cream-ink);
    font-family: 'Fraunces', Georgia, serif;
}

.left::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(195, 140, 70, .10), transparent 55%),
        radial-gradient(ellipse at 70% 90%, rgba(80, 40, 10, .08), transparent 60%);
    pointer-events: none;
}

.l-top, .l-mid, .l-bot { position: relative; z-index: 2; }

.l-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--cream-mute);
    font-weight: 500;
}

.l-top .marks {
    display: flex;
    gap: .35rem;
    align-items: center;
}
.l-top .marks span {
    width: 10px; height: 10px;
    border: 1px solid var(--cream-mute);
    display: inline-block;
}
.l-top .marks span:nth-child(2),
.l-top .marks span:nth-child(4) { background: var(--cream-ink); border-color: var(--cream-ink); }

.wordmark {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-size: clamp(3.5rem, 9vw, 8.5rem);
    line-height: .88;
    letter-spacing: -.04em;
    margin: 0;
    font-variation-settings: "opsz" 144, "SOFT" 50;
}
.wordmark em {
    font-style: italic;
    font-weight: 500;
    font-variation-settings: "opsz" 144, "SOFT" 100;
}

.l-tag {
    font-size: .78rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--cream-mute);
    margin: 1.2rem 0 0 .2rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
}

.l-cta {
    display: inline-flex;
    align-items: baseline;
    gap: .6rem;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.4rem, 2.6vw, 2.1rem);
    color: var(--cream-ink);
    padding-bottom: .15em;
    border-bottom: 1px solid var(--cream-ink);
    transition: gap .4s var(--ease), letter-spacing .4s var(--ease);
    align-self: flex-start;
}
.l-cta .arrow { font-style: normal; font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.l-cta:hover { gap: 1.1rem; letter-spacing: .01em; }
.l-cta:focus-visible { outline: 2px solid var(--cream-ink); outline-offset: 6px; }

.l-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cream-mute);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.l-meta .roman { font-family: 'Fraunces', serif; font-style: italic; font-size: .95rem; text-transform: none; letter-spacing: 0; }

/* ===========================================================
   RIGHT — developer
   =========================================================== */
.right {
    background: var(--black);
    color: var(--mono-ink);
    font-family: 'JetBrains Mono', monospace;
}

.right::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(125,255,154,.025) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse at 70% 30%, rgba(125,255,154,.06), transparent 60%);
    pointer-events: none;
}

.r-top, .r-mid, .r-bot { position: relative; z-index: 2; }

.r-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: .72rem;
    letter-spacing: .08em;
    color: var(--green-dim);
    text-transform: uppercase;
}
.r-top .dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green), 0 0 16px rgba(125,255,154,.4);
    margin-right: .5rem;
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: .4; }
    50% { opacity: 1; }
}

.term {
    font-size: clamp(.82rem, 1.05vw, 1rem);
    line-height: 1.7;
    color: var(--mono-ink);
}

.term .gap {
    display: block;
    height: .6em;
}

.term .line {
    display: block;
    opacity: 0;
    animation: typein .5s var(--ease) forwards;
    padding-left: 2ch;
    text-indent: -2ch;
    white-space: normal;
    word-break: break-word;
}
.term .line:nth-child(1) { animation-delay: .25s; }
.term .line:nth-child(2) { animation-delay: .55s; }
.term .line:nth-child(3) { animation-delay: .85s; }
.term .line:nth-child(4) { animation-delay: 1.10s; }
.term .line:nth-child(5) { animation-delay: 1.35s; }
.term .line:nth-child(6) { animation-delay: 1.60s; }
.term .line:nth-child(7) { animation-delay: 1.85s; }
.term .line:nth-child(8) { animation-delay: 2.10s; }
.term .line:nth-child(9) { animation-delay: 2.35s; }
.term .line:nth-child(10) { animation-delay: 2.60s; }
.term .line:nth-child(11) { animation-delay: 2.85s; }

@keyframes typein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.prompt { color: var(--green); user-select: none; }
.prompt::before { content: "$ "; }
.out { color: var(--mono-ink); }
.out::before { content: "  "; white-space: pre; }
.c { color: #5a6a5e; }

.term a {
    color: var(--mono-ink);
    border-bottom: 1px dashed transparent;
    transition: color .25s, border-color .25s;
}
.term a:hover { color: var(--green); border-bottom-color: var(--green); }
.term a:focus-visible { outline: 1px solid var(--green); outline-offset: 3px; }

.r-wordmark {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.1vw, 1.8rem);
    letter-spacing: -.02em;
    color: var(--green);
    margin: 0 0 1.4rem 0;
}
.r-wordmark::before { content: "> "; color: var(--green-dim); }

.caret {
    display: inline-block;
    width: .55em;
    height: 1em;
    background: var(--green);
    vertical-align: -2px;
    margin-left: .25rem;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.r-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: .68rem;
    letter-spacing: .08em;
    color: var(--green-dim);
    text-transform: uppercase;
}

/* ---------- load reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal .9s var(--ease) forwards;
}
.reveal.d1 { animation-delay: .05s; }
.reveal.d2 { animation-delay: .20s; }
.reveal.d3 { animation-delay: .40s; }
.reveal.d4 { animation-delay: .60s; }
.reveal.d5 { animation-delay: .80s; }

@keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- mobile ---------- */
@media (max-width: 780px) {
    html, body { overflow: auto; }
    .split {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .half {
        flex: 0 0 auto;
        min-height: 100vh;
        transition: none;
    }
    .left::after {
        top: auto; bottom: 0; left: 0; right: 0;
        width: 100%; height: 1px;
        background: linear-gradient(90deg, transparent, rgba(26,20,16,.3), rgba(125,255,154,.3), transparent);
    }
    .wordmark { font-size: clamp(3rem, 15vw, 5.5rem); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .split:has(.left:hover) .left,
    .split:has(.right:hover) .right,
    .split:has(.left:hover) .right,
    .split:has(.right:hover) .left {
        flex-basis: 50%;
        filter: none;
    }
}
