/* Homepage: the site's identity (#f00, black, Courier, pixel Einstein, the
   quote) laid out like openai.com/index pages: a hero collage of real
   artifacts, a clean headline with meta, square-image card grids, black footer. */
:root {
    --red: #f00;
    --ink: #0d0d0d;
    --paper: #fff;
    --cream: #f8edd9;
    --gutter: clamp(18px, 4vw, 48px);
    /* the old site's fonts: its own Courier Prime file for text, plain bold sans-serif for titles */
    --sans: sans-serif;
    --mono: "courier-prime.regular", "Courier New", monospace;
}
@font-face { font-family: "courier-prime.regular"; font-weight: 400; font-style: normal; src: url(../assets/fonts/courier-prime.regular.ttf) format("truetype"); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--red); color: #000; font: 400 15px/1.5 var(--mono); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.meta { font: 400 12px/1.3 var(--mono); letter-spacing: .03em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- hero: collage of real artifacts + headline ---------- */
.hero {
    position: relative; isolation: isolate; height: clamp(620px, 100svh, 920px); overflow: hidden;
    background: var(--red);
}
/* no z-index here: the collage must not be its own stacking context, or the multiplied pieces could not see the red */
.collage { position: absolute; inset: 0; max-width: 1560px; margin: 0 auto; container-type: inline-size; }
.piece { position: absolute; margin: 0; }
.piece img { width: 100%; }

