/* iam.mrzdeals.com — editorial personal profile. Hand-written, no framework. */
:root {
  --accent: #1f3a5f;
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
  --bg: #f6f4ef;
  --paper: #fbfaf7;
  --ink: #16181d;
  --muted: #5c6068;
  --faint: #7d8087;
  --line: #dcd8ce;
  --accent-ink: color-mix(in srgb, var(--accent) 88%, #000);
  --accent-wash: color-mix(in srgb, var(--accent) 7%, var(--bg));
  --w: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #11141a;
  --paper: #161a21;
  --ink: #e9e6df;
  --muted: #a4a7ae;
  --faint: #868a92;
  --line: #2a2f38;
  --accent-ink: color-mix(in srgb, var(--accent) 45%, #dfe6f0);
  --accent-wash: color-mix(in srgb, var(--accent) 18%, var(--bg));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; letter-spacing: -.012em; margin: 0 0 .4em; }
h3 { font-size: 1.32rem; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 1px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 760px; }

/* text links: the site's only call-to-action style */
.tlink {
  font-weight: 500; text-decoration: none; color: var(--accent-ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px; transition: background-size .3s ease;
}
.tlink:hover { background-size: 0 1px; background-position: 100% 100%; }
.tlink::after { content: " →"; }
a.tlink[download]::after { content: " ↓"; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; gap: 28px; height: 64px; position: relative; }
.brand { font-family: var(--font-display); font-size: 1.2rem; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-size: .875rem; color: var(--muted); text-decoration: none; letter-spacing: .01em; }
.nav a:hover { color: var(--ink); }
.bar-actions { display: flex; gap: 4px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 50%; }
.icon-btn:hover { color: var(--ink); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .i-moon, :root:not([data-theme="dark"]) .i-sun { display: none; }
.menu-btn { display: none; }
.menu-lines, .menu-lines::before { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .25s; }
.menu-lines { position: relative; transform: translateY(-3px); }
.menu-lines::before { content: ""; position: absolute; top: 6px; left: 0; }
.menu-btn[aria-expanded="true"] .menu-lines { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-lines::before { transform: translateY(-6px) rotate(-90deg); }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(56px, 10vw, 128px) 0 clamp(64px, 9vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 96px); align-items: end; }
.kicker { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 2.2em; }
.kicker::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--accent-ink); vertical-align: middle; margin-right: 12px; }
.hero-name { font-size: clamp(3rem, 8.4vw, 6.6rem); line-height: .98; letter-spacing: -.03em; margin-bottom: .32em; }
.hero-title { font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.75rem); color: var(--accent-ink); margin-bottom: 1.1em; line-height: 1.3; }
.hero-tagline { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 34em; line-height: 1.65; margin-bottom: 2.2em; }
.cta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; font-size: 1.02rem; margin-bottom: 2.4em; }
.cta .sep { color: var(--faint); }
.socials { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .84rem; letter-spacing: .02em; }
.socials a { color: var(--muted); text-decoration: none; }
.socials a:hover { color: var(--ink); text-decoration: underline; }

.portrait { position: relative; isolation: isolate; aspect-ratio: 4 / 5; max-width: 420px; margin-left: auto; }
.portrait::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--line); z-index: -1; }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15) contrast(1.02); }
.monogram { display: grid; place-items: center; background: var(--accent-wash); }
.monogram span { font-family: var(--font-display); font-size: clamp(5rem, 11vw, 8.5rem); font-style: italic; color: var(--accent-ink); letter-spacing: -.04em; line-height: 1; }
.monogram::after { content: ""; position: absolute; inset: 18px; border: 1px solid color-mix(in srgb, var(--accent-ink) 28%, transparent); }

/* ---------------------------------------------------------------- sections: label in the margin, content in the column */
.sec { padding: clamp(48px, 7vw, 96px) 0; }
.sec-grid { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); gap: clamp(24px, 5vw, 72px); }
.sec-grid::before { content: ""; grid-column: 1 / -1; border-top: 1px solid var(--line); margin-bottom: 4px; }
.sec-head { align-self: start; position: sticky; top: 92px; }
.sec-head h2 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 500; letter-spacing: .01em; margin: 0 0 .6em; }
.sec-intro { color: var(--muted); font-size: .92rem; line-height: 1.6; max-width: 22em; }
.sec-body { min-width: 0; }
.sec-body h3 { margin-bottom: .3em; }
.org, .meta, .period { color: var(--muted); font-size: .88rem; }
.meta { letter-spacing: .04em; margin-bottom: .6em; }

.prose { max-width: 40em; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.7rem; margin: 1.6em 0 .5em; }
.prose h3 { margin: 1.4em 0 .4em; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }
.prose ol { list-style: decimal; padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1.4em 0; padding-left: 1.2em; border-left: 1px solid var(--accent-ink); font-family: var(--font-display); font-style: italic; font-size: 1.25rem; }
.prose a { color: var(--accent-ink); }
.prose img { margin: 1.6em 0; }
.lead-prose { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.55; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: clamp(28px, 5vw, 64px); }
.facts { display: grid; gap: 18px; align-content: start; }
.facts div { border-top: 1px solid var(--line); padding-top: 10px; }
.facts dt { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.facts dd { font-size: .98rem; }
.facts a { text-decoration: none; }

/* services */
.services { counter-reset: svc; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); }
.services li { counter-increment: svc; border-top: 1px solid var(--line); padding: 22px 0 26px; }
.services li:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.services li::before { content: counter(svc, decimal-leading-zero); display: block; font-size: .78rem; color: var(--faint); letter-spacing: .08em; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.services p { color: var(--muted); margin: 0; }

/* ventures */
.venture { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 24px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line); }
.venture:first-child { padding-top: 0; }
.venture-logo { width: 56px; height: 56px; display: grid; place-items: center; }
.venture-logo img { max-height: 44px; width: auto; filter: grayscale(1); opacity: .85; }
:root[data-theme="dark"] .venture-logo img { filter: grayscale(1) invert(1) brightness(1.4); }
.venture h3 { margin-bottom: .2em; }
.venture p { color: var(--muted); margin: 0; max-width: 34em; }
.venture-meta { text-align: right; display: grid; gap: 4px; font-size: .88rem; justify-items: end; padding-top: 4px; }
.venture-meta span { color: var(--muted); }
.venture-meta .tlink::after { content: " ↗"; }

