/* studio1008-portfolio
   Design read: content/narrative-writer portfolio for recruiters and hiring
   managers, calm editorial-credibility register (facts over flash), native
   HTML/CSS only (no framework, no JS). Dials: variance 6, motion 4, density 4.
   One accent (moss green), one type family (Manrope, self-hosted, Cyrillic).
*/

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+2116;
}

:root {
  --bg: #f4f5f3;
  --ink: #1a1c18;
  --muted: #55584f;
  --accent: #2f5d42;
  --accent-ink: #eef3ee; /* text on accent */
  --hairline: #d7d9d2;
  --max-w: 1100px;
  --pad-inline: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14160f;
    --ink: #ece9e2;
    --muted: #9a9d92;
    --accent: #7ec097;
    --accent-ink: #0f1710;
    --hairline: #2c2f26;
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.timeline-detail a,
.case-body a {
  color: var(--accent);
  text-decoration-color: var(--hairline);
  text-underline-offset: 2px;
}
.timeline-detail a:hover,
.case-body a:hover {
  text-decoration-color: var(--accent);
}

/* ---------- language toggle (pure CSS, no JS) ---------- */

.lang-switch {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.page [lang="ru"],
.page [lang="en"] {
  display: none;
}
#lang-ru:checked ~ .page [lang="ru"] {
  display: revert;
}
#lang-en:checked ~ .page [lang="en"] {
  display: revert;
}

.lang-toggle {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.lang-toggle label {
  cursor: pointer;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.lang-toggle label:hover {
  color: var(--ink);
}
#lang-ru:checked ~ .page .lang-toggle label[for="lang-ru"],
#lang-en:checked ~ .page .lang-toggle label[for="lang-en"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#lang-ru:focus-visible ~ .page label[for="lang-ru"],
#lang-en:focus-visible ~ .page label[for="lang-en"] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* toggle as links between separate RU (/) and EN (/en/) pages */
.lang-toggle a {
  cursor: pointer;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
}
.lang-toggle a:hover {
  color: var(--ink);
}
.lang-toggle a[aria-current="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lang-toggle a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- layout shell ---------- */

.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.mark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-cta {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.nav-cta:hover {
  opacity: 0.7;
}
.nav-cta:active {
  transform: translateY(1px);
}

/* ---------- hero (asymmetric split, anti-center-bias) ---------- */

.hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-name {
  font-weight: 800;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.35em;
}
.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1.4em;
}
.hero-roles span {
  white-space: nowrap;
}
.hero-status {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1.4em;
}
.hero-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.hero-copy {
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.25rem);
  max-width: 52ch;
  color: var(--ink);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8em;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.8em 1.3em;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn:active {
  transform: scale(0.98);
}

.hero-photo {
  justify-self: end;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 640 / 799;
  object-fit: cover;
  border: 1px solid var(--hairline);
  filter: grayscale(0.15);
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-photo {
    max-width: 220px;
    justify-self: start;
  }
}

/* ---------- capability strip (no cards, typographic labels) ---------- */

.capabilities {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
}
.capabilities ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}
.capabilities li {
  list-style: none;
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
  font-weight: 700;
  font-size: clamp(0.95rem, 0.3vw + 0.9rem, 1.1rem);
  border-left: 1px solid var(--hairline);
}
.capabilities li:first-child {
  border-left: none;
  padding-left: 0;
}
@media (max-width: 760px) {
  .capabilities ul {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .capabilities li {
    border-left: none;
    border-top: 1px solid var(--hairline);
    padding-left: 0;
    padding-top: 1rem;
  }
  .capabilities li:first-child {
    border-top: none;
    padding-top: 0;
  }
}

/* ---------- section heading shared ---------- */

.section {
  padding-block: clamp(3rem, 6vw, 5rem);
  scroll-margin-top: 84px;
}
.section-head {
  font-weight: 800;
  font-size: clamp(1.4rem, 1vw + 1.1rem, 1.9rem);
  letter-spacing: -0.01em;
  margin: 0 0 1.4em;
}

/* ---------- case studies (native details, no JS) ---------- */

.cases {
  border-top: 1px solid var(--hairline);
}
.case {
  border-bottom: 1px solid var(--hairline);
  padding-block: 1.4rem;
}
.case summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  font-size: clamp(1.05rem, 0.3vw + 1rem, 1.2rem);
}
.case summary::-webkit-details-marker {
  display: none;
}
.case-toggle {
  flex-shrink: 0;
  font-weight: 400;
  color: var(--muted);
  font-size: 1.3rem;
  transition: transform 0.25s ease;
  line-height: 1;
}
.case[open] .case-toggle {
  transform: rotate(45deg);
  color: var(--accent);
}
.case-role {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.3em;
}
.case-body {
  margin-top: 1.1rem;
  max-width: 68ch;
}
.case-body p {
  margin: 0 0 0.9em;
}
.case-body strong {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- timeline (vertical spine, single column) ---------- */

.timeline {
  position: relative;
  padding-left: clamp(1.25rem, 3vw, 2rem);
  border-left: 1.5px solid var(--hairline);
}
.timeline-item {
  position: relative;
  padding-bottom: clamp(1.5rem, 3vw, 2.1rem);
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(clamp(1.25rem, 3vw, 2rem) * -1 - 5px);
  top: 0.4em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
}
.timeline-date {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-bottom: 0.35em;
}
.timeline-entry {
  font-weight: 600;
  margin: 0 0 0.25em;
}
.timeline-detail {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 62ch;
  margin: 0;
}
ul.timeline-detail {
  list-style: none;
  padding: 0;
}
ul.timeline-detail li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 0.4em;
}
ul.timeline-detail li:last-child {
  margin-bottom: 0;
}
ul.timeline-detail li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.timeline-games {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.timeline-games .btn {
  padding: 0.55em 1em;
  font-size: 0.85rem;
}

/* ---------- legal pages (privacy policy) ---------- */

.legal .wrap {
  max-width: 68ch;
}
.legal h1 {
  font-weight: 800;
  font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.3em;
}
.legal-updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 2rem;
}
.legal h2 {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 1.8em 0 0.6em;
}
.legal p,
.legal ul {
  color: var(--ink);
  margin: 0 0 0.9em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.4em;
}
.legal a {
  color: var(--accent);
  text-decoration-color: var(--hairline);
  text-underline-offset: 2px;
}
.legal a:hover {
  text-decoration-color: var(--accent);
}

/* ---------- cookie notice ---------- */

.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--bg);
  border-top: 1px solid var(--hairline);
  padding: 1rem clamp(1.25rem, 5vw, 3rem);
}
.cookie-notice-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.cookie-notice p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1 1 40ch;
}
.cookie-notice a {
  color: var(--ink);
  text-decoration-color: var(--hairline);
}
.cookie-notice a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}
.cookie-notice button {
  flex-shrink: 0;
}

/* ---------- testimonials ---------- */

.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--hairline);
  padding-top: 2rem;
}
.testimonial {
  margin: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}
.testimonial p {
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 0.8em;
}
.testimonial cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
@media (max-width: 760px) {
  .testimonials {
    grid-template-columns: 1fr;
  }
}

/* ---------- contacts (closing block) ---------- */

.contacts {
  border-top: 1px solid var(--hairline);
}
.contacts-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.contact-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  width: fit-content;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 760px) {
  .contacts-grid {
    grid-template-columns: 1fr;
  }
}
