/* ==========================================================================
   Kevin Najafi — Principal · Entrepreneur · Author
   Standalone stylesheet (no framework, no build step)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0c0c0c;
  --text: #e8e7e4;
  --muted: #a09e98;
  --line: #343331;
  --line-soft: #252525;
  --gold: #d1ac57;
  --app-font-sans: 'DM Sans', sans-serif;
  --app-font-serif: 'Playfair Display', serif;
  --app-font-mono: 'DM Mono', monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--app-font-sans); font-size: 16px; line-height: inherit; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
ol, ul, menu { list-style: none; }
img, svg, video { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; letter-spacing: inherit; color: inherit; background-color: transparent; border-radius: 0; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { color: #101010; background: #dad7d0; }
:focus-visible { outline: 1px solid #ddd9d0; outline-offset: 4px; }

/* ---------- Layout shell ---------- */
.page-shell { width: min(100% - 88px, 1440px); margin: auto; }

.skip-link { position: absolute; left: 12px; top: -50px; z-index: 80; background: #eee; color: #111; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

/* ---------- Header / nav ---------- */
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); position: relative; z-index: 20; }
.wordmark { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 700; letter-spacing: -.035em; }
.wordmark-mark { width: 22px; height: 22px; border: 1px solid #8c8b87; display: grid; place-items: center; font: 10px var(--app-font-mono); color: #d8d5ce; }
.nav-links { display: flex; gap: clamp(20px, 3.2vw, 52px); align-items: center; }
.nav-links a { text-transform: uppercase; font: 10px var(--app-font-mono); letter-spacing: .12em; color: #a7a6a1; transition: color .25s ease; }
.nav-links a:hover, .nav-links a.active { color: #f0eee9; }
.menu-toggle { display: none; border: 0; background: none; padding: 8px; }

/* ---------- Shared type ---------- */
.eyebrow { font: 10px var(--app-font-mono); text-transform: uppercase; letter-spacing: .16em; color: #999893; display: flex; align-items: center; gap: 11px; }
.eyebrow::before { content: ''; width: 24px; height: 1px; background: #aaa79f; }

/* ---------- Hero ---------- */
.hero { min-height: min(765px, calc(100svh - 78px)); position: relative; display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 55% 48%, #222 0%, #111 38%, #0c0c0c 72%); }
.hero-copy { grid-column: 1; z-index: 3; padding: 0 0 26px 2.5vw; align-self: center; }
.hero h1 { margin: 25px 0 7px; font-size: clamp(58px, 8.4vw, 124px); line-height: .86; letter-spacing: -.08em; font-weight: 500; white-space: normal; max-width: 620px; }
.hero h1 em { font: italic 500 1em var(--app-font-serif); letter-spacing: -.075em; }
.hero-tagline { margin: 26px 0 0; color: #d2cfc8; font: italic clamp(22px, 2.5vw, 32px)/1.3 var(--app-font-serif); }
.hero-link { display: inline-flex; align-items: center; gap: 19px; margin-top: 47px; padding: 13px 17px; border: 1px solid #777670; font: 10px var(--app-font-mono); text-transform: uppercase; letter-spacing: .12em; transition: background .25s, color .25s; }
.hero-link:hover { background: var(--text); color: #101010; }

.portrait-frame { grid-column: 2; grid-row: 1; width: 112%; height: 94%; max-height: 710px; margin-left: -5%; position: relative; align-self: end; overflow: hidden; }
.portrait-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 54% 0%; filter: grayscale(1) contrast(1.04); opacity: .98; transform: scale(1); }

.hero-bottom { position: absolute; left: 0; right: 0; bottom: 0; min-height: 68px; padding: 15px 2.5vw; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: end; z-index: 4; }
.hero-bottom p { margin: 0; color: #b8b5ae; font: italic 14px/1.5 var(--app-font-serif); }
.hero-bottom a { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #55534d; transition: background .2s, color .2s; }
.hero-bottom a:hover { background: var(--text); color: #101010; }
.hero-bottom svg { width: 14px; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; border-bottom: 1px solid var(--line-soft); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 57px; }
.section-kicker { margin-bottom: 16px; }
.section h2 { margin: 0; font-size: clamp(43px, 7vw, 84px); font-weight: 500; letter-spacing: -.075em; line-height: .95; }
.section h2 em { font: italic 500 1em var(--app-font-serif); letter-spacing: -.065em; }
.section-aside { max-width: 240px; color: #898781; font-size: 14px; line-height: 1.7; }

.section-cta { width: fit-content; display: inline-flex; align-items: center; gap: 17px; margin-top: 26px; padding: 12px 15px; border: 1px solid #777670; color: var(--text); font: 10px var(--app-font-mono); letter-spacing: .1em; text-transform: uppercase; transition: background .2s, color .2s; }
.section-cta:hover { background: var(--text); color: #101010; }
.section-cta svg { width: 13px; }

/* ---------- Focus ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.focus-card { min-height: 248px; padding: 27px 22px 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.focus-card:first-child { padding-left: 0; }
.focus-card:last-child { border-right: 0; padding-right: 0; }
.focus-rule { display: block; width: 33px; height: 1px; background: #aaa79f; }
.focus-card h3 { max-width: 230px; margin: 30px 0 13px; font: 24px/1.18 var(--app-font-serif); font-weight: 500; }
.focus-card p { max-width: 250px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ---------- About ---------- */
.about-section .section-heading { margin-bottom: 48px; }
.about-layout { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: clamp(40px, 6.5vw, 96px); align-items: start; }
.about-photo { position: relative; width: 100%; max-width: 560px; height: auto; margin: 0; aspect-ratio: 1 / 1; background: transparent; overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center top; filter: grayscale(1); opacity: .96; transform: scale(1); }
.about-copy { width: 100%; max-width: 600px; justify-self: start; }
.about-copy p { max-width: 560px; margin: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.about-copy p:last-of-type { margin-bottom: 0; }

.principles-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; padding: 0; border: 0; list-style: none; }
.principles-list li { padding: 0; border: 0; list-style: none; }
.principle-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 16px; border: 1px solid #45433e; border-radius: 999px; color: #d7d4ce; background: #10100f; font: 12px var(--app-font-mono); letter-spacing: .04em; cursor: pointer; transition: color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease; }

/* ---------- Experience ---------- */
.experience-section { padding: 86px 0; }
.experience-heading { margin-bottom: 38px; }
.experience-heading h2 { font-size: clamp(38px, 5.5vw, 72px); }
.experience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.experience-card { min-height: 165px; padding: 26px 26px 25px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.experience-card + .experience-card { padding-left: 26px; }
.experience-card:last-child { padding-right: 0; border-right: 0; }
.experience-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--text); font: clamp(30px, 4vw, 53px)/1.05 var(--app-font-serif); letter-spacing: -.055em; }
.experience-value small { color: var(--muted); font: 10px var(--app-font-mono); letter-spacing: .12em; text-transform: uppercase; }
.experience-card:nth-child(2) .experience-value { font-size: clamp(24px, 3.3vw, 44px); }
.experience-detail { max-width: 270px; margin: 24px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ---------- Ventures ---------- */
.venture-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.venture-card { position: relative; min-height: 250px; padding: 27px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: end; overflow: hidden; }
.venture-card:first-child { padding-left: 0; }
.venture-card:last-child { border-right: 0; padding-right: 0; }
.venture-card::before { content: ''; position: absolute; z-index: 1; top: 28px; left: 22px; width: 25px; height: 1px; background: #aaa79f; transition: width .3s ease; }
.venture-card:first-child::before { left: 0; }
.venture-card:hover::before { width: 44px; }
.venture-card h3 { margin: 0 0 9px; font: clamp(19px, 2vw, 27px)/1.2 var(--app-font-serif); font-weight: 500; }
.venture-card p { margin: 0; color: var(--muted); font: 10px var(--app-font-mono); letter-spacing: .07em; text-transform: uppercase; }
.venture-tagline { margin-top: 0; }
.venture-card .venture-description { max-width: 340px; margin: 13px 0 0; color: var(--muted); font: 14px/1.7 var(--app-font-sans); letter-spacing: 0; text-transform: none; }
.venture-card svg { position: absolute; right: 22px; bottom: 27px; width: 14px; color: #807e77; transition: transform .25s; }
.venture-card:hover svg { transform: translate(3px, -3px); color: var(--text); }

/* ---------- Books ---------- */
.books-section { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(38px, 8vw, 110px); align-items: center; }
.books-intro h2 { margin: 29px 0 22px; font: clamp(36px, 5vw, 64px)/1.05 var(--app-font-serif); font-weight: 500; letter-spacing: -.045em; }
.books-intro h2 em { font-style: italic; }
.books-kicker { margin-top: 26px; color: #ddd9d0; }
.books-intro > p { color: var(--muted); font: 16px/1.8 var(--app-font-sans); }
.book-display { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: stretch; }
.book-cover { width: 100%; aspect-ratio: 2 / 3; min-height: 0; padding: 0; display: block; border: 0; background: transparent; box-shadow: none; }
.book-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---------- Quote ---------- */
.quote-band { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.quote-band blockquote { margin: 0; color: #dedbd4; font: italic clamp(27px, 4vw, 49px)/1.3 var(--app-font-serif); }
.quote-band cite { margin-top: 24px; color: #97958f; font: 9px var(--app-font-mono); letter-spacing: .16em; text-transform: uppercase; font-style: normal; }

/* ---------- Insight ---------- */
.insight-section .section-heading { align-items: center; }
.insight-copy { margin-left: 39%; padding: 28px 0 0; border-top: 1px solid var(--line); color: #c5c2bb; font: clamp(17px, 2vw, 23px)/1.65 var(--app-font-serif); }
.insight-copy p { margin: 0 0 14px; }

/* ---------- Connect ---------- */
.connect-section .section-heading { display: block; margin-bottom: 36px; }
.connect-content { max-width: 1120px; }
.connect-intro { max-width: 500px; margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.connect-label { margin: 0 0 16px; color: #999893; font: 10px var(--app-font-mono); letter-spacing: .16em; text-transform: uppercase; }
.connect-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.connect-topics li { min-height: 63px; padding: 18px 20px 17px 0; border-bottom: 1px solid var(--line); color: #b8b5ae; font-size: 15px; line-height: 1.6; }
.connect-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; }
.connect-footer > p { margin: 0; color: #c5c2bb; font: italic 17px/1.6 var(--app-font-serif); }
.connect-cta { margin-top: 0; cursor: default; }

/* ---------- Footer ---------- */
.footer { min-height: 92px; border-top: 1px solid #282826; padding: 23px 0 30px; display: flex; align-items: center; justify-content: space-between; color: #77756f; font: 9px var(--app-font-mono); text-transform: uppercase; letter-spacing: .11em; }
.footer-name { color: #d7d4ce; font-size: 12px; letter-spacing: .04em; }
.footer nav { display: flex; flex-wrap: wrap; gap: clamp(14px, 2.8vw, 40px); }
.footer nav a { color: #999791; font: 9px var(--app-font-mono); letter-spacing: .1em; text-transform: uppercase; }
.footer nav a:hover { color: #f0eee9; }

/* ---------- Interactive cells: portraits, cards, covers, chips ---------- */
.portrait-trigger { display: block; width: 100%; height: 100%; padding: 0; border: 1px solid transparent; background: transparent; text-align: left; cursor: zoom-in; }
.portrait-trigger img { transition: transform .45s ease, filter .45s ease; }
.portrait-frame .portrait-trigger:hover img { transform: scale(1.27); filter: grayscale(1) contrast(1.1) brightness(1.04); }
.about-photo .portrait-trigger:hover img { transform: scale(1.01); filter: grayscale(1) contrast(1.1) brightness(1.04); }

.focus-card, .venture-card, .book-cover {
  appearance: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.focus-card, .venture-card { border-top: 0; border-bottom: 0; border-left: 0; background: transparent; }

/* Gold sweep highlight */
.gold-interactive { position: relative; isolation: isolate; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.gold-interactive::after {
  content: ''; position: absolute; z-index: 0; top: -20%; bottom: -20%; left: -65%; width: 38%;
  background: linear-gradient(105deg, transparent 0%, #d7ad4b18 26%, #f7dc8d99 49%, #fff0b522 62%, transparent 100%);
  transform: translateX(-180%) skewX(-22deg); opacity: 0; pointer-events: none;
}
.gold-interactive > * { position: relative; z-index: 1; }
.gold-interactive:hover::after,
.gold-interactive:focus-visible::after { opacity: 1; transform: translateX(440%) skewX(-22deg); transition: transform .82s cubic-bezier(.2,.7,.2,1), opacity .16s ease; }
.gold-interactive:hover,
.gold-interactive:focus-visible,
.gold-interactive[aria-pressed="true"] { border-color: var(--gold); color: #f3dfa4; box-shadow: inset 0 0 0 1px #d1ac5740, 0 0 25px #d1ac5727; }
.gold-interactive:focus-visible { outline-color: #e0bd68; outline-offset: 3px; }
.gold-interactive:active { transform: translateY(1px); }
.venture-card:hover::before,
.venture-card[aria-pressed="true"]::before { background: #e5c36c; }

/* ---------- Lightbox ---------- */
.image-lightbox { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: #000e; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); animation: fade .2s ease both; }
.image-lightbox-panel { position: relative; display: grid; place-items: center; max-width: min(94vw, 960px); max-height: 94svh; padding: 8px; border: 1px solid #806a37; background: var(--bg); box-shadow: 0 0 55px #d1ac5720; }
.image-lightbox-panel img { display: block; max-width: min(92vw, 920px); max-height: calc(94svh - 32px); object-fit: contain; }
.image-lightbox-close { position: absolute; z-index: 2; top: 15px; right: 15px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #71633f; color: #f2ead3; background: #0c0c0ce8; cursor: pointer; }
.image-lightbox-close svg { width: 18px; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Tablet (≤ 800px)
   ========================================================================== */
@media (max-width: 800px) {
  .page-shell { width: min(100% - 42px, 680px); }
  .topbar { height: 68px; }
  .menu-toggle { display: grid; place-items: center; cursor: pointer; }
  .menu-toggle svg { width: 19px; }
  .nav-links { position: absolute; top: 67px; left: -21px; right: -21px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 21px 18px; background: #101010; border-bottom: 1px solid #30302d; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 15px 0; border-bottom: 1px solid #242422; font-size: 10px; }

  .hero { min-height: 750px; grid-template-columns: .9fr 1.1fr; align-items: start; }
  .portrait-frame { grid-column: 1 / -1; grid-row: 1; width: 125%; height: 88%; margin-left: -12%; justify-self: center; align-self: start; margin-top: 18px; }
  .hero-copy { grid-column: 1 / -1; grid-row: 1; align-self: end; padding: 0 0 105px 0; }
  .hero h1 { font-size: clamp(57px, 10vw, 88px); }
  .hero-link { margin-top: 25px; }
  .hero-bottom { padding: 14px 0; }

  .section { padding: 85px 0; }
  .section-heading { align-items: start; flex-direction: column; margin-bottom: 38px; }
  .section-aside { max-width: 340px; }

  .focus-grid, .venture-grid { grid-template-columns: 1fr 1fr; }
  .focus-card:nth-child(2), .venture-card:nth-child(2) { border-right: 0; padding-right: 0; }
  .focus-card:nth-child(3), .venture-card:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .focus-card:nth-child(4), .venture-card:nth-child(4) { border-top: 1px solid var(--line); }
  .venture-card:nth-child(3)::before { left: 0; }

  .about-layout { grid-template-columns: 1fr; gap: 38px; }
  .about-photo, .about-copy { justify-self: center; }

  .experience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience-card:nth-child(2) { padding-right: 0; border-right: 0; }
  .experience-card:nth-child(3) { grid-column: 1 / -1; min-height: 110px; padding: 24px 0; border-top: 1px solid var(--line); border-right: 0; flex-direction: row; align-items: center; gap: 24px; }
  .experience-card:nth-child(3) .experience-detail { margin: 0; }

  .books-section { grid-template-columns: 1fr; gap: 45px; }
  .book-display { max-width: 620px; }
  .insight-copy { margin-left: 0; }
  .connect-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Mobile (≤ 540px)
   ========================================================================== */
@media (max-width: 540px) {
  .page-shell { width: calc(100% - 36px); }

  .hero { min-height: 720px; display: block; }
  .hero::before { background: radial-gradient(ellipse at 68% 35%, #1a1a1a 0%, #101010 48%, #0c0c0c 78%); }
  .hero-copy { position: absolute; z-index: 3; left: 0; right: 0; bottom: 78px; padding: 0 0 15px; }
  .hero .eyebrow { max-width: none; font-size: 10px; letter-spacing: .12em; white-space: nowrap; }
  .hero h1 { margin-top: 19px; font-size: clamp(55px, 14vw, 76px); }
  .hero-tagline { margin-top: 16px; font-size: 22px; }
  .hero-link { margin-top: 24px; }
  .portrait-frame { position: absolute; top: 0; right: 0; width: 100%; height: 70%; margin: 0; }
  .portrait-frame img { object-position: 85% 0%; transform: scale(1); }
  .hero-bottom { z-index: 4; min-height: 58px; }
  .hero-bottom p { max-width: 80%; font-size: 14px; }
  .hero-bottom a { width: 27px; height: 27px; }

  .section { padding: 80px 0; }
  .section-heading { margin-bottom: 34px; }
  .section h2 { font-size: clamp(42px, 12vw, 62px); }

  .focus-grid, .venture-grid { grid-template-columns: 1fr; }
  .focus-card, .focus-card:first-child, .focus-card:last-child,
  .venture-card, .venture-card:first-child, .venture-card:last-child { min-height: 174px; padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .focus-card:first-child, .venture-card:first-child { border-top: 0; }
  .focus-card h3 { margin-top: 22px; }
  .focus-card:nth-child(3), .venture-card:nth-child(3) { border-top: 0; }
  .focus-card:nth-child(4) { border-top: 0; }
  .focus-card:last-child, .venture-card:last-child { border-bottom: 0; }
  .venture-card { min-height: 220px; }
  .venture-card::before, .venture-card:first-child::before { top: 22px; left: 0; }
  .venture-card svg, .venture-card:first-child svg { right: 0; left: auto; bottom: 24px; }

  .about-layout { gap: 30px; }

  .experience-section { padding: 66px 0; }
  .experience-heading { margin-bottom: 28px; }
  .experience-grid { grid-template-columns: 1fr; }
  .experience-card,
  .experience-card + .experience-card,
  .experience-card:nth-child(2),
  .experience-card:nth-child(3) { grid-column: auto; min-height: 116px; padding: 20px 0; border-top: 0; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; gap: 18px; }
  .experience-card:last-child { border-bottom: 0; }
  .experience-value { min-width: 0; font-size: clamp(28px, 8vw, 38px); }
  .experience-card:nth-child(2) .experience-value { font-size: clamp(25px, 7.2vw, 34px); }
  .experience-detail { margin: 0; }

  .book-display { gap: 10px; }
  .quote-band { min-height: 280px; }
  .insight-section .section-heading { align-items: start; flex-direction: column; }
  .insight-copy { padding-top: 20px; font-size: 17px; }

  .connect-topics { grid-template-columns: 1fr; }
  .connect-topics li { min-height: 53px; padding: 14px 0; }
  .connect-footer { align-items: flex-start; flex-direction: column; gap: 17px; }

  .footer { align-items: flex-start; flex-direction: column; padding: 24px 0; gap: 22px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
