/* ============================================================
   /portfolio/ — the static, JS-free portfolio page
   (generated markup: tools/build_portfolio.js)

   Loaded after css/tokens.css, which supplies the brand constants this file
   reuses: --font-sys, --accent, --r-*, --ease-out. Everything here is the page's
   own document styling — this is a reading page, not OS chrome, so it sets its
   own type scale rather than the macOS UI sizes in tokens.

   Theming works with NO JavaScript: the surface colours default to the visitor's
   OS colour scheme, and the [data-theme] rules below win (attribute selectors
   outrank the bare :root) when js/boot.js applies a theme chosen in DmytroOS.
   ============================================================ */

:root {
  --pf-bg: #f5f5f7;
  --pf-surface: #fff;
  --pf-text: #1d1d1f;
  --pf-dim: #6e6e73;
  --pf-line: rgba(0, 0, 0, .11);
  --pf-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05);
  --pf-max: 1000px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pf-bg: #1c1c1e;
    --pf-surface: #2c2c2e;
    --pf-text: #f5f5f7;
    --pf-dim: #98989d;
    --pf-line: rgba(255, 255, 255, .13);
    --pf-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  }
}

:root[data-theme="light"] {
  --pf-bg: #f5f5f7;
  --pf-surface: #fff;
  --pf-text: #1d1d1f;
  --pf-dim: #6e6e73;
  --pf-line: rgba(0, 0, 0, .11);
  --pf-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05);
}

:root[data-theme="dark"] {
  --pf-bg: #1c1c1e;
  --pf-surface: #2c2c2e;
  --pf-text: #f5f5f7;
  --pf-dim: #98989d;
  --pf-line: rgba(255, 255, 255, .13);
  --pf-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 20px 64px;
  background: var(--pf-bg);
  color: var(--pf-text);
  font-family: var(--font-sys);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- hero ---------- */

.pf-hero {
  max-width: var(--pf-max);
  margin: 0 auto;
  padding: 56px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--pf-line);
}

.pf-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--pf-shadow);
}

.pf-hero h1 {
  margin: 18px 0 6px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.pf-role {
  margin: 0 0 18px;
  color: var(--pf-dim);
  font-size: 15px;
}

.pf-lead {
  max-width: 700px;
  margin: 0 auto 26px;
  font-size: 17px;
}

.pf-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.pf-stats li { display: flex; flex-direction: column; line-height: 1.25; }
.pf-stats strong { font-size: 24px; letter-spacing: -.02em; }
.pf-stats span { color: var(--pf-dim); font-size: 13px; max-width: 190px; }

/* ---------- buttons ---------- */

.pf-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
}

.pf-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--pf-line);
  background: var(--pf-surface);
  color: var(--pf-text);
  font-size: 14px;
  font-weight: 600;
  transition: transform .15s var(--ease-out);
}
/* inside a section the button row reads better flush-left than centred */
.pf-cta-left { justify-content: flex-start; margin-top: 18px; }

.pf-btn:hover { text-decoration: none; transform: translateY(-1px); }
.pf-btn.is-primary { background: var(--accent); border-color: transparent; color: #fff; }

.pf-note {
  max-width: 620px;
  margin: 0 auto;
  color: var(--pf-dim);
  font-size: 13px;
}

/* ---------- sections ---------- */

.pf-section {
  max-width: var(--pf-max);
  margin: 0 auto;
  padding: 48px 0 8px;
}
.pf-section h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3.4vw, 28px);
  letter-spacing: -.02em;
}
.pf-sub { margin: 0 0 24px; color: var(--pf-dim); font-size: 14px; }

/* ---------- project cards ---------- */

.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.pf-card {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: var(--r-panel);
  background: var(--pf-surface);
  box-shadow: var(--pf-shadow);
}

.pf-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: var(--r-icon);
  object-fit: cover;
  background: var(--pf-bg);
}

.pf-body { min-width: 0; }
.pf-body h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.01em; }

.pf-badge {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pf-meta { margin: 0 0 8px; color: var(--pf-dim); font-size: 13px; }
.pf-desc { margin: 0; font-size: 14px; }
.pf-links { margin: 10px 0 0; font-size: 13px; font-weight: 600; }

/* ---------- career ---------- */

.pf-jobs { display: grid; gap: 16px; }
.pf-job {
  padding: 20px 22px;
  border-radius: var(--r-panel);
  background: var(--pf-surface);
  box-shadow: var(--pf-shadow);
}
.pf-job h3 { margin: 0 0 4px; font-size: 17px; }
.pf-job ul { margin: 10px 0 0; padding-left: 20px; font-size: 14px; }
.pf-job li { margin-bottom: 4px; }

.pf-now {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---------- lists + footer ---------- */

.pf-list { margin: 0; padding-left: 20px; font-size: 15px; }
.pf-list li { margin-bottom: 6px; }

.pf-foot {
  max-width: var(--pf-max);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--pf-line);
  color: var(--pf-dim);
  font-size: 13px;
  text-align: center;
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  body { padding: 0 16px 48px; }
  .pf-hero { padding: 36px 0 30px; }
  .pf-section { padding: 36px 0 8px; }
  .pf-grid { grid-template-columns: 1fr; }
  .pf-stats { gap: 12px 22px; }
  .pf-stats strong { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-btn { transition: none; }
  .pf-btn:hover { transform: none; }
}
