/* ------------------------------------------------------------------
   kochergin.me — iOS 26–style system: SF Pro (system font), grouped
   inset lists, capsule controls, translucent "glass" chrome.
   No webfonts and no external requests.
   ------------------------------------------------------------------ */

:root {
  --bg:        #f2f2f7;                    /* systemGroupedBackground */
  --cell:      #ffffff;                    /* secondarySystemGroupedBackground */
  --label:     #1d1d1f;
  --label-2:   rgba(60, 60, 67, .62);      /* secondaryLabel */
  --label-3:   rgba(60, 60, 67, .34);      /* tertiaryLabel */
  --sep:       rgba(60, 60, 67, .16);      /* separator */
  --fill:      rgba(118, 118, 128, .12);   /* tertiarySystemFill */
  --fill-2:    rgba(118, 118, 128, .2);
  --tint:      #0088ff;                    /* iOS 26 systemBlue */

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-group: 26px;
  --col: 680px;
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-edge: rgba(255, 255, 255, .85);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 10px 30px -12px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: clip; }
/* no rubber-band stretch past the top or bottom edge of the page */
html, body { overscroll-behavior: none; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.022em;
  color: var(--label);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  /* soft colour wash at the top, so the glass has something to refract */
  background:
    radial-gradient(520px 320px at 10% -60px, rgba(0, 136, 255, .14), transparent 70%),
    radial-gradient(520px 320px at 90% -40px, rgba(175, 82, 222, .11), transparent 70%),
    radial-gradient(640px 260px at 50% -120px, rgba(255, 149, 0, .06), transparent 72%),
    var(--bg);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: rgba(0, 136, 255, .2); }

.wrap {
  max-width: var(--col);
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* a sticky nav bar can't stick inside a flex column — inner pages use block flow */
body:has(.page-head) .wrap { display: block; }

a { color: inherit; }

section { padding: 14px 0 6px; }

/* section header above a group, like a large iOS list header */
h2.section-title {
  margin: 0 0 9px 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.026em;
  line-height: 1.2;
}

/* ---------- glass ---------- */

.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
          backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .9);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 44px 0 18px;
}

.masthead .name {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.034em;
}
.masthead .role,
.masthead .speaks {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--label-2);
  letter-spacing: -.016em;
}
.masthead .speaks { margin-top: 1px; }

.avatar {
  /* same height as the name block, so the gap below both is equal */
  width: 93px;
  height: 93px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #e5e5ea;
  box-shadow: 0 14px 32px -16px rgba(0, 0, 0, .45);
}

/* ---------- contacts: plain glyphs under the name ---------- */

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
}
.contact-strip .lang-slot { margin-left: auto; }   /* language sits opposite the icons */
.contact-strip a {
  display: block;
  padding: 2px;
  color: var(--label-2);
  text-decoration: none;
  transition: color .15s ease, transform .12s ease-out;
}
.contact-strip a:hover  { color: var(--label); }
.contact-strip a:active { transform: scale(.9); }
.contact-strip svg { width: 18px; height: 18px; fill: currentColor; display: block; }


.lang {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: var(--fill);
}
.lang .sep { display: none; }
.lang button {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -.005em;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--label);
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}
.lang button[aria-current="true"] {
  background: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .04);
}

/* ---------- tabs: a floating glass capsule ---------- */

#sections { padding: 22px 0 0; }

.buttons {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
}
.buttons { background: var(--glass-bg); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
           border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .9); }

.btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--label);
  text-decoration: none;
  transition: background .2s ease, box-shadow .2s ease, transform .12s ease-out;
}
.btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .04);
}
.btn:active { transform: scale(.96); }

/* ---------- intro: Apple product-page paragraph ---------- */

.intro {
  margin: 0;
  padding: 26px 4px 10px;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.03em;
}

/* ---------- grouped inset list ---------- */

.group {
  background: var(--cell);
  border-radius: var(--r-group);
  overflow: hidden;
}

