/* ==========================================================================
   Anton Gorpinchenko — personal portfolio
   ========================================================================== */

:root {
  --bg: #F7F7F5;
  --bg-alt: #FCFCFA;
  --border: #E3E1DB;
  --border-strong: #C9C7C0;
  --ink: #111111;
  --ink-strong: #000000;
  --text: #2C2C28;
  --text-muted: #4A4A44;
  --text-faint: #6C6C64;
  --accent: #1F3FD1;
  --accent-hover: #16309F;
  --accent-soft: rgba(31, 63, 209, 0.35);
  --selection: #DDE3FB;

  --max-width: 1240px;
  --pad-inline: clamp(20px, 4vw, 48px);
  --pad-section: clamp(56px, 7vw, 104px);
  --pad-section-lg: clamp(64px, 8vw, 120px);

  --font-body: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

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

::selection { background: var(--selection); }

img { display: block; max-width: 100%; }

button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Offsets anchor-jump targets so the sticky header doesn't cover them. */
[id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding-left: var(--pad-inline); padding-right: var(--pad-inline); }
.section-alt { background: var(--bg-alt); }
.section-border-top { border-top: 1px solid var(--border); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 20px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--ink); background: #FFFFFF; color: var(--ink); }

.btn-sm { padding: 13px 22px; }

.link-underline {
  font-size: 15px;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 245, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  color: var(--ink);
  margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-role { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.main-nav a {
  font-size: 15px;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}
.main-nav a:hover { border-color: var(--ink); color: var(--ink); }
.main-nav a.is-current { border-color: var(--ink); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  background: var(--bg-alt);
}
.lang-toggle a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  border-radius: 6px;
  background: transparent;
  color: #6B6B64;
}
.lang-toggle a:hover { color: var(--ink); }
.lang-toggle a.is-active { background: var(--ink); color: var(--bg); }
.lang-toggle a.is-active:hover { color: var(--bg); }

.contact-nav-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 17px;
  font-size: 15px;
  font-weight: 500;
  transition: border-color 180ms ease, background 180ms ease;
}
.contact-nav-link:hover { border-color: var(--ink); background: #FFFFFF; color: var(--ink); }

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

.hero .wrap {
  padding-top: clamp(48px, 7vw, 104px);
  padding-bottom: clamp(44px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 28px;
  max-width: 17ch;
}

.hero-lede {
  font-size: 19px;
  line-height: 1.62;
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 470px;
  justify-self: end;
  border: 1px solid var(--border);
  border-radius: 14px;
  object-fit: cover;
  object-position: 50% 28%;
}

/* ---------- Profile stats ---------- */

.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1px;
  background: var(--border);
}
.stat {
  background: var(--bg-alt);
  padding: clamp(28px, 3vw, 44px) clamp(20px, 2vw, 30px);
}
.stat-value { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; }
.stat-label { font-size: 15px; line-height: 1.5; color: var(--text-muted); margin-top: 12px; }

/* ---------- Focus / intro sections ---------- */

.section-pad { padding-top: var(--pad-section); padding-bottom: var(--pad-section); }
.section-pad-lg { padding-top: var(--pad-section-lg); padding-bottom: var(--pad-section-lg); }

.section-title {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 500;
  margin: 0 0 clamp(36px, 4vw, 60px);
  max-width: 20ch;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.focus-copy { max-width: 62ch; }
.focus-copy p { font-size: 19px; line-height: 1.65; color: var(--text); margin: 0 0 20px; }
.focus-copy p:last-of-type { margin-bottom: 0; }

.focus-callout {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 26px;
}
.focus-callout h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 12px; }
.focus-callout p { font-size: 17px; line-height: 1.68; color: var(--text-muted); margin: 0; }

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0 clamp(20px, 3vw, 40px);
}
.tag-list li {
  font-size: 17px;
  color: var(--text);
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

/* ---------- Work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
}

.work-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(24px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 200ms ease, border-color 200ms ease;
}
.work-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }

.work-card-index { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.work-card h3 { font-size: clamp(21px, 2vw, 27px); line-height: 1.18; letter-spacing: -0.025em; font-weight: 500; margin: 0; }
.work-card p { font-size: 16px; line-height: 1.62; color: var(--text-muted); margin: 0; }
.work-card-meta {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-faint);
  margin: auto 0 0;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.work-more { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 26px 0 0; }

/* ---------- Experience ---------- */

.timeline-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(12px, 3vw, 44px);
  padding: clamp(24px, 3vw, 36px) 0;
  border-top: 1px solid var(--border);
}
.timeline-row:first-of-type { border-top: 1px solid var(--border-strong); }
.timeline-row.is-last { border-bottom: 1px solid var(--border); }

.timeline-row h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 500; margin: 0 0 8px; }
.timeline-dates { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin: 0; }

