/* ==========================================================================
   JekApps — about page
   Plain CSS, no build step. Light and dark themes follow the OS setting.
   ========================================================================== */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --text: #1b1c1e;
  --muted: #5d6066;
  --faint: #8a8d93;
  --border: #e3e0d9;
  --accent: #2f5bd3;
  --accent-ink: #ffffff;
  --focus: #2f5bd3;

  --tyc: #11845b;    /* TrackYourCash green */
  --poker: #c2362f;  /* 1Poker red */
  --arb: #6a4fd6;    /* trading system violet */

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(20 20 20 / 0.04), 0 4px 18px rgb(20 20 20 / 0.05);
  --wrap: 1080px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #18191c;
    --surface-2: #202227;
    --text: #ececec;
    --muted: #a4a7ad;
    --faint: #7c8087;
    --border: #2b2d33;
    --accent: #7b9cff;
    --accent-ink: #0d1020;
    --focus: #9fb6ff;

    --tyc: #3ccf95;
    --poker: #ff6b62;
    --arb: #a491ff;

    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 24px rgb(0 0 0 / 0.25);
  }
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

[id] { scroll-margin-top: 80px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.muted { color: var(--muted); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--text); color: var(--bg);
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}

.nav-list { display: flex; list-style: none; gap: 4px; }
.nav-list a {
  display: block; padding: 6px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
}
.nav-list a:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 520px) {
  .nav-hide-sm { display: none; }
  .nav-list a { padding: 6px 9px; }
  .brand-name { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 550; text-decoration: none;
  cursor: pointer; transition: border-color .15s, background-color .15s, transform .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--border)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn[hidden] { display: none; }

/* ---------- Hero ---------- */

.hero { padding: 96px 0 72px; }
@media (max-width: 600px) { .hero { padding: 56px 0 48px; } }

.eyebrow {
  margin: 0 0 12px; color: var(--faint);
  font-size: 13px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.lede { max-width: 40rem; font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); margin-bottom: 32px; }
.lede strong { color: var(--text); font-weight: 650; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Sections ---------- */

.section { padding: 72px 0; border-top: 1px solid var(--border); }
@media (max-width: 600px) { .section { padding: 52px 0; } }

.section-head { margin-bottom: 36px; }
.section-head h2,
.contact h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.015em; }
.section-sub { color: var(--muted); margin: 10px 0 0; max-width: 40rem; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Projects ---------- */

.projects { display: grid; gap: 20px; }

.project {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 44px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 34px 30px; box-shadow: var(--shadow); overflow: hidden;
}
.project::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--project);
}
.project-main { display: flex; flex-direction: column; }
.project-details { padding-top: 46px; }
@media (max-width: 860px) {
  .project { grid-template-columns: minmax(0, 1fr); padding: 26px 24px 24px; }
  .project-details { padding-top: 4px; }
  .project::before { inset: 0 0 auto 0; width: auto; height: 4px; }
  .project-actions { order: 10; }   /* CTA moves below features/chips on small screens */
  .project-main { display: contents; }
  .project-details { display: contents; }
}
@media (max-width: 600px) { .project { padding: 22px 18px 20px; } }

.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 650; color: var(--project);
  background: color-mix(in srgb, var(--project) 11%, transparent);
  padding: 4px 10px; border-radius: 999px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.project-meta { font-size: 13px; color: var(--faint); }

.project h3 { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.project-tagline { color: var(--project); font-weight: 600; font-size: 16px; margin-bottom: 14px; }
.project-desc { font-size: 16px; color: var(--muted); margin-bottom: 22px; }

.features { list-style: none; margin: 4px 0 20px; display: grid; gap: 8px; }
.features li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.features li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--project); opacity: .85;
}

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.chips li {
  font-size: 12.5px; font-weight: 550; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 6px;
}
.chips-sm { margin-bottom: 18px; }

