/* home.css: hero, tiles band, projects, experience, about, contact */

/* hero */
.hero { position: relative; background: var(--bg); overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; gap: 8px;
  min-height: 100svh; padding-top: 72px; padding-bottom: 56px;
}
.hero-stage { position: relative; order: -1; display: grid; grid-template-rows: 1fr auto; }
.hero-cv-wrap { position: relative; height: 44svh; min-height: 280px; }
.hero-cv, .hero-fb { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-cv { opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-cv.is-live { opacity: 1; }
.hero-fb { transition: opacity 1s var(--ease); }
.hero-fb.is-gone { opacity: 0; }

.hero-text { align-self: center; max-width: 620px; }
.hero-name { font-size: clamp(48px, 13vw, 112px); letter-spacing: -.04em; line-height: .95; margin-bottom: 20px; }
.hero-line {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .02em; color: var(--ink-2);
  margin-bottom: 24px;
}
.hero-line .dot { color: var(--accent); }
.hero-intro { color: var(--ink); opacity: .86; font-size: 18px; max-width: 54ch; margin-bottom: 32px; }

/* hero caption + step indicators */
.hero-cap { display: grid; gap: 14px; justify-items: center; padding-top: 8px; }
.hero-steps { display: grid; text-align: center; }
.hero-steps li { grid-area: 1 / 1; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .hero-steps li { opacity: 0; transform: translateY(6px); visibility: hidden; }
.js .hero-steps li.is-on { opacity: 1; transform: none; visibility: visible; }
.hero-steps a { display: inline-flex; gap: 10px; align-items: baseline; padding: 4px 8px; }
.hc-kind {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.hc-title { font-family: var(--f-head); font-size: 16px; color: var(--ink); }
.hero-steps a:hover .hc-title { text-decoration: underline; text-underline-offset: 4px; }
.hero-steps a .arr { color: var(--ink-2); font-size: 14px; }

.hero-ind { display: flex; align-items: center; gap: 8px; }
.hero-ind button.hi-step {
  position: relative; width: 34px; height: 18px; padding: 0;
}
.hero-ind button.hi-step::before,
.hero-ind button.hi-step span {
  content: ""; position: absolute; left: 0; top: 8px; height: 2px; border-radius: 2px;
}
.hero-ind button.hi-step::before { right: 0; background: var(--rule-2); }
.hero-ind button.hi-step span { width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.hero-ind button.hi-step.is-done span { transform: scaleX(1); opacity: .45; }
.hero-ind .hi-pause {
  margin-left: 6px; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--rule-2); display: grid; place-items: center; color: var(--ink-2);
}
.hero-ind .hi-pause:hover { color: var(--ink); border-color: var(--ink); }
.hero-ind .hi-pause svg { width: 10px; height: 10px; }

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 24px; padding-top: 96px; }
  .hero-stage { order: 0; }
  .hero-cv-wrap { height: min(70svh, 640px); }
}

/* tiles band */
.tl { padding: 24px 0 96px; }
.tl-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .tl-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .tl-grid { grid-template-columns: repeat(4, 1fr); } }
.tl-tile {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 18px 22px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--rule);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.tl-tile:hover, .tl-tile:focus-visible { border-color: var(--rule-2); transform: translateY(-3px); }
.tl-cv { width: 100%; height: 132px; border-radius: 12px; background: var(--bg); }
.tl-kind {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.tl-txt { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.tl-txt strong { color: var(--ink); font-weight: 500; }

/* projects */
.pj-grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .pj-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.pj-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  padding: 28px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--rule);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.pj-card:hover, .pj-card:focus-within {
  transform: translateY(-4px); border-color: var(--rule-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.pj-top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); }
.pj-status { color: var(--accent); display: inline-flex; gap: 8px; align-items: center; }
.pj-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pj-title { font-size: clamp(28px, 3.4vw, 40px); }
.pj-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pj-link:focus-visible { outline: none; }
.pj-card:has(.pj-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.pj-sum { color: var(--ink-2); max-width: 56ch; }
.pj-foot {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: auto; padding-top: 8px;
  font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2);
}
.pj-more { color: var(--ink); }
.pj-card:hover .pj-more { color: var(--accent); }
.pj-ext { position: relative; z-index: 1; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.pj-ext:hover { color: var(--ink); text-decoration-color: var(--accent); }
.pj-note { color: var(--ink-3); }

.pj-sm { padding: 22px 28px; }
@media (min-width: 768px) {
  .pj-sm { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 32px; }
  .pj-sm .pj-title { font-size: 28px; min-width: 120px; }
  .pj-sm .pj-sum { flex: 1; }
  .pj-sm .pj-foot { margin: 0; padding: 0; }
}

/* experience */
.xp { position: relative; display: grid; gap: 0; max-width: 860px; }
.xp::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--rule-2); }
.xp-item { position: relative; padding: 0 0 48px 40px; }
.xp-item:last-child { padding-bottom: 0; }
.xp-item::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.xp-date { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; display: block; }
.xp-role { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 4px; }
.xp-co { color: var(--accent); font-family: var(--f-head); font-size: 17px; margin-bottom: 10px; }
.xp-desc { color: var(--ink-2); max-width: 62ch; }
@media (min-width: 768px) {
  .xp-item { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding-left: 48px; }
  .xp-date { padding-top: 8px; }
}

/* about */
.ab-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .ab-grid { grid-template-columns: 1.4fr 1fr; gap: 80px; align-items: start; } }
.ab-body p { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; color: var(--ink); opacity: .9; max-width: 60ch; }
.ab-body p + p { margin-top: 22px; }
.ab-side { display: grid; gap: 32px; }
.ab-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--rule);
  display: grid; place-items: center; max-width: 360px;
}
.ab-photo img { width: 100%; height: 100%; object-fit: cover; }
.ab-photo-ph { font-family: var(--f-head); font-weight: 600; font-size: 96px; letter-spacing: -.05em; color: var(--rule-2); }
.ab-else h3 {
  font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 12px;
}
.ab-else li { border-top: 1px solid var(--rule); }
.ab-else li:last-child { border-bottom: 1px solid var(--rule); }
.ab-else a { display: flex; justify-content: space-between; padding: 12px 0; font-family: var(--f-head); }
.ab-else a span:last-child { color: var(--ink-2); font-family: var(--f-mono); font-size: 13px; }
.ab-else a:hover span:first-child { color: var(--accent); }

