/* ============================================================
   mekhisimpson.com — one stylesheet for every page.

   Oct 26, 2026 redesign. A personal portfolio that reads like a
   publication. References Mekhi picked:
     - Wix Blog ("How to Start a Blog"): the masthead and the hero,
       a big headline left and a bold image on a color block right.
       Used on EVERY page.
     - Adobe Create: the card grid with small orange mono tags.
       The tag says where a piece came from (Shortlist, Roar, Ligo).
     - Penny Hoarder: thumbnail rows with a date, and a boxed
       sidebar card.
   Headings are handwritten (Caveat) to match the drawn portrait.

   HOW TO READ IT: tokens at the top, then base text, then each
   piece of the page in the order it appears.
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --cream: #FBF6ED;       /* page background */
  --paper: #FFFFFF;       /* cards */
  --ink: #17140F;         /* headings, filled buttons */
  --ink-soft: #4C463C;    /* body paragraphs */
  --line: #E7DFD1;        /* hairlines */
  --accent: #C2410C;      /* tags, links, the hero color block */
  --accent-soft: #FDEAD7; /* the New tag, soft panels */

  --display: "Caveat", "Bradley Hand", cursive;          /* headings */
  --sans: "Inter", -apple-system, system-ui, sans-serif;  /* body */
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace; /* tags */

  --container: 1120px;
  --gutter: 48px;
  --measure: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
p { max-width: var(--measure); }
[id] { scroll-margin-top: 24px; }

h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: 0; }
h1 { font-size: clamp(48px, 6.4vw, 80px); line-height: 0.98; }
h2 { font-size: clamp(34px, 4vw, 46px); line-height: 1.05; }
h3 { font-weight: 600; font-size: 19px; line-height: 1.35; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-soft); }

/* The source tag: "Roar / Interview". Small, orange, mono. */
.tag {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.01em;
}

/* "New" pill, added by new-badge.js for a week after publishing. */
.tag-new {
  display: inline-block; margin-left: 8px; padding: 1px 8px; vertical-align: 2px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ---------- MASTHEAD (Wix) ----------
   Wordmark left; section links and a Say hi pill on the right,
   with one dark rule underneath. */
.masthead { padding-top: 22px; }
.masthead-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--ink);
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; color: var(--ink); text-decoration: none; }
.sections { display: flex; align-items: center; gap: 28px; }
.sections a { font-size: 15px; color: var(--ink-soft); text-decoration: none; }
.sections a:hover { color: var(--accent); }
.sections a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.pill {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  border: 1px solid var(--ink); color: var(--ink); transition: background .15s, color .15s;
}
.sections .pill { color: var(--ink); }
.pill:hover, .sections .pill:hover { background: var(--ink); color: var(--cream); }

/* ---------- HERO (Wix) ----------
   Headline top left, "Read more" bottom left on a long rule,
   bold image on a color block right. */
.hero { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; padding-top: 44px; padding-bottom: 64px; align-items: stretch; }
.hero-text { display: flex; flex-direction: column; gap: 18px; }
.hero-text .lede { color: var(--ink-soft); font-size: 18px; }
.read-more {
  margin-top: auto; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink);
  font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; max-width: 300px;
}
.read-more:hover { color: var(--accent); border-color: var(--accent); }
.hero-art {
  background: var(--accent); border-radius: 4px; padding: 44px;
  display: flex; align-items: center; justify-content: center; min-height: 380px;
}
.hero-art img {
  width: 100%; height: auto; max-height: 420px; object-fit: cover;
  border-radius: 10px; box-shadow: 0 24px 50px rgba(23, 20, 15, 0.28);
  transform: rotate(-2deg);
}
.hero-art--soft { background: var(--accent-soft); }

