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

:root {
  --bg: #FCFCFC;
  --dark: #1C2134;
  --accent: #65362A;
  --muted: #9A9A9A;
  --border: #E8E8E8;
  --dark-card: #2A3050;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; color: var(--dark); font-family: 'Montserrat', sans-serif; background: var(--bg); -webkit-font-smoothing: antialiased; }

/* ── HEADER ── */
header {
  position: fixed; top: 0; right: 0; left: 0; z-index: 100; border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: box-shadow 0.2s ease;
}
header.scrolled { box-shadow: 0 2px 16px rgba(28,33,52,0.07); }
.header-inner { display: flex; justify-content: center; align-items: center;
  max-width: 1280px;
  height: 64px; margin: 0 auto; padding: 0 48px;
}
.logo { color: var(--dark); font-weight: 600;
  font-size: 15px; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
}
nav { display: flex; align-items: center; gap: 32px; }
nav a { color: var(--dark); font-weight: 500;
  font-size: 13px; letter-spacing: 0.08em;
  text-decoration: none; text-transform: uppercase;
  transition: color 0.2s ease;
}
nav a:hover { color: var(--accent); }

/* burger */
.burger { display: none; flex-direction: column; gap: 5px; border: none; padding: 4px; background: none; cursor: pointer; }
.burger span { display: block; width: 22px; height: 1.5px; background: var(--dark); transition: 0.2s ease; }

.mobile-menu { position: fixed; top: 64px; right: 0; bottom: 0; left: 0; z-index: 99;
  display: none; flex-direction: column; gap: 32px; border-top: 1px solid var(--border);
  padding: 40px 32px;
  background: var(--bg);
}
.mobile-menu.open { display: flex; align-items: center; }
.mobile-menu a { color: var(--dark); font-weight: 600;
  font-size: 16px; letter-spacing: 0.08em;
  text-decoration: none; text-transform: uppercase;
  transition: color 0.2s ease;
}
.mobile-menu a:hover { color: var(--accent); }

/* ── SECTIONS ── */
section { padding: 110px 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

/* ── HERO ── */
#hero { padding-top: 160px; padding-bottom: 110px; background: var(--bg); }
.hero-grid { display: grid; grid-template-columns: 60fr 40fr; align-items: start; gap: 64px; }
.hero-tag {
  display: inline-block; margin-bottom: 28px;
  border: 1px solid var(--accent); padding: 6px 14px; color: var(--accent); font-weight: 600; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-title { color: var(--dark); font-weight: 700; font-size: 64px; line-height: 1.05; letter-spacing: -0.02em; }
.hero-sub { max-width: 480px; margin-top: 20px; color: var(--muted); font-weight: 400; font-size: 18px; line-height: 1.6; }
.btn-primary {
  display: inline-block; margin-top: 44px; border: none;
  border-radius: 10px;
  padding: 15px 36px; color: var(--bg);
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-decoration: none;
  text-transform: uppercase;
  background: var(--accent);
  transition: opacity 0.2s ease; cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; }
.hero-img {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.hero-img img {
  display: block;
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
}
.img-label { padding: 12px; color: #AAAAAA;
  font-family: monospace; font-size: 11px; line-height: 1.6;
  text-align: center;
}

/* ── ABOUT ── */
#about { background: var(--bg); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
}
.about-card { padding: 52px 48px; }
.about-card:first-child { border-right: 1px solid var(--border); }
.stat-number { color: var(--accent); font-weight: 700; font-size: 56px; line-height: 1; }
.stat-label { margin-top: 8px; color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.about-text { margin-top: 24px; color: var(--dark); font-weight: 400; font-size: 15px; line-height: 1.75; }

/* ── DIPLOMAS ── */
#diplomas { background: var(--dark); }
#diplomas .section-title { margin-bottom: 60px; color: var(--bg); }
.diplomas-grid { display: grid; grid-template-columns: 55fr 45fr; align-items: start; gap: 80px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { border-bottom: 1px solid rgba(252,252,252,0.12); padding: 32px 0; }
.timeline-item:first-child { padding-top: 0; }
.timeline-year { margin-bottom: 16px; color: var(--accent); font-weight: 700; font-size: 28px; }
.timeline-entry { margin-bottom: 8px; color: rgba(252,252,252,0.82); font-weight: 400; font-size: 15px; line-height: 1.7; }
.timeline-entry:last-child { margin-bottom: 0; }
.timeline-entry strong { color: var(--bg); font-weight: 600; }
.diploma-img {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 2/2;
}
.diploma-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── COMPETENCIES ── */
#competencies { background: var(--bg); }
.section-title { margin-bottom: 56px; color: var(--dark); font-weight: 600; font-size: 36px; line-height: 1.2; }
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.comp-card {
  position: relative;
  display: flex; flex-direction: column; min-height: 260px; margin: -1px;
  border: 1px solid transparent; padding: 36px 32px;
  background: var(--bg);
  transition: border-color 0.2s ease;
}
.comp-card:hover { z-index: 1; border-color: var(--accent); }
.comp-title { margin-bottom: 16px; color: var(--dark); font-weight: 600; font-size: 15px; line-height: 1.4; }
.comp-text { flex: 1; color: var(--muted); font-weight: 400; font-size: 14px; line-height: 1.7; }
.comp-link {
  display: inline-block; margin-top: 24px;
  color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.comp-link:hover { opacity: 0.7; }

/* ── CASES ── */
#cases { background: #F4F4F4; }
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card { min-width: 0; border: 1px solid var(--border); overflow: hidden; background: var(--bg); }
.case-img {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.case-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-body { padding: 28px 24px 32px; }
.case-brand { margin-bottom: 12px; color: var(--dark); font-weight: 600; font-size: 18px; }
.case-text { color: var(--dark); font-weight: 400; font-size: 14px; line-height: 1.75; }

/* ── FOOTER ── */
#contacts { padding: 100px 0 0; background: var(--dark); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding-bottom: 80px; }
.footer-title { margin-bottom: 40px; color: var(--bg); font-weight: 600; font-size: 22px; line-height: 1.4; }
.form-field { margin-bottom: 28px; }
.form-field input {
  width: 100%; border: none; border-bottom: 1px solid rgba(252,252,252,0.35);
  padding: 12px 0; outline: none;
  color: var(--bg); font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 15px; background: transparent; transition: border-color 0.2s ease;
}
.form-field input::placeholder { color: rgba(252,252,252,0.4); }
.form-field input:focus { border-bottom-color: rgba(252,252,252,0.8); }
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 44px; }
.footer-nav a { color: rgba(252,252,252,0.65); font-weight: 500;
  font-size: 13px; letter-spacing: 0.08em;
  text-decoration: none; text-transform: uppercase;
  transition: color 0.2s ease;
}
.footer-nav a:hover { color: var(--bg); }
.socials { display: flex; gap: 20px; }
.social-link { display: flex; justify-content: center; align-items: center;
  width: 20px; height: 20px;
  color: var(--bg); text-decoration: none; transition: color 0.2s ease;
}
.social-link:hover { color: var(--accent); }
.social-link svg { width: 20px; height: 20px; fill: currentColor; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(252,252,252,0.10); padding: 24px 0;
}
.footer-copy { color: var(--muted); font-size: 12px; }
.footer-credit { color: var(--muted); font-size: 12px; text-decoration: none; transition: color 0.2s ease; }
.footer-credit:hover { color: var(--bg); }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .header-inner { padding: 0 32px; }
  .container { padding: 0 32px; }
  .hero-title { font-size: 52px; }
  .comp-grid { grid-template-columns: repeat(2, 1fr); }
  .comp-card {
    border-color: var(--accent);
  }
}
@media (max-width: 768px) {
  nav { display: none; }
  .burger { display: flex; }
  .header-inner { padding: 0 24px; }
  .container { padding: 0 24px; }
  section { padding: 56px 0; }
  #hero { padding-top: 120px; padding-bottom: 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-title { font-size: 40px; }
  .hero-sub { margin-right: auto; margin-left: auto; font-size: 16px; }
  .hero-img { aspect-ratio: 4/3; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .about-card { padding: 40px 28px; }
  .diplomas-grid { grid-template-columns: 1fr; }
  .diploma-img { aspect-ratio: 16/9; }
  .section-title { margin-bottom: 40px; font-size: 26px; }
  .comp-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 56px; padding-bottom: 56px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── TWEAKS PANEL ── */
#tweaks-panel { position: fixed; right: 24px; bottom: 24px; z-index: 999;
  display: none; width: 280px; border: 1px solid rgba(255,255,255,0.1);
  padding: 24px; box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  background: var(--dark);
}
#tweaks-panel.visible { display: block; }
.tweaks-title { margin-bottom: 20px; color: rgba(255,255,255,0.5); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.tweak-row { margin-bottom: 16px; }
.tweak-label { display: block; margin-bottom: 8px; color: rgba(255,255,255,0.6); font-weight: 500; font-size: 12px; }
.tweak-options { display: flex; flex-wrap: wrap; gap: 8px; }
.tweak-btn { border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 12px; color: rgba(255,255,255,0.7); font-family: 'Montserrat', sans-serif; font-weight: 600;
  font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent; transition: 0.2s ease; cursor: pointer;
}
.tweak-btn:hover, .tweak-btn.active { border-color: var(--accent); color: #fff; background: var(--accent); }
.tweak-swatch { width: 28px; height: 28px; border: 2px solid transparent; transition: 0.2s; cursor: pointer; }
.tweak-swatch.active { border-color: #fff; }