/* contact */
.ct-line { font-size: clamp(20px, 2vw, 24px); color: var(--ink-2); max-width: 40ch; margin-bottom: 40px; }
.ct-mail {
  display: inline-block; font-family: var(--f-head); font-size: clamp(30px, 6.4vw, 76px); letter-spacing: -.03em; line-height: 1.1;
  border-bottom: 2px solid var(--rule-2); padding-bottom: 6px; margin-bottom: 48px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
  overflow-wrap: anywhere;
}
.ct-mail:hover { border-color: var(--accent); color: var(--accent); }
.ct-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* stats row (tiles band) */
.st-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 12px; border-radius: var(--radius); overflow: hidden; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 900px) { .st-row { grid-template-columns: repeat(4, 1fr); } }
.st { background: var(--bg); padding: 22px 20px; display: grid; gap: 6px; align-content: start; }
.st-num { font-family: var(--f-head); font-weight: 500; font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.st-num em { font-style: normal; color: var(--accent); }
.st-lbl { color: var(--ink-2); font-size: 14.5px; line-height: 1.45; max-width: 26ch; }

/* spotlight that follows the pointer */
.pj-card, .tl-tile, .tk-group { --mx: 50%; --my: 50%; }
.pj-card::before, .tl-tile::before, .tk-group::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(245, 165, 36, .09), transparent 60%);
  transition: opacity .35s var(--ease);
}
.pj-card:hover::before, .tl-tile:hover::before, .tk-group:hover::before { opacity: 1; }
.tl-tile, .tk-group { position: relative; }

/* experience: line that fills, dots that light, pinned figure */
.xp::after {
  content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--accent);
  transform-origin: top; transform: scaleY(var(--p, 0));
}
@media (prefers-reduced-motion: reduce) { .xp::after { transform: none; } }
.xp-item::before { transition: background .4s var(--ease), box-shadow .4s var(--ease); }
.xp-item.is-past::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.xp-wrap { display: grid; gap: 48px; }
.xp-fig { display: none; }
@media (min-width: 1100px) {
  .xp-wrap { grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
  .xp-fig {
    display: block; position: sticky; top: 18vh;
    border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--rule); padding: 14px;
  }
  .xp-fig canvas { width: 100%; height: 340px; }
  .xp-fig-cap { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); padding: 6px 6px 2px; min-height: 1.6em; }
  .xp-fig-cap::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
}
.xp-also { margin-top: 48px; max-width: 760px; color: var(--ink-2); font-size: 15.5px; padding-left: 40px; }

/* toolkit */
.tk-grid { display: grid; gap: 12px; }
@media (min-width: 768px) { .tk-grid { grid-template-columns: 1fr 1fr; } }
.tk-group { padding: 22px 24px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--rule); }
.tk-group h3, .aw h3 {
  font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 14px;
}
.tk-list { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.tk-chip {
  font-family: var(--f-head); font-size: 15px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--rule-2); color: var(--ink);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.tk-chip:hover, .tk-chip.is-on { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.tk-chip[aria-pressed="true"] { background: var(--accent-soft); }
.tk-used {
  margin: 20px 0 64px; min-height: 1.7em; font-family: var(--f-mono); font-size: 13px; color: var(--ink-2);
}
.tk-used strong { color: var(--accent); font-weight: 500; }
.aw-list { display: grid; gap: 0; }
@media (min-width: 768px) { .aw-list { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.aw-list li { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--rule); }
.aw-what { font-family: var(--f-head); font-size: 18px; }
.aw-meta { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); }

/* headshot */
.ab-photo { transition: transform .5s var(--ease); }
.ab-photo img { transition: transform .8s var(--ease), filter .8s var(--ease); filter: grayscale(.25); }
.ab-photo:hover img { transform: scale(1.04); filter: none; }
@media (min-width: 768px) { .xp-also { padding-left: 48px; } }
