:root {
  --bg: #f7f3eb;
  --paper: #fffaf2;
  --white: #ffffff;
  --text: #171717;
  --muted: #6f6a61;
  --line: rgba(23, 23, 23, 0.1);
  --gold: #b88746;
  --gold-2: #d6a75f;
  --gold-light: #e8c68d;
  --graphite: #252525;
  --green: #52634a;
  --radius: 30px;
  --shadow: 0 24px 70px rgba(42, 31, 18, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 198, 141, 0.28), transparent 34%),
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(180deg, #f8f3ea 0%, #f5efe5 48%, #fbf7ef 100%);
  color: var(--text);
  overflow-x: hidden;
}

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

[hidden] {
  display: none !important;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(184, 135, 70, 0.48);
  outline-offset: 4px;
}

.decor-line {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(184, 135, 70, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 135, 70, 0.14) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(247, 243, 235, 0.84);
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  backdrop-filter: blur(16px);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  display: block;
  overflow: hidden;
  background: #020817;
  box-shadow: 0 15px 40px rgba(0, 120, 255, 0.18);
}

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

.menu {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: #4a443c;
}

.menu a { transition: 0.22s; }
.menu a:hover { color: var(--gold); }

.nav-btn {
  padding: 11px 18px;
  border-radius: 999px;
  color: white;
  background: var(--graphite);
  box-shadow: 0 12px 35px rgba(23, 23, 23, 0.16);
  transition: 0.24s;
}

.nav-btn:hover { transform: translateY(-2px); background: #000; }


.mobile-menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #181818;
  box-shadow: 0 12px 32px rgba(42, 31, 18, 0.08);
  cursor: pointer;
  transition: 0.22s ease;
}

.mobile-menu-btn:hover { transform: translateY(-2px); }

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 82px;
  z-index: 70;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid rgba(255,255,255,0.88);
  box-shadow: 0 24px 70px rgba(42, 31, 18, 0.18);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 13px 15px;
  border-radius: 18px;
  color: #302a23;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(23, 23, 23, 0.07);
  font-weight: 780;
  transition: 0.2s ease;
}

.mobile-nav a::after {
  content: "→";
  color: #8b602d;
  opacity: 0.8;
}

.mobile-nav a:hover {
  color: white;
  background: #181818;
  transform: translateX(2px);
}

.mobile-nav a:hover::after { color: #e8c68d; }

.mobile-nav-contact {
  color: white !important;
  background: linear-gradient(135deg, #181818, #8b602d) !important;
}

.mobile-nav-contact::after { color: #f9e8c9 !important; }

.mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(23, 23, 23, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mobile-menu-open { overflow: hidden; }

.container {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  padding-top: 112px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 58px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid rgba(184, 135, 70, 0.24);
  background: rgba(255, 255, 255, 0.55);
  color: #6d4b1f;
  font-size: 14px;
  box-shadow: 0 12px 35px rgba(184, 135, 70, 0.08);
}

h1 {
  margin: 28px 0 0;
  font-size: clamp(58px, 8vw, 106px);
  line-height: 0.93;
  letter-spacing: -0.075em;
  color: #161616;
}

.gold-text {
  display: block;
  background: linear-gradient(90deg, #191919, #8b602d, #d6a75f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin-top: 26px;
  max-width: 700px;
  color: #3f3a34;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.38;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.hero-text {
  margin-top: 24px;
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.24s;
  border: 0;
  cursor: pointer;
}

.btn-dark {
  color: white;
  background: #181818;
  box-shadow: 0 18px 50px rgba(23, 23, 23, 0.18);
}

.btn-light {
  color: #181818;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(23, 23, 23, 0.1);
}

.btn:hover { transform: translateY(-3px); }

.portrait-wrap {
  position: relative;
  width: min(100%, 470px);
  max-width: 470px;
  min-width: 0;
  margin: 0 auto;
}

.portrait-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: clamp(460px, 72vh, 560px);
  border-radius: 44px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(232,198,141,0.36));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slowFloat 7s ease-in-out infinite;
}

@keyframes slowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.portrait-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 32px;
  background: #211d19 url("oleg-agnaev-hero.webp") center top / cover no-repeat;
  color: white;
  overflow: hidden;
  isolation: isolate;
}

.portrait-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: scale(1.015);
  filter: saturate(1.02) contrast(1.02);
}

.portrait-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18) 0%, transparent 34%, rgba(0,0,0,0.68) 100%),
    radial-gradient(circle at 18% 12%, rgba(232,198,141,0.26), transparent 30%);
  pointer-events: none;
}