/* a cell: title, subtitle, trailing accessory */
.line {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 14px;
  align-items: center;
  padding: 13px 20px;
  color: inherit;
  text-decoration: none;
}
.line + .line::before {               /* inset separator */
  content: "";
  position: absolute;
  left: 20px; right: 0; top: 0;
  height: 1px;
  background: var(--sep);
  transform: scaleY(.6);
}
.line-name { grid-column: 1; margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.02em; min-width: 0; }
.line-desc { grid-column: 1; margin: 1px 0 0; font-size: 15px; color: var(--label-2); letter-spacing: -.012em; }
.line-note,
.line-arrow { grid-column: 2; grid-row: 1 / span 2; }
.line-note  { margin: 0; font-size: 15px; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dim-sm { font-weight: 400; font-size: 14px; color: var(--label-3); letter-spacing: -.01em; }

/* disclosure chevron instead of an arrow glyph */
.line-arrow { font-size: 0; width: 8px; height: 8px; margin-right: 3px;
              border-right: 2px solid var(--label-3); border-top: 2px solid var(--label-3);
              border-radius: 1px; transform: rotate(45deg); transition: transform .18s ease, border-color .18s ease; }

/* no highlight plate — the separators already define the rows; only the chevron reacts */
a.line:hover .line-arrow { border-color: var(--label); transform: translateX(3px) rotate(45deg); }
a.line:active { opacity: .6; }

/* ---------- skills ---------- */

.skills { padding: 6px 0; }
.skill-block { padding: 12px 20px; position: relative; }
.skill-block + .skill-block::before {
  content: ""; position: absolute; left: 20px; right: 0; top: 0; height: 1px;
  background: var(--sep); transform: scaleY(.6);
}
.skill-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.skill-desc  { margin: 1px 0 10px; font-size: 15px; color: var(--label-2); letter-spacing: -.012em; }

.marquee {
  overflow: hidden;
  margin: 0 -20px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.marquee-set { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 8px 0 0; list-style: none; }
.badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--label);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease;
}
.badge svg { width: 15px; height: 15px; fill: currentColor; opacity: .8; flex: none; }
.badge:hover { background: var(--fill-2); }

/* ---------- footer ---------- */

footer { margin-top: auto; padding: 26px 4px 0; }
.footer-note + .footer-note { margin-top: 10px; }
.footer-note { margin: 0; font-size: 15px; color: var(--label-2); letter-spacing: -.012em; }

/* ---------- inner pages: glass nav bar + large title ---------- */

.page-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  /* full-bleed: the bar spans the whole window, content stays in the column */
  margin: 0 calc(50% - 50vw);
  padding: 12px calc(50vw - 50% + 4px);   /* +4px lines up with the large title */
  /* transparent at rest — the material only appears once content slides under it */
  background: transparent;
  transition: background-color .25s ease;
}
.page-head.is-stuck {
  background: rgba(242, 242, 247, .72);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
          backdrop-filter: blur(22px) saturate(180%);
}
/* scroll-edge effect instead of a hard divider, also only while scrolled */
.page-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(242, 242, 247, .72), rgba(242, 242, 247, 0));
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
          mask-image: linear-gradient(to bottom, #000, transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.page-head.is-stuck::after { opacity: 1; }
.page-head .lang { margin-left: auto; }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  font-weight: 400;
  color: var(--tint);
  text-decoration: none;
}
.backlink:active { opacity: .5; }
.back-chev {
  width: 11px; height: 11px;
  margin-left: 3px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  border-radius: 1.5px;
  transform: rotate(45deg);
}

.page-title { margin: 16px 0 0 4px; font-size: 36px; font-weight: 700; line-height: 1.1; letter-spacing: -.034em; }
.page-intro { margin: 6px 0 0 4px; padding-bottom: 20px; font-size: 17px; color: var(--label-2); }

/* expandable entries — each one its own rounded cell (native <details>) */

.item {
  background: var(--cell);
  border-radius: var(--r-group);
  margin-bottom: 12px;
  overflow: hidden;
}
.item > summary {
  display: block;
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
}
.item > summary::-webkit-details-marker { display: none; }
.item > summary:focus-visible { outline: 2px solid var(--tint); outline-offset: -2px; border-radius: var(--r-group); }