.project-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.project .chips { margin-bottom: 0; }
@media (max-width: 860px) { .project .chips { margin-bottom: 20px; } }
.project-actions .btn-primary { background: var(--project); border-color: var(--project); color: #fff; }
.project-actions .btn-primary:hover { background: color-mix(in srgb, var(--project) 86%, #000); }
@media (prefers-color-scheme: dark) {
  .project-actions .btn-primary { color: #0e0f11; }
  .project-actions .btn-primary:hover { background: color-mix(in srgb, var(--project) 86%, #fff); }
}
.project-note { margin-bottom: 0; font-size: 14px; color: var(--faint); font-style: italic; }
@media (max-width: 860px) { .project-note { order: 10; } }

/* ---------- Résumé ---------- */

.summary { max-width: 46rem; color: var(--muted); font-size: 1.05rem; margin-bottom: 40px; }

.timeline { list-style: none; display: grid; gap: 20px; margin-bottom: 48px; }

.job {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow);
}
@media (max-width: 600px) { .job { padding: 20px 18px; } }

.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; margin-bottom: 12px; }
.job h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.job h3 .role { display: inline-block; font-weight: 500; color: var(--muted); margin-left: 6px; }
.job h4 { font-size: 1.02rem; font-weight: 650; }
.job h4 a { color: inherit; }
.when { margin: 0; font-size: 14px; color: var(--faint); font-variant-numeric: tabular-nums; }

.bullets { padding-left: 1.15rem; display: grid; gap: 6px; }
.bullets li { font-size: 15.5px; padding-left: 2px; }
.bullets li::marker { color: var(--faint); }

.subrole { margin-top: 22px; padding: 18px 0 0 18px; border-top: 1px dashed var(--border); border-left: 2px solid var(--border); }
@media (max-width: 600px) { .subrole { padding-left: 14px; } }
.subrole .job-head { margin-bottom: 8px; }

.resume-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; }
@media (max-width: 860px) { .resume-grid { grid-template-columns: minmax(0, 1fr); } }

.resume-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px 10px; box-shadow: var(--shadow);
}
@media (max-width: 600px) { .resume-block { padding: 20px 18px 6px; } }
.block-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 16px; }
.school { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.resume-block > p { margin-bottom: 2px; }
.block-subtitle {
  margin: 22px 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint);
}
.resume-block .block-subtitle:first-of-type { margin-top: 0; } /* first h3 in Skills */
.plain-list { list-style: none; display: grid; gap: 4px; margin-bottom: 18px; font-size: 15.5px; }

/* ---------- Contact & footer ---------- */

.contact { text-align: center; }
.contact .section-sub { margin: 10px auto 24px; }
.contact-email { font-size: clamp(1.15rem, 3.4vw, 1.6rem); font-weight: 600; margin-bottom: 18px; word-break: break-word; }
.contact-email a { color: var(--text); }
.contact-links { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; }
.contact-links a { color: var(--muted); font-weight: 500; }
.contact-links a:hover { color: var(--text); }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0 36px; color: var(--faint); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }

.print-header { display: none; }

/* ---------- Print: a clean one-document résumé ---------- */

@media print {
  @page { margin: 14mm 14mm 16mm; }

  :root {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #111; --muted: #333; --faint: #555;
    --border: #ccc; --accent: #111; --shadow: none;
  }
  body { font-size: 10.5pt; line-height: 1.4; background: #fff; }

  .site-header, .hero, #projects, .contact, .site-footer, .skip-link, .js-print { display: none !important; }

  .section { padding: 0; border: 0; }
  .wrap { max-width: none; padding: 0; }
  .eyebrow { display: none; }

  .print-header { display: block; margin-bottom: 10pt; border-bottom: 1.5pt solid #111; padding-bottom: 6pt; }
  .print-name { font-family: var(--font-display); font-size: 22pt; font-weight: 700; margin: 0 0 2pt; }
  .print-contact { margin: 0; font-size: 9.5pt; color: #333; }

  .section-head { margin-bottom: 6pt; }
  .section-head h2 { font-size: 13pt; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font); }
  .summary { font-size: 10pt; margin-bottom: 10pt; max-width: none; }

  .timeline { gap: 8pt; margin-bottom: 10pt; }
  .job, .resume-block { border: 0; padding: 0; box-shadow: none; border-radius: 0; }
  .job-head { margin-bottom: 3pt; }
  .job h3 { font-size: 11pt; }
  .job h4 { font-size: 10.5pt; }
  .when { font-size: 9.5pt; }
  .bullets { gap: 1pt; }
  .bullets li { font-size: 10pt; }
  .subrole { margin-top: 6pt; padding: 0 0 0 10pt; border-top: 0; }
  .job, .subrole, .resume-block { break-inside: avoid; }

  .resume-grid { grid-template-columns: 1fr 1.4fr; gap: 16pt; }
  .block-title { font-size: 13pt; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font); margin-bottom: 6pt; }
  .block-subtitle { margin: 8pt 0 3pt; font-size: 8.5pt; }
  .plain-list { font-size: 10pt; gap: 0; margin-bottom: 6pt; }

  .chips { gap: 0; margin-bottom: 4pt; }
  .chips li { border: 0; background: none; padding: 0; font-size: 10pt; color: #222; font-weight: 400; }
  .chips li:not(:last-child)::after { content: "·"; margin: 0 0.45em; color: #777; }

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