/* experience + education: years in the margin */
.timeline li, .edu li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 24px; padding-bottom: 32px; }
.timeline li + li, .edu li + li { padding-top: 30px; border-top: 1px solid var(--line); }
.period { font-variant-numeric: tabular-nums; padding-top: .35em; margin: 0; }
.timeline .prose { color: var(--muted); }
.edu li { padding-bottom: 22px; }
.edu li + li { padding-top: 22px; }
.edu h3 { font-size: 1.18rem; }
.edu p { margin-bottom: .4em; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px clamp(24px, 4vw, 48px); }
.skill-group h3 { font-family: var(--font-body); font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.skill-group li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }

/* projects: case-study rows */
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 48px); align-items: center; text-decoration: none; padding: 32px 0; border-bottom: 1px solid var(--line); }
.project:first-child { padding-top: 0; }
.project-img { aspect-ratio: 8 / 5; overflow: hidden; background: var(--paper); }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.project:hover .project-img img { transform: scale(1.025); }
.project h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.project p { color: var(--muted); }
.project:hover h3 { color: var(--accent-ink); }
.more-link { font-size: .9rem; font-weight: 500; color: var(--accent-ink); }
.more-link::after { content: " →"; display: inline-block; transition: transform .25s; }
.project:hover .more-link::after { transform: translateX(4px); }

/* testimonials */
.quotes { display: grid; gap: 48px; }
.quote { margin: 0; max-width: 40em; }
.quote blockquote { margin: 0 0 18px; font-family: var(--font-display); font-size: clamp(1.3rem, 2.3vw, 1.7rem); line-height: 1.45; position: relative; }
.quote blockquote p { margin: 0; }
.quote blockquote::before { content: "\201C"; position: absolute; left: -.55em; top: -.05em; color: var(--accent-ink); }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.quote strong { color: var(--ink); font-weight: 500; }
.q-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; filter: grayscale(.3); }

/* articles */
.post { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.post:first-child { padding-top: 0; }
.post time { color: var(--muted); font-size: .88rem; padding-top: .3em; font-variant-numeric: tabular-nums; }
.post h3 { font-size: 1.4rem; }
.post h3 a { text-decoration: none; }
.post h3 a:hover { text-decoration: underline; }
.post p { color: var(--muted); margin: 0; }
.more { margin: 28px 0 0; }

/* contact */
.big-email { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 3.4rem); letter-spacing: -.02em; line-height: 1.15; margin-bottom: 1.1em; overflow-wrap: anywhere; }
.big-email a { text-decoration: none; background: linear-gradient(var(--accent-ink), var(--accent-ink)) 0 100% / 100% 1px no-repeat; }
.contact-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
.form { display: grid; gap: 20px; max-width: 560px; position: relative; }
.form label { display: grid; gap: 6px; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.form input, .form textarea {
  font: inherit; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 0;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus-visible, .form textarea:focus-visible { outline: none; border-bottom-color: var(--accent-ink); box-shadow: 0 1px 0 var(--accent-ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hp { position: absolute; left: -9999px; }
.btn {
  justify-self: start; font: inherit; font-weight: 500; font-size: .95rem; cursor: pointer;
  color: var(--bg); background: var(--ink); border: 1px solid var(--ink); padding: 12px 26px; border-radius: 0;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.notice { padding: 12px 16px; border-left: 2px solid var(--accent-ink); background: var(--accent-wash); font-size: .95rem; margin: 0; }
.notice.err { border-left-color: #a33a2c; }

/* ---------------------------------------------------------------- detail pages */
.detail { padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 8vw, 112px); }
.detail h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); letter-spacing: -.025em; }
.back { font-size: .88rem; margin-bottom: 3em; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--ink); }
.lead { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.45rem); color: var(--muted); line-height: 1.5; margin-bottom: 1.4em; }
.detail-img { margin: 2.4em 0 3em; }
.detail .prose { font-size: 1.06rem; }
.detail .posts { margin-top: 2.4em; }
@media (min-width: 1000px) { .detail-img { margin-left: -80px; margin-right: -80px; } }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: .84rem; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.foot p { margin: 0; }
.foot a { text-decoration: none; }

/* ---------------------------------------------------------------- motion */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.hero-copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(n+4) { animation-delay: .22s; }
.hero-photo { animation: fade 1.2s .2s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 1.05rem; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .bar-actions { margin-left: auto; }
  .sec-grid { grid-template-columns: 1fr; gap: 20px; }
  .sec-grid::before { margin-bottom: 0; }
  .sec-head { position: static; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .portrait { max-width: 200px; margin: 0 0 8px; }
  .portrait::before { inset: 10px -10px -10px 10px; }
  .services { grid-template-columns: 1fr; }
  .services li:nth-child(2) { border-top: 1px solid var(--line); padding-top: 22px; }
  .venture { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
  .venture-logo { width: 44px; height: 44px; }
  .venture-meta { grid-column: 2; text-align: left; justify-items: start; padding: 0; }
  .timeline li, .edu li, .post { grid-template-columns: 1fr; gap: 4px; }
  .project { grid-template-columns: 1fr; gap: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
}