/* ---------- SECTION HEADS ---------- */
.block { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.block-head a { font-size: 15px; font-weight: 500; color: var(--ink); }

/* ---------- CARD GRID (Adobe / Wix) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 32px; }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card .title { font-size: 21px; font-weight: 400; line-height: 1.3; }
.card:hover .title { color: var(--accent); }
.card .date { font-size: 13px; color: var(--ink-soft); }
.card[hidden] { display: none; }

/* Filter tabs above the writing grid (Adobe's sub-nav band). */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 10px; margin-bottom: 36px;
  background: var(--ink); border-radius: 4px;
}
.tabs button {
  font: 500 14px var(--sans); color: rgba(251, 246, 237, 0.75); background: none;
  border: 0; padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.tabs button:hover { color: #fff; }
.tabs button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }

/* ---------- THUMBNAIL ROWS (Penny Hoarder) ---------- */
.rows { list-style: none; display: grid; gap: 22px; }
.row-link { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; text-decoration: none; color: var(--ink); }
.row-link .thumb { aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; background: var(--line); }
.row-link .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-link .title { display: block; font-size: 18px; font-weight: 500; line-height: 1.35; margin: 4px 0; }
.row-link:hover .title { color: var(--accent); }
.row-link .date { font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- HOME: writing left, about card right ---------- */
.home-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 56px; align-items: start; }
.about-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; text-align: center;
}
.about-card .portrait { width: 150px; margin: 0 auto 8px; }
.about-card h2 { font-size: 34px; margin-bottom: 10px; }
.about-card p { font-size: 15.5px; color: var(--ink-soft); margin: 0 auto 12px; }
.about-card a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.about-card a:hover { color: var(--accent); }

/* Games preview at the bottom of home. */
.game-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.game-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.game-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; transition: transform .2s ease; }
.game-card:hover img { transform: translateY(-3px); }
.game-card .name { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; }
.game-card:hover .name { color: var(--accent); }
.game-card .blurb { font-size: 15px; color: var(--ink-soft); }

/* ---------- CASE STUDY BITS ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-box { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 26px 24px; }
.stat { font-family: var(--display); font-weight: 700; font-size: clamp(48px, 5vw, 60px); line-height: 1; }
.stat-box p { color: var(--ink-soft); font-size: 15.5px; margin-top: 10px; }

.detail { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.detail-head { display: flex; flex-direction: column; gap: 10px; }
.detail-body { display: flex; flex-direction: column; gap: 20px; }
.detail-body p { color: var(--ink-soft); }
.detail-body .go { font-weight: 500; color: var(--ink); }
.detail-body .go:hover { color: var(--accent); }
.shot { border-radius: 4px; border: 1px solid var(--line); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shots--2 { grid-template-columns: repeat(2, 1fr); align-items: center; }
.shots img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); }
.sub { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.sub:first-child { padding-top: 0; border-top: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 36px; }
.grid-2 p { color: var(--ink-soft); font-size: 16px; margin-top: 6px; }
.note { font-size: 14px; color: var(--ink-soft); border-left: 2px solid var(--line); padding-left: 14px; margin-top: 28px; }

/* ---------- HOBBIES ----------
   Visual first: each thing gets a big image, then the name and a
   short explanation side by side underneath. */
.hobbies { padding-top: 44px; padding-bottom: 40px; }
.hobbies-intro { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.hobbies-intro p { color: var(--ink-soft); font-size: 18px; }
.hobbies-intro a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.showcase { display: flex; flex-direction: column; gap: 16px; padding-bottom: 64px; }
.showcase + .showcase { padding-top: 56px; border-top: 1px solid var(--line); }
.showcase img { width: 100%; height: auto; border-radius: 6px; }
.showcase-main { aspect-ratio: 16 / 9; object-fit: cover; }
.showcase a:hover .showcase-main { opacity: 0.94; }
.showcase-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.showcase-pair img { aspect-ratio: 16 / 9; object-fit: cover; }
.showcase-text { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; margin-top: 12px; }
.showcase-text h2 { font-size: clamp(44px, 5vw, 60px); margin-top: 4px; }
.showcase-text p { color: var(--ink-soft); font-size: 18px; }
.showcase-text .go { display: inline-block; margin-top: 14px; font-weight: 500; color: var(--ink); }
.showcase-text .go:hover { color: var(--accent); }

/* Plain link list (kept for simple pages). */
.clips { list-style: none; border-top: 1px solid var(--line); }
.clips li { border-bottom: 1px solid var(--line); }
.clips a, .clips .row { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; padding: 18px 4px; text-decoration: none; color: var(--ink); }
.clips a:hover { color: var(--accent); }
.clips .title { font-weight: 500; }
.clips .date { font-size: 14px; color: var(--ink-soft); white-space: nowrap; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--ink); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 44px; font-size: 15px; color: var(--ink-soft); }
.footer-inner .wordmark { font-size: 24px; }
.footer-inner a { color: var(--ink-soft); }
.footer-inner a:hover { color: var(--accent); }

