@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Sora:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #f6f6f2;
  --bg-dark: #0b0b0b;
  --text: #0b0b0b;
  --muted: #6b6b6b;
  --accent: #0f7b6c;
  --accent-2: #0b5bd3;
  --surface: #ffffff;
  --surface-dark: #131313;
  --border: rgba(11, 11, 11, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
  --bg-grad-1: rgba(15, 123, 108, 0.2);
  --bg-grad-2: rgba(11, 91, 211, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 15% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(1000px 600px at 90% -20%, var(--bg-grad-2), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.modal-open {
  overflow: hidden;
  transform: none;
}

body[data-theme="dark"] {
  --bg: #070707;
  --bg-dark: #050505;
  --text: #f4f4f4;
  --muted: #a3a3a3;
  --surface: #0f0f0f;
  --surface-dark: #0b0b0b;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --bg-grad-1: rgba(15, 123, 108, 0.2);
  --bg-grad-2: rgba(11, 91, 211, 0.25);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  pointer-events: none;
  z-index: -1;
}

body[data-theme="dark"]::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 110px 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs-sep {
  opacity: 0.6;
}

.services-hero {
  max-width: 920px;
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.services-grid-wrap {
  padding-top: 30px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 860px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.services-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}

.services-card h2 {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.services-list {
  list-style: disc;
  margin-top: 12px;
  padding-left: 20px;
  color: var(--muted);
}

.services-proof,
.services-faq {
  text-align: center;
}

.services-links {
  justify-content: center;
}

.services-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.services-case-grid .project-card {
  text-align: left;
}

.services-case-grid .project-card .content {
  min-height: 148px;
}

.services-case-grid .proof-link {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.services-case-grid .proof-link:hover {
  opacity: 0.75;
}

@media (max-width: 980px) {
  .services-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .services-case-grid {
    grid-template-columns: 1fr;
  }
}

.faq-list {
  display: grid;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  background: var(--surface);
}

.faq-item h3 {
  margin-bottom: 8px;
}

.section-dark {
  background: var(--bg-dark);
  color: #f2f2f2;
}

.section-dark .section-title {
  color: #fff;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.6);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.section-title {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}

.section-subtitle {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: center;
}

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 246, 242, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body[data-theme="dark"] header {
  background: rgba(7, 7, 7, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .project-card,
body[data-theme="dark"] .about-card,
body[data-theme="dark"] .timeline-item,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .modal-content {
  background: #0f0f0f;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}


body[data-theme="dark"] .project-card p,
body[data-theme="dark"] .about-card p,
body[data-theme="dark"] .timeline-item p {
  color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .section-dark {
  background: #050505;
  color: #f1f1f1;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select {
  background: #0b0b0b;
  color: #f1f1f1;
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .button {
  background: #0f0f0f;
  color: #f1f1f1;
  border-color: rgba(255, 255, 255, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  letter-spacing: 0.3em;
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.nav-links a {
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  gap: 12px;
}

.nav-tools {
  display: flex;
  gap: 10px;
}

body:not([data-theme="dark"]) .mobile-toggle {
  color: #0b0b0b;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}


.button {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button.primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.button.accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

body[data-theme="dark"] .button.primary {
  background: #f4f4f4;
  color: #0b0b0b;
  border-color: #f4f4f4;
}

.hero {
  padding: 140px 0 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-align: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0 32px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  justify-content: center;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 20px;
}

.hero-visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.featured-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 40px;
}

.project-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px) rotateX(2deg) rotateY(-2deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.project-card img {
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.06);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.tests-page .section-title,
.tests-page .section-subtitle,
.tests-page .lead {
  text-align: center;
}

.tests-hero-content {
  justify-items: center;
  text-align: center;
}

.tests-hero {
  padding-top: 90px;
}

.tests-hero-content {
  display: grid;
  gap: 12px;
}

.tests-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-items: center;
}

.tests-section {
  padding-top: 12px;
}

.tests-card {
  margin-top: 0;
  width: min(760px, 100%);
}

.tests-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
}

.quiz {
  display: grid;
  gap: 18px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-header h2 {
  font-size: 18px;
  line-height: 1.35;
  margin: 0;
}

.quiz-progress {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.quiz-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: rgba(11, 11, 11, 0.35);
}

.quiz-item legend {
  font-size: 16px;
  font-weight: 600;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.quiz-option input {
  accent-color: var(--accent);
}

.quiz-option:hover {
  border-color: rgba(125, 213, 198, 0.5);
  background: rgba(125, 213, 198, 0.08);
  transform: translateY(-1px);
}

.quiz-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quiz-warning {
  margin: 0;
  color: #f87171;
  font-size: 14px;
}

.result-panel h2 {
  margin-top: 0;
}

.result-score {
  font-size: 18px;
  margin: 12px 0;
}

.result-level {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-panel.is-ready {
  border-color: var(--border);
  box-shadow: none;
}

.result-panel.is-hidden {
  display: none;
}

.quiz-panel.is-hidden {
  display: none;
}

.result-panel {
  display: grid;
  gap: 12px;
}

.result-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.result-label {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.result-meta {
  font-size: 14px;
  color: var(--muted);
}

.result-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.result-actions {
  margin-top: 6px;
}

@media (max-width: 980px) {
  .tests-grid {
    grid-template-columns: 1fr;
  }
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 960px;
  text-wrap: pretty;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.about-hero-grid,
.cv-hero-grid,
.blog-hero-grid,
.article-hero-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.about-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-card,
.blog-info-card,
.cv-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-meta {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.stat-card {
  background: var(--surface-dark);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.stat-card strong {
  display: block;
  font-size: 20px;
}

.stat-card span {
  font-size: 12px;
  color: var(--muted);
}

.articles-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-rows: 1fr;
}

.article-link {
  display: block;
  height: 100%;
}

.article-link:hover .article-card {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.18);
}

.article-card {
  height: 100%;
}

.article-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: left;
}

.article-body .tag-list {
  margin-top: auto;
}

.blog-page .blog-main .section-title,
.blog-page .blog-main .section-subtitle {
  text-align: center;
}

.blog-compact-section {
  padding-top: 110px;
}

.blog-anchor {
  position: relative;
  top: -110px;
  height: 0;
}

.blog-compact-content {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: left;
}

.blog-compact-header {
  display: grid;
  gap: 8px;
}

.blog-compact-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  width: min(720px, 100%);
}

.blog-compact-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  height: 48px;
  padding: 0 16px;
  color: #f2f2f2;
}

.blog-compact-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.blog-compact-search .button {
  border-radius: 16px;
  height: 48px;
  padding: 0 22px;
}

body[data-theme="dark"] .blog-compact-search input {
  background: rgba(11, 11, 11, 0.9);
  border-color: rgba(255, 255, 255, 0.14);
}

.blog-compact-categories {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.blog-compact-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(720px, 100%);
  justify-content: center;
}

.blog-compact-menu .filter-pill {
  text-align: center;
}

.filter-pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 6px 12px;
  background: transparent;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #f2f2f2;
  cursor: pointer;
}

.filter-pill.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.blog-feed-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-page .article-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    var(--surface);
}

body:not([data-theme="dark"]) .blog-compact-search input {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

body:not([data-theme="dark"]) .blog-compact-search input::placeholder {
  color: rgba(11, 11, 11, 0.45);
}

body:not([data-theme="dark"]) .filter-pill {
  color: var(--text);
}

body:not([data-theme="dark"]) .blog-page .article-card {
  background: linear-gradient(160deg, rgba(11, 11, 11, 0.04), rgba(11, 11, 11, 0)),
    var(--surface);
}

@media (max-width: 980px) {
  .blog-compact-header {
    align-items: center;
  }
  .blog-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .blog-compact-search {
    grid-template-columns: 1fr;
  }
  .blog-feed-grid {
    grid-template-columns: 1fr;
  }
}
.blog-info-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    var(--surface-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.blog-info-card .case-list {
  margin-top: 10px;
}

.article-featured {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.article-featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.18);
}

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.article-card .article-body p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

body[data-theme="dark"] .article-card .article-body p {
  color: rgba(255, 255, 255, 0.62);
}

.article-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.article-content {
  max-width: 820px;
  display: grid;
  gap: 8px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 300;
}

.reading-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, #0f7b6c, #7dd5c6);
  transition: transform 0.12s linear;
}

.article-reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.article-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.article-quote {
  position: relative;
  overflow: hidden;
}

.article-quote::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, rgba(125, 213, 198, 0), rgba(125, 213, 198, 0.8), rgba(125, 213, 198, 0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s ease;
}

.article-quote.is-visible::after {
  transform: scaleX(1);
}

.article-callout {
  position: relative;
  overflow: hidden;
}

.article-callout::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(125, 213, 198, 0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s ease;
}

.article-callout.is-visible::after {
  transform: scaleX(1);
}

.article-divider.is-visible::before,
.article-divider.is-visible::after {
  background: linear-gradient(90deg, transparent, rgba(125, 213, 198, 0.6), transparent);
}

.article-reveal.is-visible strong {
  background: linear-gradient(transparent 60%, rgba(125, 213, 198, 0.25) 0);
  padding: 0 2px;
  transition: background 0.6s ease;
}

.article-content h2,
.article-content h3 {
  margin-top: 16px;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.article-content h2:first-child,
.article-content h3:first-child {
  margin-top: 0;
}

.article-content blockquote {
  margin: 8px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 16px;
}

.article-content p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}

.article-content h2 {
  font-size: clamp(24px, 3vw, 32px);
  color: var(--text);
}

.article-content h3 {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text);
}

.article-content ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  color: var(--muted);
  margin: 0;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.article-paragraph {
  padding: 2px 0;
}

.article-paragraph strong {
  color: var(--text);
}

.text-underline {
  background: linear-gradient(transparent 65%, rgba(11, 91, 211, 0.25) 0);
  padding: 0 2px;
}

.article-quote {
  position: relative;
  padding: 22px 24px 22px 52px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  font-size: 16px;
  overflow: hidden;
}

.article-quote .quote-mark {
  position: absolute;
  left: 18px;
  top: 16px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.45);
  opacity: 1;
  pointer-events: none;
}

.article-list li {
  position: relative;
  padding-left: 6px;
}

.article-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.article-divider::before,
.article-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.article-divider span {
  white-space: nowrap;
}

.article-callout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.callout-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}

.article-callout .callout-head {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.article-callout h4 {
  margin: 0;
  font-size: 16px;
}

.article-callout p {
  margin: 0;
}

.article-footnotes {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
}

body[data-theme="dark"] .article-quote,
body[data-theme="dark"] .article-callout {
  background: rgba(15, 15, 15, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

.article-hero-cover img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border);
}

.article-hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.article-hero-text {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.article-hero-text .lead {
  max-width: 720px;
}

.article-hero-text .article-meta {
  justify-content: center;
  flex-wrap: wrap;
}

.article-hero-text .tag-list {
  justify-content: center;
}

.article-feedback {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    var(--surface-dark);
  box-shadow: var(--shadow);
}

.article-feedback-head .section-title {
  margin-bottom: 8px;
}

.article-feedback-head .lead {
  text-align: center;
}

.article-feedback-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.article-feedback-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 12px;
}

.article-feedback-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-feedback-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.reaction-buttons,
.rating-stars {
  display: grid;
  gap: 12px;
}

.reaction-buttons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reaction-buttons button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.reaction-buttons button.active {
  background: #ffffff;
  color: #0b0b0b;
  border-color: #ffffff;
}

.reaction-buttons button.active .reaction-icon {
  background: rgba(11, 11, 11, 0.06);
}

.reaction-icon {
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.reaction-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
}

.reaction-count {
  font-size: 12px;
  color: var(--muted);
}

.reaction-buttons button.active .reaction-count {
  color: rgba(11, 11, 11, 0.7);
}

.rating-stars {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rating-stars button {
  padding: 14px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  opacity: 0.55;
}

.rating-stars button.active {
  background: #ffffff;
  color: #0b0b0b;
  border-color: #ffffff;
  opacity: 1;
}

.reaction-buttons button:hover,
.rating-stars button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.article-feedback-count {
  font-size: 12px;
  color: var(--muted);
}

body[data-theme="dark"] .article-feedback {
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .article-feedback-card {
  background: rgba(15, 15, 15, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .reaction-buttons button,
body[data-theme="dark"] .rating-stars button {
  background: rgba(15, 15, 15, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

body[data-theme="dark"] .reaction-icon {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .reaction-buttons button.active {
  background: #ffffff;
  color: #0b0b0b;
  border-color: #ffffff;
}

body[data-theme="dark"] .reaction-buttons button.active .reaction-count {
  color: rgba(11, 11, 11, 0.7);
}

body[data-theme="dark"] .rating-stars button.active {
  background: #ffffff;
  color: #0b0b0b;
  border-color: #ffffff;
}

@media (max-width: 720px) {
  .reaction-buttons {
    grid-template-columns: 1fr;
  }
  .rating-stars {
    grid-template-columns: repeat(5, 1fr);
  }
}

.article-hero-text .section-title {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.05;
}

.article-hero-media {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.article-hero-frame {
  width: min(920px, 92vw);
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  background: #0b0b0b;
}

.article-hero-frame img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-hero-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
}

.article-hero-title-label {
  color: var(--accent);
}

.article-hero-title-text {
  color: var(--text);
}

body[data-theme="dark"] .article-hero-title {
  background: rgba(15, 15, 15, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}

body[data-theme="dark"] .article-hero-title-text {
  color: #f4f4f4;
}

@media (max-width: 980px) {
  .article-hero-layout {
    grid-template-columns: 1fr;
  }
}

.cv-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.calculator-page .section {
  padding: 96px 0;
}

.calculator-hero {
  padding-top: 120px;
  position: relative;
}

.calculator-hero::before {
  content: "";
  position: absolute;
  inset: -30px 0 0;
  background: radial-gradient(520px 320px at 12% 10%, rgba(15, 123, 108, 0.2), transparent 60%),
    radial-gradient(520px 300px at 85% 0%, rgba(11, 91, 211, 0.2), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.calculator-hero-inner {
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.calculator-lead {
  color: var(--muted);
  max-width: 720px;
}

.calculator-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.calculator-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.calculator-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.calculator-switch .calc-switch {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 8px 14px;
}

.calculator-switch .calc-switch.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

body[data-theme="dark"] .calculator-switch .calc-switch.is-active {
  background: #f4f4f4;
  color: #0b0b0b;
  border-color: #f4f4f4;
}

.calculator-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.calculator-metric {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 4px;
}

.calculator-metric .metric-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.calculator-metric .metric-value {
  font-weight: 600;
}

.calculator-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calculator-form .span-2 {
  grid-column: 1 / -1;
}

.calculator-hint {
  font-size: 12px;
  color: var(--muted);
}

.calculator-includes {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  margin-bottom: 18px;
}

.calculator-includes ul {
  display: grid;
  gap: 8px;
}

.calculator-includes li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}

.calculator-includes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.calculator-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: start;
}

.calculator-card,
.calculator-panel {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.calculator-panel {
  position: sticky;
  top: 110px;
}

.calculator-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calculator-form {
  display: grid;
  gap: 14px;
}

.calculator-options {
  display: grid;
  gap: 10px;
}

.calculator-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.calculator-result {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-dark);
  font-weight: 600;
  min-height: 52px;
}

.calculator-note {
  color: var(--muted);
  font-size: 13px;
}

.calculator-steps h4 {
  margin-bottom: 10px;
}

.calculator-steps ol {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--muted);
}

.calculator-steps ol li {
  position: relative;
  padding-left: 6px;
}

.calculator-steps ol li::marker {
  color: var(--accent);
}

body[data-theme="dark"] .calculator-card,
body[data-theme="dark"] .calculator-panel {
  background: #0f0f0f;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

body[data-theme="dark"] .calculator-result {
  background: #0b0b0b;
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .calculator-metric {
  background: rgba(15, 15, 15, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .calculator-includes {
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 960px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }
  .calculator-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .calculator-form {
    grid-template-columns: 1fr;
  }
}

.chat-section {
  padding-top: 120px;
}

.chat-container {
  display: flex;
  justify-content: center;
}

.chat-card {
  width: min(900px, 96vw);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    var(--surface-dark);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  padding: 26px;
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.chat-messages {
  background: rgba(8, 8, 8, 0.6);
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 14px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-row {
  display: flex;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 76%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-bubble.bot {
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f2;
}

.chat-bubble.user {
  background: linear-gradient(135deg, #2b6bff, #1a4bcc);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  background: rgba(8, 8, 8, 0.75);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input input {
  height: 44px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: #f4f4f4;
  font-family: "IBM Plex Mono", monospace;
}

.chat-input input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.chat-input input:focus {
  outline: none;
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #2b6bff, #1a4bcc);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(26, 75, 204, 0.4);
}

.chat-send:hover {
  filter: brightness(1.05);
}

.chat-send:active {
  transform: translateY(1px);
}


.page-centered .container {
  text-align: center;
}

.page-centered .about-hero-grid,
.page-centered .cv-hero-grid,
.page-centered .about-grid,
.page-centered .cv-grid {
  justify-items: center;
}

.page-centered .about-card,
.page-centered .cv-card,
.page-centered .profile-card {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.page-centered .case-list,
.page-centered .timeline,
.page-centered .profile-meta,
.page-centered .skills-list {
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  max-width: 520px;
}

.page-centered .profile-meta {
  justify-items: start;
}

.about-cv .section {
  padding: 88px 0;
}

.about-cv-hero {
  padding-top: 110px;
  position: relative;
}

.about-cv-hero::before {
  content: "";
  position: absolute;
  inset: -20px 0 0;
  background: radial-gradient(620px 420px at 15% 10%, rgba(15, 123, 108, 0.22), transparent 62%),
    radial-gradient(520px 320px at 85% 0%, rgba(16, 16, 16, 0.35), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.about-cv-stack-center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  justify-items: center;
}

.about-cv-block {
  width: min(1200px, 92vw);
  text-align: center;
}

.about-cv #experienceList,
.about-cv #experienceList * {
  text-align: left;
}

.about-cv-stack-center {
  gap: 28px;
}


.code-window .section-subtitle {
  letter-spacing: 0.32em;
}

.code-window .skills-list {
  gap: 12px;
}

.code-window .timeline {
  gap: 18px;
}

.metro-wrap {
  position: relative;
  padding-left: 57px;
}

.metro-line-track,
.metro-line-progress {
  position: absolute;
  left: 29px;
  top: 22px;
  width: 2px;
  height: calc(100% - 22px);
  border-radius: 999px;
}

.metro-line-track {
  background: rgba(255, 255, 255, 0.14);
}

.metro-line-progress {
  background: linear-gradient(180deg, #7dd5c6, rgba(125, 213, 198, 0.2));
  height: 0;
  box-shadow: 0 0 16px rgba(125, 213, 198, 0.4);
}

.metro-timeline .timeline-item {
  position: relative;
  padding-left: 18px;
  text-align: left;
  padding: 18px 18px 18px 26px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.metro-timeline .timeline-item::before {
  content: "";
  position: absolute;
  left: -39px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.metro-timeline .timeline-item.is-active::before {
  background: #7dd5c6;
  box-shadow: 0 0 0 5px rgba(125, 213, 198, 0.25);
}

.metro-timeline .timeline-item.is-active {
  background: rgba(125, 213, 198, 0.06);
  border-color: rgba(125, 213, 198, 0.25);
  transform: translateX(6px);
}

.metro-timeline .timeline-item span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  display: block;
  margin-bottom: 8px;
}

.metro-timeline .timeline-item p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.code-window .stat-card {
  padding: 16px;
}

.code-window .stat-card strong {
  font-size: 22px;
}

.code-window .stat-card span {
  font-size: 12px;
}

.code-window .dot {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.03);
}

.code-window:hover .dot {
  transform: translateY(-1px);
  transition: transform 0.3s ease;
}

@media (max-width: 720px) {
  .code-window {
    padding: 18px 18px 20px;
  }
  .code-window-bar {
    margin: -18px -18px 16px;
  }
}

.code-window {
  background: #0b0b0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  padding: 20px 22px 22px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(6px);
}

.code-window--intro {
  padding-bottom: 26px;
}

.code-editor {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  align-items: start;
}

.code-gutter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.35);
  text-align: right;
  line-height: 2.05;
  padding-top: 2px;
  position: relative;
}

.code-gutter::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.code-body {
  padding-right: 4px;
}

.code-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(520px 240px at 85% 0%, rgba(15, 123, 108, 0.1), transparent 62%);
  pointer-events: none;
  opacity: 0.28;
}

.code-window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin: -20px -22px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 1;
}

.code-window-bar::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -1px;
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 213, 198, 0.5), transparent);
}

.code-window .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.code-window .dot.red {
  background: #ff5f56;
}

.code-window .dot.yellow {
  background: #ffbd2e;
}

.code-window .dot.green {
  background: #27c93f;
}

.code-window .code-title {
  margin-left: 6px;
  position: relative;
}

.code-window .code-title::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 10px;
  margin-left: 6px;
  border-radius: 2px;
  background: rgba(125, 213, 198, 0.8);
  animation: codeCursor 1.2s steps(1) infinite;
  vertical-align: middle;
}

.code-window:hover {
  transform: translateY(-6px);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.6);
}

.code-window:hover .code-window-bar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.code-window .section-subtitle,
.code-window h1,
.code-window h2,
.code-window h3,
.code-window p,
.code-window li,
.code-window a,
.code-window span,
.code-window strong {
  color: #e6e6e6;
}

.code-window .about-cv-role,
.code-window .about-cv-lead {
  color: rgba(230, 230, 230, 0.7);
}

.code-window .about-cv-list {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.code-window .about-cv-list li::before {
  background: #7dd5c6;
}

.code-window .about-cv-pill {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(230, 230, 230, 0.7);
}

.code-window .skills-list,
.code-window .timeline,
.code-window .profile-meta,
.code-window .about-cv-meta {
  color: rgba(230, 230, 230, 0.7);
}

.code-window .stats-grid .stat-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.code-window .about-actions .button {
  border-color: rgba(255, 255, 255, 0.2);
  color: #f2f2f2;
}

.code-window .about-actions .button.primary {
  background: #0f7b6c;
  border-color: #0f7b6c;
  box-shadow: 0 10px 20px rgba(15, 123, 108, 0.3);
}

.code-window .about-actions .button.primary:hover {
  filter: brightness(1.05);
}

.code-window .about-actions .button.ghost {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.code-window .about-actions .button.ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

@keyframes codeCursor {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

.about-cv-name {
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  line-height: 1.05;
}

.about-cv-role {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  opacity: 0.85;
}

.about-cv-lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 18px;
}

.about-cv-list {
  display: grid;
  gap: 8px;
  padding-left: 14px;
  margin: 0 0 18px;
  border-left: 2px solid var(--border);
  color: var(--text);
}

.about-cv-list li {
  position: relative;
  padding-left: 12px;
  line-height: 1.6;
}

.about-cv-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.about-cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 22px;
}

.about-cv-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.about-cv-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.code-window.about-cv-card,
.code-window.about-cv-intro {
  background: #0b0b0f;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.about-cv-card--stats .stat-card {
  background: var(--surface-dark);
}

body[data-theme="dark"] .about-cv-lead {
  color: rgba(255, 255, 255, 0.78);
}

body[data-theme="dark"] .about-cv-list {
  border-left-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .about-cv-pill {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .about-cv-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    var(--surface-dark);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .about-cv-card--stats .stat-card {
  background: rgba(0, 0, 0, 0.35);
}

.about-cv-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.about-cv-meta {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 12px;
}

.about-cv .skills-list {
  gap: 8px;
}

.about-cv-intro {
  text-align: left;
}

.project-card .content {
  padding: 14px 16px 18px;
  position: relative;
  z-index: 1;
  text-align: left;
}

.project-card h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.project-card p {
  color: var(--muted);
  font-size: 14px;
}

.project-card .tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: inline-block;
}

body[data-theme="dark"] .project-card .tag {
  color: #7dd5c6;
}

.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab-button {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.2s ease;
}

body[data-theme="dark"] .tab-button {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.75);
}

.tab-button.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

body[data-theme="dark"] .tab-button.active {
  background: #f4f4f4;
  color: #0b0b0b;
  border-color: #f4f4f4;
}

.projects-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.about-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.about-grid.contact-stack {
  grid-template-columns: 1fr;
  max-width: 920px;
  margin: 0 auto;
}

.about-card {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.contact-card {
  text-align: left;
}

.contact-card .section-subtitle,
.contact-card h3 {
  text-align: left;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.contact-list li {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 4px;
}

.contact-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-value {
  font-weight: 500;
}

.contact-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.contact-actions .button {
  padding: 10px 16px;
}

.contact-actions .button.accent {
  box-shadow: 0 10px 20px rgba(15, 123, 108, 0.2);
}

.contact-actions .button.accent:hover {
  box-shadow: 0 14px 26px rgba(15, 123, 108, 0.28);
}

.contact-list a {
  color: inherit;
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-card .button {
  justify-content: center;
}

.contact-card .button.accent {
  border-color: transparent;
}

.contact-card .button.accent:hover {
  border-color: transparent;
}

.contact-list li:last-child {
  border-style: dashed;
}

body[data-theme="dark"] .contact-list li {
  background: rgba(15, 15, 15, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  text-align: center;
}

.about-cv .timeline-item {
  text-align: left;
}

.timeline-item span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.case-hero {
  padding: 140px 0 60px;
  background: #0b0b0b;
  color: #fff;
}

.case-hero .container {
  display: grid;
  gap: 28px;
}

.case-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  text-align: center;
}

.case-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.case-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.case-list {
  padding-left: 20px;
  list-style: disc;
  color: #111;
}

.case-list li {
  margin-bottom: 10px;
}

.case-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.case-table th,
.case-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.case-table th {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery img {
  border-radius: 16px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.project-card:hover {
  cursor: pointer;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.modal-recommendations {
  margin-top: 24px;
}

.recommendations-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.recommendation-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.recommendation-card:hover {
  transform: translateY(-4px);
}

.recommendation-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.recommendation-card .info {
  padding: 10px 12px 14px;
  font-size: 13px;
}

.modal-content h4 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 16px;
}

.modal-case-full h4 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 18px;
}

.modal-case-full h4:first-child {
  margin-top: 8px;
}

.modal-case-full h5 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
}

.modal-case-full .table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

.modal-case-full .case-table {
  min-width: 760px;
}

.modal-case-full .case-grid {
  gap: 18px;
}

.modal-content p,
.modal-content ul {
  color: var(--muted);
}

.modal-metrics {
  list-style: disc;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.nav-link {
  font-size: 14px;
}

.nav-telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.nav-telegram .icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #f6f6f2;
  color: var(--text);
}

body[data-theme="dark"] .nav-telegram .icon-circle {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.theme-switch .track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(40, 40, 40, 0.35), rgba(220, 220, 220, 0.7));
  position: relative;
}

.theme-switch .thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  position: absolute;
  top: 3px;
  left: 4px;
  transition: transform 0.2s ease;
}

.theme-switch svg {
  width: 18px;
  height: 18px;
  color: #5b5b5b;
}

body[data-theme="dark"] .nav-telegram {
  background: rgba(255, 255, 255, 0.02);
  color: #f2f2f2;
}

body[data-theme="dark"] .theme-switch {
  background: var(--surface);
}

body[data-theme="dark"] .theme-switch .track {
  background: linear-gradient(90deg, rgba(120, 120, 120, 0.45), rgba(25, 25, 25, 0.45));
}

body[data-theme="dark"] .theme-switch .thumb {
  transform: translateX(20px);
  background: #f4f4f4;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .theme-switch svg {
  color: #f4f4f4;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 12px;
}

.tag-pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 10px;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer {
  padding: 60px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer a {
  color: var(--muted);
  font-size: 14px;
}

.footer a:hover {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  filter: blur(14px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.modal[aria-hidden="false"],
.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

.modal-content {
  width: min(1100px, 92vw);
  background: var(--surface);
  border-radius: 0;
  padding: 28px;
  position: relative;
  z-index: 1;
  max-height: 100vh;
  overflow: auto;
  opacity: 0;
  transform: translate3d(120px, 0, 0);
  transition: opacity 0.45s ease, transform 0.45s ease;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  color: var(--text);
  will-change: transform, opacity;
}

.modal-project {
  align-items: stretch;
}

.modal-project .modal-content {
  width: min(50vw, 900px);
  height: 100vh;
  max-height: 100vh;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.35);
  margin-left: auto;
  align-self: stretch;
}

.modal-side {
  flex: 1;
  min-width: 280px;
  max-width: 520px;
  padding: 48px 40px;
  display: grid;
  gap: 18px;
  color: #f4f4f4;
  opacity: 0;
  transform: translate3d(-24px, 0, 0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.modal.active .modal-side,
.modal[aria-hidden="false"] .modal-side {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.modal-side-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 10px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-side h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
}

.modal-side p {
  color: rgba(255, 255, 255, 0.75);
}

.modal-side .tag-pill {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.modal-side .section-subtitle {
  text-align: left;
  color: rgba(255, 255, 255, 0.6);
}

.metro-line {
  display: grid;
  gap: 8px;
  position: relative;
  padding-left: 0;
}

.metro-line::before {
  content: none;
}

.metro-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.metro-item::before {
  content: none;
}

.metro-index {
  display: none;
}

.metro-text {
  display: grid;
  gap: 2px;
}

.metro-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.metro-item small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

body:not([data-theme="dark"]) .metro-item {
  border-color: rgba(11, 11, 11, 0.12);
  background: rgba(11, 11, 11, 0.03);
}

body:not([data-theme="dark"]) .metro-title {
  color: rgba(11, 11, 11, 0.85);
}

body:not([data-theme="dark"]) .metro-item small {
  color: rgba(11, 11, 11, 0.6);
}

body:not([data-theme="dark"]) .modal-side-card {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(11, 11, 11, 0.12);
}

@media (max-width: 980px) {
  .modal-side {
    display: none;
  }
  .modal-project .modal-content {
    width: min(92vw, 900px);
  }
}

.modal.active .modal-content,
.modal[aria-hidden="false"] .modal-content {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.modal-handle {
  width: 68px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  margin: 0 auto 16px;
}

body[data-theme="dark"] .modal-handle {
  background: rgba(255, 255, 255, 0.2);
}

form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

label.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

input,
select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  background: #fff;
}

input[type=\"checkbox\"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.modal-cover {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: #0b0b0b;
  padding: 6px;
}

.modal-cover img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
  filter: brightness(0.5) contrast(1.05);
}

.modal.active .modal-cover img,
.modal[aria-hidden="false"] .modal-cover img {
  opacity: 1;
  transform: scale(1);
}

body[data-theme="dark"] .modal-close {
  color: #f4f4f4;
}

.modal-gallery {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding: 6px 0 18px;
}

.modal-gallery-card {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #0c0c0c;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  filter: blur(12px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
  padding: 8px;
}

.modal.active .modal-gallery-card,
.modal[aria-hidden="false"] .modal-gallery-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.modal-gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateZ(0);
  object-fit: contain;
  filter: brightness(0.5) contrast(1.05);
}

.modal-gallery-story {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(12, 14, 16, 0.94), rgba(10, 10, 10, 0.9));
  padding: 16px 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  filter: blur(0);
}

.modal-gallery-story h4 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.modal-gallery-story p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.story-kicker {
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-story-intro {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.modal-story-inline {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.modal-story-inline h5 {
  margin: 0 0 6px;
  font-size: 14px;
}

.modal-story-inline p {
  margin: 0;
}

.modal.active .modal-gallery-story,
.modal[aria-hidden="false"] .modal-gallery-story {
  filter: blur(0);
}

body[data-theme="dark"] .modal-gallery-card {
  background: #0b0b0b;
}

.modal-void {
  filter: blur(10px);
  transition: filter 0.6s ease;
}

@keyframes voidIn {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.97);
    filter: blur(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-void {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 80vh;
  border-radius: 18px;
}

.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox .prev {
  left: 20px;
}

.lightbox .next {
  right: 20px;
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .mobile-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .mobile-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .mobile-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.page-enter {
  opacity: 0;
  transform: translateX(24px);
}

body.page-loaded {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.page-exit {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.modal-open,
body.modal-open.page-enter,
body.modal-open.page-loaded,
body.modal-open.page-exit {
  transform: none !important;
  transition: none !important;
}

.case-hero .container {
  opacity: 0;
  transform: translateY(30px);
}

body.page-loaded .case-hero .container {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  70% {
    opacity: 1;
    transform: translateY(-6px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawerIn {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes sheetIn {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes drawerItem {
  0% {
    opacity: 0;
    transform: translateX(18px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 220;
    background: #050505;
    backdrop-filter: blur(18px);
    flex-direction: column;
    padding: 96px 28px 36px;
    display: flex;
    gap: 16px;
    width: 100vw;
    max-width: none;
    min-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-100%);
    opacity: 1;
    pointer-events: none;
    transition: transform 0.3s ease;
    border: none;
    box-shadow: none;
  }

  .nav-links.open {
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-tools {
    display: none;
  }

  .hero {
    padding: 110px 0 80px;
  }

  .nav {
    padding: 14px 0;
    gap: 12px;
  }

  .logo {
    font-size: 13px;
    letter-spacing: 0.22em;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-project .modal-content {
    width: 100vw;
  }
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 210;
}

body.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open header {
  z-index: 230;
}

@media (max-width: 860px) {
  .nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 24px;
    line-height: 1;
  }

  .nav-links a {
    font-size: 18px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links {
    gap: 8px;
  }

  body:not([data-theme="dark"]) .nav-links {
    background: #f7f7f4;
    color: #0b0b0b;
  }

  body:not([data-theme="dark"]) .nav-links a {
    border-bottom: 1px solid rgba(11, 11, 11, 0.08);
  }

  body:not([data-theme="dark"]) .nav-close {
    border-color: rgba(11, 11, 11, 0.2);
    background: rgba(11, 11, 11, 0.05);
    color: #0b0b0b;
  }
}

@media (min-width: 900px) {
  .featured-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .section {
    padding: 80px 0;
  }

  .case-hero {
    padding: 110px 0 40px;
  }

  .case-hero .container {
    gap: 18px;
  }

  .case-grid {
    gap: 24px;
  }

  .case-list {
    padding-left: 18px;
  }

  .case-list li {
    margin-bottom: 8px;
  }

  .case-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 640px;
  }

  .case-table th,
  .case-table td {
    padding: 10px 12px;
    font-size: 14px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .lead {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 96px 0 64px;
  }

  .case-hero h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .nav {
    padding: 14px 0;
  }

  .nav-links {
    padding-top: 88px;
  }
}