.timeline-detail { grid-column: span 2; max-width: 70ch; }
.timeline-role { font-size: 16px; color: var(--text-faint); margin: 0 0 12px; font-family: var(--font-mono); letter-spacing: 0.03em; }
.timeline-detail p:last-child { font-size: 18px; line-height: 1.62; color: var(--text); margin: 0; }

.experience-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(32px, 4vw, 52px);
  align-items: start;
}
.cv-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.cv-note { font-size: 15px; line-height: 1.6; color: var(--text-faint); margin: 0; max-width: 46ch; }

.quote {
  margin: 0;
  padding: 0 0 0 clamp(20px, 2vw, 28px);
  border-left: 2px solid var(--border-strong);
}
.quote p { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.45; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 14px; }
.quote cite { font-size: 15px; line-height: 1.55; color: var(--text-faint); font-style: normal; display: block; }

/* ---------- About / mentoring teasers ---------- */

.teaser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.teaser-reverse { align-items: start; }

.teaser-portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: 14px;
  object-fit: cover;
}

.teaser-copy { max-width: 60ch; }
.teaser-copy h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.07; letter-spacing: -0.03em; font-weight: 500; margin: 0 0 24px; }
.teaser-copy p { font-size: 19px; line-height: 1.65; color: var(--text); margin: 0 0 18px; }
.teaser-copy p.is-muted { font-size: 17px; line-height: 1.68; color: var(--text-muted); margin: 0 0 26px; }

.mentoring-teaser-copy { max-width: 44ch; }
.mentoring-teaser-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }

/* ---------- Contact ---------- */

.contact-copy { max-width: 44ch; }
.contact-copy h2 { font-size: clamp(32px, 3.8vw, 52px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 500; margin: 0 0 20px; }
.contact-copy > p:first-of-type { font-size: 18px; line-height: 1.62; color: var(--text-muted); margin: 0 0 28px; }
.contact-copy > p:last-child { font-size: 15px; line-height: 1.6; color: var(--text-faint); margin: 0; }

.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }

.contact-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(20px, 3vw, 36px);
}
.contact-cta { border-top: 1px solid var(--ink); padding-top: 20px; }
.contact-cta h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 10px; }
.contact-cta p { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--bg-alt); }
.footer-grid {
  padding-top: clamp(36px, 4vw, 56px);
  padding-bottom: clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 28px;
}
.footer-brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.footer-brand-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-top: 6px; }
.footer-nav, .footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.footer-nav a, .footer-links a { color: var(--text); }

.footer-bottom {
  padding: 0 var(--pad-inline) clamp(32px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Inner pages (About / Mentoring) ---------- */

.page-header { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(40px, 5vw, 72px); }
.page-title {
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 22px;
  max-width: 22ch;
}
.page-lede { font-size: 19px; line-height: 1.62; color: var(--text-muted); margin: 0 0 clamp(40px, 5vw, 72px); max-width: 62ch; }

/* Mentoring page — topic grid */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-bottom: clamp(48px, 6vw, 88px);
}
.topic { border-top: 1px solid var(--ink); padding-top: 20px; }
.topic h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 14px; }
.topic ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.5; color: var(--text-muted); }

.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  border-top: 1px solid var(--border);
  padding-top: clamp(40px, 5vw, 72px);
}
.approach-copy { max-width: 60ch; }
.approach-copy h2 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; margin: 0 0 24px; max-width: 22ch; }
.approach-copy p { font-size: 19px; line-height: 1.62; color: var(--text); margin: 0 0 20px; }
.approach-copy p.is-fine-print { font-size: 14px; line-height: 1.6; color: var(--text-faint); margin: 0; }

.source-heading { margin-bottom: 18px; }

.approach-cta { margin-top: 26px; }

.source-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
.source-list li {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.source-list li:last-child { border-bottom: 1px solid var(--border); }

/* About page */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-copy { grid-column: span 2; display: flex; flex-direction: column; gap: 22px; max-width: 70ch; }
.about-copy > p { font-size: 19px; line-height: 1.65; color: var(--text); margin: 0; }
.about-copy > p.is-muted { font-size: 17px; line-height: 1.68; color: var(--text-muted); }

.about-block { border-top: 1px solid var(--border); padding-top: 24px; }
.about-block h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px; }
.about-block p { font-size: 17px; line-height: 1.68; color: var(--text-muted); margin: 0; }
.about-block p + p { margin-top: 14px; }

.about-side { display: flex; flex-direction: column; gap: 24px; }
.about-portrait { aspect-ratio: 4 / 5; width: 100%; border: 1px solid var(--border); border-radius: 14px; object-fit: cover; }

.about-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.about-card h2 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 16px; }
.about-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.55; color: var(--text); }
.about-card ul li { display: flex; gap: 10px; }
.about-card ul li::before { content: "—"; color: var(--accent); }

.about-card-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  align-items: flex-start;
}
.about-card-links a { font-size: 15px; font-weight: 500; }

@media (max-width: 640px) {
  .about-copy { grid-column: span 1; }
}