.portrait-inner::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(232, 198, 141, 0.23);
  filter: blur(2px);
  pointer-events: none;
}

.portrait-top {
  position: absolute;
  z-index: 2;
  top: 30px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  opacity: 0.96;
}

.portrait-label {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.initials {
  position: relative;
  z-index: 2;
  width: 190px;
  height: 190px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 72px;
  font-weight: 950;
  letter-spacing: -0.08em;
  box-shadow: inset 0 0 40px rgba(255,255,255,0.14), 0 30px 70px rgba(0,0,0,0.18);
}

.portrait-caption {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 152px;
  z-index: 2;
}

.portrait-name {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.055em;
  text-shadow: 0 14px 40px rgba(0,0,0,0.45);
}

.portrait-role {
  margin-top: 8px;
  color: rgba(255,255,255,0.82);
  font-weight: 760;
  letter-spacing: -0.01em;
}

.portrait-skills {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.portrait-skills div {
  padding: 14px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.17);
  font-weight: 780;
}

.floating-note {
  position: absolute;
  left: -28px;
  bottom: 34px;
  max-width: 238px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 22px 60px rgba(42,31,18,0.13);
  color: #2f2a24;
  animation: noteFloat 6s ease-in-out infinite;
}

@keyframes noteFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

section { padding: 86px 0; }
.section-head { margin-bottom: 36px; }

.section-head h2 {
  margin: 16px 0 0;
  max-width: 940px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.muted { color: var(--muted); line-height: 1.72; }

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

.card {
  position: relative;
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.82);
  box-shadow: 0 18px 55px rgba(42, 31, 18, 0.08);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,198,141,0.2), transparent 44%);
  opacity: 0;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-7px);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 24px 70px rgba(42, 31, 18, 0.13);
}

.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.stat-value {
  font-size: 42px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  margin-bottom: 22px;
  background: #1f1f1f;
  color: var(--gold-light);
  box-shadow: 0 16px 38px rgba(23,23,23,0.13);
  font-size: 24px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: stretch;
}

.year {
  border-radius: 24px;
  padding: 22px;
  background: #181818;
  color: #f7ead7;
  font-weight: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tag {
  display: inline-flex;
  padding: 8px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #6d4b1f;
  background: rgba(232,198,141,0.24);
  border: 1px solid rgba(184,135,70,0.18);
  font-size: 13px;
  font-weight: 720;
}

.project-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px 0 26px;
}

.filter-btn {
  border: 1px solid rgba(23,23,23,0.1);
  border-radius: 999px;
  padding: 11px 15px;
  color: #3f3a34;
  background: rgba(255,255,255,0.64);
  cursor: pointer;
  transition: 0.22s;
  font-weight: 750;
}

.filter-btn:hover, .filter-btn.active {
  color: white;
  background: #181818;
  border-color: #181818;
  transform: translateY(-2px);
}

.project-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-featured { grid-column: span 2; }

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.project-num {
  min-width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #f9e8c9;
  background: linear-gradient(135deg, #181818, #8b602d);
  font-weight: 900;
}

.project-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.project-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(23,23,23,0.08);
  color: #4a443c;
  font-size: 13px;
  font-weight: 700;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.project-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 999px;
  background: #181818;
  color: white;
  font-weight: 820;
  transition: 0.22s;
}

.project-toggle:hover { transform: translateY(-2px); }

.project-toggle .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.project-card.is-open .project-toggle .arrow { transform: rotate(180deg); }

.project-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.55s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.project-card.is-open .project-body {
  max-height: 980px;
  opacity: 1;
  margin-top: 24px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-box {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(23,23,23,0.08);
}

.detail-box strong { display: block; margin-bottom: 7px; }

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.project-media {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 18px;
  align-items: stretch;
}

.project-photo {
  margin: 0;
  min-height: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.86);
  box-shadow: 0 18px 50px rgba(42,31,18,0.1);
  background: #231f1b;
}

.project-photo img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
}

.project-photo figcaption {
  padding: 14px 18px;
  color: rgba(255,255,255,0.78);
  background: rgba(23,23,23,0.9);
  font-size: 13px;
}


.education-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: stretch;
}

.education-core {
  min-height: 100%;
  padding: 34px;
  border-radius: 34px;
  color: white;
  background:
    radial-gradient(circle at 25% 18%, rgba(232,198,141,0.38), transparent 30%),
    linear-gradient(145deg, #181818, #403326 58%, #8b602d);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.education-core .small-label {
  display: inline-flex;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.16);
  color: #f9e8c9;
  font-weight: 760;
  font-size: 13px;
  margin-bottom: 28px;
}