/* the quote in a Windows 98 Notepad window (openai's title block) */
.notepad {
    z-index: 1; left: 26%; top: 17.5%; width: 47.2%; padding: 3px; background: silver;
    box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff, 0 14px 36px rgba(0, 0, 0, .24);
}
.notepad-body {
    position: relative; padding: 1.9cqw 3.8cqw 2.2cqw 1.9cqw;
    background: #fff; border-right: 16px solid #dfdfdf;
    box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.notepad-body::after {
    content: ""; position: absolute; top: 2px; right: -16px; width: 16px; height: 44%;
    background: silver; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}
.select { color: #000; font: 400 clamp(11px, 1.56cqw, 24px)/1.56 var(--mono); }
.select span { display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.select .sel { display: inline-block; padding: 0 4px; margin: 2px -4px; background: navy; color: #fff; }
.select .caret { display: inline-block; width: 2px; height: 1.04em; margin-left: 2px; vertical-align: -.14em; background: #000; animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .select .caret { animation: none; } }

/* research figure on tall white paper plate (openai's botanical plate) — bridges .select and .photo */
.paper {
    z-index: 2; right: 4.8%; top: 8.5%; width: 27.5%; min-height: 55%;
    padding: 1.4cqw 1.25cqw; background: var(--paper);
    display: flex; flex-direction: column; justify-content: flex-start; gap: .7cqw;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}
.paper-head {
    display: flex; justify-content: space-between; gap: 8px;
    padding-bottom: .55cqw; border-bottom: 1px solid #e5e5e5;
    color: #222; font: 400 clamp(7px, .72cqw, 10px)/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase;
}
.paper figcaption, .photo figcaption { margin-top: 4px; color: #444; font: 400 clamp(7px, .72cqw, 10px)/1.35 var(--mono); text-transform: uppercase; text-align: right; }
.photo figcaption { position: absolute; right: 0; top: calc(100% + 4px); color: #000; }

/* experiment output (openai's aerial photo) — overlaps bottom of .paper */
.photo { z-index: 3; right: 9.2%; bottom: 6.5%; width: 34.4%; box-shadow: 0 14px 36px rgba(0, 0, 0, .18); }
.photo img { aspect-ratio: 4 / 3; object-fit: cover; }

/* portrait — tucked tightly overlapping empty bottom-left corner of .photo */
.portrait { z-index: 4; right: 40.2%; bottom: 4.5%; width: 12.2%; box-shadow: 0 12px 28px rgba(0, 0, 0, .24); }
.portrait img { aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.1); }

/* natural-history specimen cutout bridging .select, .paper and .photo (openai's butterfly) */
.specimen { z-index: 5; right: 25.2%; top: 34.5%; width: 19.2%; transform: rotate(-12deg); pointer-events: none; }
.specimen img { filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .36)); }

/* the rotating name gif from the original homepage, top-left */
/* the bio line at the very top, Courier like the original header, no separators */
.topline { position: absolute; z-index: 6; top: 10px; left: var(--gutter); right: var(--gutter); display: flex; flex-wrap: wrap; gap: 2px 2.4em; color: #000; font: 400 13px/1.25 var(--mono); }
.name-gif { position: absolute; z-index: 2; left: calc(var(--gutter) - 2.4vw); top: calc(-4.6vw + 6px); width: clamp(200px, 24vw, 340px); mix-blend-mode: multiply; }
.hero-copy { position: absolute; z-index: 6; left: var(--gutter); bottom: clamp(44px, 11vh, 108px); display: grid; gap: 14px; max-width: min(38vw, 540px); }
.hero h1 { font: 700 clamp(52px, 6.2vw, 96px)/.95 var(--sans); letter-spacing: -.038em; }

/* ---------- lead ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: var(--gutter); padding: clamp(56px, 9vw, 120px) var(--gutter); }
.lead p { max-width: 30ch; font: 700 clamp(26px, 3.2vw, 44px)/1.15 var(--sans); letter-spacing: -.02em; }
.lead p.meta { max-width: none; padding-top: .9em; font: 400 12px/1.3 var(--mono); letter-spacing: .03em; }

/* ---------- card grids (openai "keep reading") ---------- */
.grid-section { padding: 0 var(--gutter) clamp(56px, 8vw, 110px); }
.grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 18px; margin-bottom: clamp(18px, 2.4vw, 28px); border-top: 1px solid #000; }
.grid-head h2 { font: 700 clamp(24px, 2.4vw, 32px)/1.1 var(--sans); letter-spacing: -.015em; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 2vw, 28px); padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
/* every project is a Windows 98 window (browser, PDF reader, image editor) floating on the red, like the art store */
.card-img { position: relative; aspect-ratio: 1; }
.card:hover .win98 { transform: translateY(-6px); }
.card h3 { font: 700 clamp(18px, 1.6vw, 22px)/1.2 var(--sans); letter-spacing: -.01em; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.card .excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font: 400 14px/1.45 var(--mono); }

/* c:/art-store: a Windows 98 window (same chrome as the art store page) holding the old art-section wallpaper */
@font-face { font-family: "Pixelated MS Sans Serif"; font-weight: 400; src: url(../assets/vendor/98.css/ms_sans_serif.woff2) format("woff2"); }
@font-face { font-family: "Pixelated MS Sans Serif"; font-weight: 700; src: url(../assets/vendor/98.css/ms_sans_serif_bold.woff2) format("woff2"); }
.win98 { position: absolute; top: 50%; left: 12.5%; width: 75%; translate: 0 -50%; padding: 3px; background: silver; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff; transition: transform .5s ease; }
.win98-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 2px 3px 4px; background: linear-gradient(90deg, navy, #1084d0); color: #fff; font: 700 11px/1 "Pixelated MS Sans Serif", Arial, sans-serif; }
.win98-btns { display: flex; }
.win98-btns i { width: 16px; height: 14px; background: silver no-repeat; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; }
.win98-btns .min { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='6' height='2' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M0 0h6v2H0z'/%3E%3C/svg%3E"); background-position: bottom 3px left 4px; }
.win98-btns .max { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='9' height='9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 0H0v9h9V0zM8 2H1v6h7V2z' fill='%23000'/%3E%3C/svg%3E"); background-position: top 2px left 3px; }
.win98-btns .close { margin-left: 2px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0h2v1h1v1h2V1h1V0h2v1H7v1H6v1H5v1h1v1h1v1h1v1H6V6H5V5H3v1H2v1H0V6h1V5h1V4h1V3H2V2H1V1H0V0z' fill='%23000'/%3E%3C/svg%3E"); background-position: top 3px left 4px; }
.win98-bar > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win98-menu, .win98-address, .win98-tools { color: #000; font: 11px/1.2 "Pixelated MS Sans Serif", Arial, sans-serif; white-space: nowrap; }
.win98-menu { display: flex; gap: 10px; overflow: hidden; padding: 4px 4px 3px; }
.win98-address, .win98-tools { display: flex; align-items: center; gap: 4px; padding: 3px 2px 4px; border-top: 1px solid grey; box-shadow: inset 0 1px #fff; }
.win98-address > span { padding: 0 2px; color: #404040; }
/* sunken white fields: the address, the page counter, the zoom */
.win98-address b, .win98-tools b { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 3px 4px 2px; background: #fff; font-weight: 400; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.win98-address b { flex: 1; }
.win98-tools i { width: 22px; height: 20px; background: silver no-repeat center; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; }
.win98-tools .prev { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='4' height='7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 0v7L0 3.5z'/%3E%3C/svg%3E"); }
.win98-tools .next { margin-right: 4px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='4' height='7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0v7l4-3.5z'/%3E%3C/svg%3E"); }
/* the sunken viewport; the pictures inside are 256-colour dithered captures, kept pixel-sharp */
.win98-view { aspect-ratio: 4 / 3; overflow: hidden; padding: 2px; background: #fff; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.win98-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; image-rendering: pixelated; }
/* PDF reader: a white page on the grey desk */
.win98.pdf .win98-view { padding: 8px 9% 0; background: #808080; }
.win98.pdf .win98-view img { height: auto; box-shadow: 2px 2px 0 #000; }
/* image editor: the picture on its white canvas */
.win98.paint .win98-view { position: relative; background: #808080; }
.win98.paint .win98-view img { position: absolute; inset: 9px; width: auto; height: calc(100% - 18px); margin: auto; box-shadow: 2px 2px 0 #000; }
.win98-body { container-type: inline-size; display: grid; place-items: center; aspect-ratio: 4 / 3; margin-top: 3px; background: url(../assets/images/home/art-wallpaper.jpg) center / cover; }
/* "ART STORE" set like on the old homepage: heavy sans, tight tracking */
.win98-body span { color: #000; font: 700 15cqw/1 Arial, "Helvetica Neue", sans-serif; letter-spacing: -.05em; white-space: nowrap; }

/* ---------- bio ---------- */
.bio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: var(--gutter); padding: 0 var(--gutter) clamp(64px, 9vw, 120px); }
.bio-side { display: grid; gap: 16px; align-content: start; }
.bio-side h2 { font: 700 clamp(24px, 2.4vw, 32px)/1.1 var(--sans); padding-top: 18px; border-top: 1px solid #000; }
.bio-side img.photo-bw { width: min(100%, 260px); aspect-ratio: 1; object-fit: cover; mix-blend-mode: multiply; }
.bio-text { display: grid; align-content: start; gap: 18px; max-width: 68ch; padding-top: 18px; border-top: 1px solid #000; font: 400 clamp(15px, 1.15vw, 17px)/1.6 var(--mono); }

/* ---------- footer (openai-style black, identity red) ---------- */
.site-footer { background: #000; color: #fff; padding: clamp(48px, 6vw, 80px) var(--gutter) 28px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.foot-cols h3 { margin-bottom: 12px; color: #9a9a9a; font: 400 13px var(--mono); }
.foot-cols ul { display: grid; gap: 8px; padding: 0; list-style: none; font: 700 16px var(--sans); }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { color: var(--red); }
.addiction { max-width: 70ch; margin: 0 0 clamp(40px, 6vw, 72px); color: #cfcfcf; font: 400 clamp(15px, 1.3vw, 18px)/1.6 var(--mono); }
.addiction::before { content: "> "; color: var(--red); }
.wordmark { margin-top: clamp(40px, 6vw, 72px); color: var(--red); font: 700 clamp(36px, 12.8vw, 230px)/.8 var(--sans); letter-spacing: -.06em; white-space: nowrap; }
.site-counter { height: 20px; width: auto; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; color: #9a9a9a; }


@media (max-width: 960px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    /* phone: the collage becomes a tight overlapping block above the headline */
    .hero { display: flex; flex-direction: column; height: auto; min-height: 0; }
    .collage { position: relative; inset: auto; width: 100%; max-width: none; height: 136vw; }
    .notepad { left: 4%; top: 1%; width: 88%; }
    .notepad-body { padding: 2.8cqw 3.4cqw 3cqw 3cqw; border-right-width: 12px; }
    .notepad-body::after { right: -12px; width: 12px; }
    .select { font-size: 3cqw; }
    .paper { right: 4%; top: 25.5%; width: 55%; min-height: 41%; padding: 2.4cqw; gap: 1.2cqw; }
    .paper-head { font-size: 1.9cqw; padding-bottom: 1cqw; }
    .paper figcaption, .photo figcaption { font-size: 1.9cqw; }
    .photo { right: 4%; left: auto; bottom: 5%; width: 69%; }
    .portrait { left: 4%; right: auto; bottom: 1.5%; width: 29%; }
    .specimen { right: auto; left: 21%; top: 46%; width: 39%; transform: rotate(-10deg); }
    .topline { position: static; padding: 10px var(--gutter) 0; }
    .name-gif { position: relative; left: auto; top: auto; width: 200px; margin: -48px 0 -66px -8px; }
    .hero-copy { position: static; max-width: none; padding: 6px var(--gutter) 28px; }
    .lead, .bio { grid-template-columns: 1fr; }
    .grid { grid-template-columns: minmax(0, 1fr); } /* minmax: long window titles must not widen the column */
    .card-img { aspect-ratio: auto; padding: 6px 0 4px; }
    .win98 { position: relative; top: auto; left: auto; width: 88%; margin: 0 auto; translate: none; }
}