.item-head { display: flex; align-items: baseline; gap: 10px; }
.item-name { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.024em; }
.item-name a { text-decoration: none; }
.item-name a:hover { color: var(--tint); }
.item-name .arrow { color: var(--label-3); font-weight: 400; }
.item-date { margin-left: auto; font-size: 14px; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chev {
  flex: none;
  width: 8px; height: 8px;
  margin: 0 2px 3px 4px;
  border-right: 2px solid var(--label-3);
  border-bottom: 2px solid var(--label-3);
  border-radius: 1px;
  transform: rotate(45deg);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .15s ease;
}
.item[open] .chev { transform: rotate(-135deg); margin-bottom: 0; }
.item > summary:hover .chev { border-color: var(--label); }

.item-role    { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--tint); letter-spacing: -.012em; }
.item-summary { margin: 1px 0 0; font-size: 14px; color: var(--label-2); }
.item-body    { padding: 0 20px 18px; }

.bullets { margin: 0; padding: 0 0 0 18px; list-style: none; }
.bullets li { position: relative; margin: 0 0 8px; font-size: 15.5px; line-height: 1.45; color: var(--label); letter-spacing: -.014em; }
.bullets li:last-child { margin-bottom: 0; }
.bullets li::before { content: ""; position: absolute; left: -15px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--label-3); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.tags li { padding: 4px 11px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 500; color: var(--label); letter-spacing: -.005em; }

/* projects — rows inside one group */
.proj { position: relative; padding: 15px 20px; }
.proj + .proj::before { content: ""; position: absolute; left: 20px; right: 0; top: 0; height: 1px; background: var(--sep); transform: scaleY(.6); }
.proj-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.proj-name { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.022em; }
.proj-link { margin-left: auto; font-size: 14px; color: var(--tint); text-decoration: none; }
.proj-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.proj-meta { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--label-2); }
.proj-desc { margin: 4px 0 0; font-size: 15.5px; color: var(--label); letter-spacing: -.014em; }

/* awards — rows inside one group */
.award { position: relative; display: flex; align-items: center; gap: 16px; padding: 13px 20px; }
.award + .award::before { content: ""; position: absolute; left: 20px; right: 0; top: 0; height: 1px; background: var(--sep); transform: scaleY(.6); }
.award-main { flex: 1; min-width: 0; }
.award-name { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.award-res  { margin: 1px 0 0; font-size: 14.5px; color: var(--label-2); letter-spacing: -.01em; }
.award-year { flex: none; font-size: 15px; color: var(--label-2); font-variant-numeric: tabular-nums; }

/* ---------- accessibility preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
  * { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .buttons, .page-head.is-stuck { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .page-head::after { display: none; }
}

/* ---------- phone ---------- */

@media (max-width: 560px) {
  .wrap { padding: 0 16px 30px; }
  .page-head { padding: 10px calc(50vw - 50% + 4px); }

  .masthead { padding-top: 32px; gap: 16px; }
  .masthead .name { font-size: 30px; }
  .masthead .role, .masthead .speaks { font-size: 15px; }
  .avatar { width: 83px; height: 83px; }

  .contact-strip { gap: 6px 15px; }
  .contact-strip svg { width: 17px; height: 17px; }
  .lang button { padding: 4px 9px; }

  .buttons { display: flex; width: 100%; }
  .btn { flex: 1; text-align: center; padding: 8px 6px; font-size: 14px; }

  .intro { font-size: 22px; }
  .page-title { font-size: 30px; }

  .line, .skill-block, .proj, .award { padding-left: 16px; padding-right: 16px; }
  .line + .line::before, .skill-block + .skill-block::before,
  .proj + .proj::before, .award + .award::before { left: 16px; }
  .marquee { margin: 0 -16px; }
  .item > summary { padding: 15px 16px; }
  .item-body { padding: 0 16px 16px; }

  .item-head { flex-wrap: wrap; }
  .item-name { flex: 1; }
  .chev { order: 2; margin-left: auto; }
  .item-date { order: 3; width: 100%; margin: 2px 0 0; }

  .proj-link { margin-left: 0; width: 100%; }
}