.education-core h3 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.education-core p {
  margin: 22px 0 0;
  color: rgba(255,255,255,0.76);
  line-height: 1.75;
  font-size: 17px;
}

.education-formula {
  margin-top: 30px;
  display: grid;
  gap: 10px;
}

.education-formula div {
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(255,255,255,0.11);
  border: 1px solid rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.9);
  font-weight: 760;
}

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

.edu-card {
  min-height: 210px;
}

.edu-card-wide {
  grid-column: span 2;
  min-height: auto;
}

.edu-kicker {
  margin-bottom: 14px;
  color: #8b602d;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leadership-note {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(232,198,141,0.18);
  border: 1px solid rgba(184,135,70,0.16);
  color: #3f3a34;
  line-height: 1.65;
}

.book {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  font-weight: 820;
}

.book-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, #181818, #8b602d);
}


.cooperation-section {
  padding-top: 40px;
}

.cooperation-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: stretch;
  padding: 42px;
  border-radius: 38px;
  color: white;
  background:
    radial-gradient(circle at 18% 16%, rgba(232,198,141,0.42), transparent 30%),
    linear-gradient(135deg, #181818, #2f2a24 58%, #8b602d);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cooperation-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -140px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(232,198,141,0.2);
  pointer-events: none;
}

.cooperation-content,
.cooperation-side {
  position: relative;
  z-index: 1;
}

.cooperation-content h2 {
  margin: 18px 0 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.cooperation-lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255,255,255,0.74);
  font-size: 18px;
  line-height: 1.75;
}

.cooperation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.cooperation-side {
  display: grid;
  gap: 14px;
  align-content: center;
}

.cooperation-side-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
}

.cooperation-side-card span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #181818;
  background: #f9e8c9;
  font-weight: 900;
  font-size: 13px;
}

.cooperation-side-card strong {
  display: block;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.cooperation-side-card p {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
}

.cooperation-head {
  margin-top: 56px;
}

.cooperation-card {
  min-height: 280px;
}

.cooperation-bottom {
  margin-top: 18px;
  padding: 24px 28px;
  border-radius: 28px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.84);
  box-shadow: 0 18px 55px rgba(42, 31, 18, 0.08);
  color: #302a23;
  line-height: 1.7;
}

.cooperation-bottom strong {
  margin-right: 8px;
}