/* ---------- PHONE ---------- */
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .hero, .home-grid, .detail, .showcase-text { grid-template-columns: 1fr; gap: 28px; }
  .showcase-text { gap: 10px; }
  .hero { padding-top: 28px; padding-bottom: 44px; }
  .hero-art { min-height: 0; padding: 24px; }
  .read-more { margin-top: 8px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 32px 18px; }
  .card .title { font-size: 17px; }
  .stats, .game-cards, .grid-2 { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  /* Phone: links drop under the wordmark, still on the right edge. */
  .masthead-top { flex-wrap: wrap; row-gap: 12px; }
  .wordmark { font-size: 27px; }
  .sections { gap: 16px; margin-left: auto; }
  .sections a { font-size: 14px; }
  .sections .pill { display: none; }
  .cards { grid-template-columns: 1fr; }
  .row-link { grid-template-columns: 110px 1fr; gap: 14px; }
  .row-link .title { font-size: 16px; }
  .clips a, .clips .row { flex-direction: column; gap: 4px; }
}

/* ---------- ADDED OCT 26: case study parts ---------- */
/* Four stats in a row (Ligo, the capstone). */
.stats--4 { grid-template-columns: repeat(4, 1fr); }
.stats--4 .stat { font-size: clamp(40px, 4vw, 52px); }

/* Two cards across, for the Case studies index. */
.cards--2 { grid-template-columns: repeat(2, 1fr); }

/* Typographic art for work that has no picture yet (the capstone).
   Works inside .hero-art and inside a .card-img. */
.type-art {
  width: 100%; height: 100%; min-height: 220px; display: flex; flex-direction: column;
  justify-content: center; gap: 10px; padding: 28px; border-radius: 10px;
  background: var(--ink); color: var(--cream); box-shadow: 0 24px 50px rgba(23, 20, 15, 0.28);
}
.hero-art .type-art { transform: rotate(-2deg); min-height: 300px; }
.card-img .type-art { border-radius: 0; box-shadow: none; }
.type-art__kicker { font-family: var(--mono); font-size: 13px; color: #F59E5B; }
.type-art__big { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 5vw, 68px); line-height: 1; }
.type-art__sub { font-size: 15px; color: rgba(251, 246, 237, 0.75); }

/* The four post categories, as tagged mini boxes (from the PDF). */
.mini-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.mini-cats > div { border-top: 2px solid var(--accent); padding-top: 8px; }
.mini-cats p { font-size: 15px; color: var(--ink-soft); margin-top: 4px; }

/* Portrait (4:5) posts in a row. */
.posts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.posts img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }

/* "In place of" table for the marketing system. */
.sys { border-top: 1px solid var(--ink); }
.sys-head { display: flex; justify-content: space-between; padding: 10px 0; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.sys-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.sys-row h3 { font-size: 17px; }
.sys-row p { font-size: 15px; color: var(--ink-soft); }
.sys-row .tag { text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }

/* Share-of-code bars. */
.bars { display: grid; gap: 12px; max-width: 640px; }
.bar { display: grid; grid-template-columns: 130px 1fr 48px; align-items: center; gap: 14px; font-size: 15px; }
.bar .track { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar .track span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar span:last-child { text-align: right; color: var(--ink-soft); }
.bar--all { font-weight: 600; }
.bar--all .track span { background: var(--ink); }
.dots { padding-left: 20px; color: var(--ink-soft); display: grid; gap: 8px; }
.dots li::marker { color: var(--accent); }

@media (max-width: 860px) {
  .stats--4, .mini-cats { grid-template-columns: 1fr 1fr; }
  .cards--2 { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .stats--4 { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 100px 1fr 40px; }
  .sys-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
/* The library has no screenshot yet: a 16:9 type panel in its place. */
.type-art--library { aspect-ratio: 16 / 9; border-radius: 6px; box-shadow: none; align-items: center; text-align: center; }
/* Campus Feed launch: the 4:5 feed post, then the story strip full width. */
.feed-launch { display: grid; grid-template-columns: 1fr; gap: 14px; }
.feed-launch img:first-child { max-width: 440px; }
.feed-launch img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); }
@media (max-width: 860px) { .feed-launch { grid-template-columns: 1fr; } }