.contact-card {
  padding: 42px;
  background: linear-gradient(135deg, #181818, #3b3025 58%, #8b602d);
  color: white;
  border-radius: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contact-card .muted { color: rgba(255,255,255,0.72); }
.contact-card .eyebrow { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.16); color: #f9e8c9; }

footer {
  padding: 34px 22px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(23,23,23,0.08);
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }

/* Utility classes moved from inline style attributes */
.u-mt-0 { margin-top: 0; }
.u-mt-7 { margin-top: 7px; }
.u-mt-14 { margin-top: 14px; }
.u-mt-18 { margin-top: 18px; }
.u-text-18 { font-size: 18px; }
.u-max-720 { max-width: 720px; }
.u-max-820 { max-width: 820px; }
.u-max-860 { max-width: 860px; }
.u-max-880 { max-width: 880px; }
.contact-title {
  margin: 18px 0 0;
  font-size: clamp(32px, 5vw, 50px);
  letter-spacing: -0.05em;
}

@media (max-width: 980px) {
  .menu { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .hero, .about-grid, .contact-card, .project-media, .education-layout, .cooperation-hero { grid-template-columns: 1fr; }
  .hero { padding-top: 138px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .project-featured { grid-column: span 1; }
  .floating-note { left: 18px; }
  .timeline-item { grid-template-columns: 1fr; }
  .year { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .container { width: min(100% - 30px, 1180px); }
  .nav { padding: 14px 15px; }
  .brand { gap: 10px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; }
  .mobile-nav { top: 76px; left: 12px; right: 12px; border-radius: 24px; }
  .nav-btn { display: none; }
  .grid-4, .grid-3, .grid-2, .project-detail-grid, .education-map { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
  .portrait-card { border-radius: 32px; min-height: clamp(390px, 62vh, 500px); }
  .portrait-top { top: 22px; left: 22px; right: 22px; }
  .portrait-caption { left: 22px; right: 22px; bottom: 140px; }
  .portrait-skills { left: 22px; right: 22px; bottom: 22px; }
  .initials { width: 150px; height: 150px; font-size: 58px; }
  .floating-note { position: static; margin-top: 16px; max-width: none; }
  .cooperation-hero { padding: 30px 22px; border-radius: 30px; }
  .cooperation-actions { flex-direction: column; }
  .cooperation-bottom { padding: 22px; }
  section { padding: 64px 0; }
  .project-card { min-height: auto; }
  .project-top { flex-direction: column-reverse; }
  .project-photo img { min-height: 240px; }
  .edu-card-wide { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}





.books-section {
  padding-top: 40px;
}

.books-coverflow {
  position: relative;
  min-height: 560px;
  margin-top: 4px;
  overflow: hidden;
  perspective: 1800px;
  isolation: isolate;
}

.books-stage {
  position: relative;
  height: 540px;
  transform-style: preserve-3d;
  touch-action: pan-y;
  cursor: grab;
  outline: none;
}

.books-stage:active {
  cursor: grabbing;
}

.book-stage-card {
  position: absolute;
  top: 38px;
  left: 50%;
  width: 304px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transform-origin: center center;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.62s cubic-bezier(.2,.8,.2,1),
    opacity 0.42s ease,
    filter 0.42s ease;
}

.book-stage-card.is-center,
.book-stage-card.pos-left-1,
.book-stage-card.pos-left-2,
.book-stage-card.pos-left-3,
.book-stage-card.pos-right-1,
.book-stage-card.pos-right-2,
.book-stage-card.pos-right-3 {
  pointer-events: auto;
}

.book-stage-card.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.book-stage-card.is-center {
  z-index: 70;
  opacity: 1;
  transform: translateX(-50%) translateY(0) translateZ(120px) rotateY(0deg) scale(1.08);
  filter: none;
}

.book-stage-card.pos-left-1 {
  z-index: 55;
  opacity: 0.94;
  transform: translateX(calc(-50% - 178px)) translateY(34px) translateZ(20px) rotateY(28deg) scale(0.82);
  filter: saturate(0.96) contrast(0.98);
}

.book-stage-card.pos-right-1 {
  z-index: 55;
  opacity: 0.94;
  transform: translateX(calc(-50% + 178px)) translateY(34px) translateZ(20px) rotateY(-28deg) scale(0.82);
  filter: saturate(0.96) contrast(0.98);
}

.book-stage-card.pos-left-2 {
  z-index: 35;
  opacity: 0.68;
  transform: translateX(calc(-50% - 318px)) translateY(76px) translateZ(-80px) rotateY(42deg) scale(0.66);
  filter: saturate(0.88) contrast(0.94);
}

.book-stage-card.pos-right-2 {
  z-index: 35;
  opacity: 0.68;
  transform: translateX(calc(-50% + 318px)) translateY(76px) translateZ(-80px) rotateY(-42deg) scale(0.66);
  filter: saturate(0.88) contrast(0.94);
}

.book-stage-card.pos-left-3 {
  z-index: 20;
  opacity: 0.42;
  transform: translateX(calc(-50% - 430px)) translateY(112px) translateZ(-160px) rotateY(54deg) scale(0.54);
  filter: saturate(0.78) contrast(0.9) blur(0.2px);
}

.book-stage-card.pos-right-3 {
  z-index: 20;
  opacity: 0.42;
  transform: translateX(calc(-50% + 430px)) translateY(112px) translateZ(-160px) rotateY(-54deg) scale(0.54);
  filter: saturate(0.78) contrast(0.9) blur(0.2px);
}

.book-page {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #fffaf2;
  box-shadow:
    0 34px 80px rgba(42,31,18,0.24),
    0 4px 14px rgba(42,31,18,0.08);
  backface-visibility: hidden;
}

.book-page::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  box-shadow:
    inset 16px 0 24px rgba(42,31,18,0.12),
    inset -2px 0 0 rgba(255,255,255,0.8);
  pointer-events: none;
  z-index: 2;
}


.book-stage-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: block;
  object-fit: cover;
  border-radius: 0;
  background: #fffaf2;
  opacity: 1;
  backface-visibility: hidden;
}


.books-nav-btn {
  position: absolute;
  top: 50%;
  z-index: 90;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #181818;
  cursor: pointer;
  transition: transform 0.22s ease, color 0.22s ease, opacity 0.22s ease;
  box-shadow: none;
  font-size: 28px;
  font-weight: 900;
}

.books-nav-btn-left {
  left: 4px;
  transform: translateY(-50%);
}

.books-nav-btn-right {
  right: 4px;
  transform: translateY(-50%);
}

.books-nav-btn:hover:not(:disabled) {
  color: #8b602d;
}

.books-nav-btn-left:hover:not(:disabled) {
  transform: translateY(-50%) translateX(-2px);
}

.books-nav-btn-right:hover:not(:disabled) {
  transform: translateY(-50%) translateX(2px);
}

.books-nav-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.books-active-info {
  max-width: 920px;
  margin: 4px auto 0;
  text-align: center;
}

.books-active-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.books-tag {
  margin-bottom: 0;
}

.books-counter {
  color: #6d4b1f;
  font-weight: 780;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.books-detail-title {
  margin: 18px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.books-detail-author {
  margin-top: 10px;
  color: #8b602d;
  font-size: 18px;
  font-weight: 760;
}

.books-detail-text {
  max-width: 820px;
  margin: 16px auto 0;
  font-size: 17px;
}

@media (max-width: 980px) {
  .books-coverflow {
    min-height: 520px;
  }

  .books-stage {
    height: 500px;
  }

  .book-stage-card {
    width: 262px;
    top: 44px;
  }

  .book-stage-card.is-center {
    transform: translateX(-50%) translateY(0) translateZ(100px) rotateY(0deg) scale(1.04);
  }

  .book-stage-card.pos-left-1 {
    transform: translateX(calc(-50% - 150px)) translateY(34px) translateZ(10px) rotateY(30deg) scale(0.78);
  }

  .book-stage-card.pos-right-1 {
    transform: translateX(calc(-50% + 150px)) translateY(34px) translateZ(10px) rotateY(-30deg) scale(0.78);
  }

  .book-stage-card.pos-left-2 {
    transform: translateX(calc(-50% - 260px)) translateY(76px) translateZ(-80px) rotateY(45deg) scale(0.62);
  }

  .book-stage-card.pos-right-2 {
    transform: translateX(calc(-50% + 260px)) translateY(76px) translateZ(-80px) rotateY(-45deg) scale(0.62);
  }

  .book-stage-card.pos-left-3,
  .book-stage-card.pos-right-3 {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 700px) {
  .books-coverflow {
    min-height: 390px;
    margin-left: -15px;
    margin-right: -15px;
    overflow: hidden;
  }

  .books-stage {
    height: 372px;
    overflow: hidden;
  }

  .book-stage-card {
    width: 196px;
    top: 36px;
    transition:
      transform 0.42s cubic-bezier(.2,.8,.2,1),
      opacity 0.28s ease;
  }

  .book-stage-card.is-center {
    z-index: 50;
    opacity: 1;
    transform: translateX(-50%) translateY(0) translateZ(80px) rotateY(0deg) scale(1);
    pointer-events: auto;
  }

  .book-stage-card.pos-left-1 {
    z-index: 28;
    opacity: 0.72;
    transform: translateX(calc(-50% - 112px)) translateY(38px) translateZ(0) rotateY(36deg) scale(0.72);
    pointer-events: auto;
  }

  .book-stage-card.pos-right-1 {
    z-index: 28;
    opacity: 0.72;
    transform: translateX(calc(-50% + 112px)) translateY(38px) translateZ(0) rotateY(-36deg) scale(0.72);
    pointer-events: auto;
  }

  .book-stage-card.pos-left-2,
  .book-stage-card.pos-right-2,
  .book-stage-card.pos-left-3,
  .book-stage-card.pos-right-3,
  .book-stage-card.is-hidden {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(0) translateZ(-260px) scale(0.42);
    transition: none;
  }

  .book-stage-card.is-hidden .book-page,
  .book-stage-card.pos-left-2 .book-page,
  .book-stage-card.pos-right-2 .book-page,
  .book-stage-card.pos-left-3 .book-page,
  .book-stage-card.pos-right-3 .book-page {
    box-shadow: none;
  }

  .book-stage-caption {
    display: none;
  }

  .books-nav-btn {
    width: 46px;
    height: 46px;
  }

  .books-nav-btn-left {
    left: 12px;
  }

  .books-nav-btn-right {
    right: 12px;
  }
}

.stat-value.is-counted {
  animation: statValuePop 0.42s ease both;
}

@keyframes statValuePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .stat-value.is-counted {
    animation: none;
  }
}


/* EN hero title: keep descenders like "g" from being clipped by tight hero line-height. */
body.en-page h1 {
  line-height: 1.02;
  padding-bottom: 0.07em;
}

body.en-page .gold-text {
  padding-bottom: 0.04em;
}
