:root {
  --bg-0: #0a0b0d;
  --bg-1: #0f1115;
  --bg-2: #161922;
  --bg-3: #1a1d27;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --text: #eef0f4;
  --text-dim: #b9bdc9;
  --text-mute: #7a8093;
  --accent: #c79862;
  --accent-2: #d8b27a;
  --accent-deep: #8a6a45;
  --shadow: 0 30px 80px rgba(0,0,0,0.5);
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.serif { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; }
em { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--accent-2); font-weight: 400; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
section { padding: 120px 0; position: relative; }

/* === HEADER === */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  background: rgba(10,11,13,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s;
}
.header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 14px; }
.logo-mark {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-text { font-family: 'Cormorant Garamond', serif; font-size: 19px; letter-spacing: 1px; }
.logo-text small { display: block; font-family: 'Manrope', sans-serif; font-size: 9px; letter-spacing: 3px; color: var(--text-mute); text-transform: uppercase; margin-top: 2px; }

.nav { display: flex; gap: 40px; }
.nav a { font-size: 13px; letter-spacing: 0.5px; color: var(--text-dim); transition: color 0.3s; }
.nav a:hover { color: var(--accent); }

.cta-link {
  border: 1px solid var(--accent);
  padding: 10px 22px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  transition: all 0.3s;
}
.cta-link:hover { background: var(--accent); color: var(--bg-0); }

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,13,0.4) 0%, rgba(10,11,13,0.95) 100%);
  z-index: 1;
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('/images/buildings/school-kurchatov.jpg');
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
  opacity: 0.42;
  filter: grayscale(0.15) contrast(1.05);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(199,152,98,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199,152,98,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}
.hero-content { position: relative; z-index: 2; max-width: 920px; }
.eyebrow { font-size: 12px; letter-spacing: 4px; color: var(--accent); text-transform: uppercase; margin-bottom: 32px; display: flex; align-items: center; gap: 16px; }
.eyebrow::before { content: ''; width: 50px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -1px;
  margin-bottom: 36px;
}
.hero h1 em { font-size: 1em; }
.hero-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 56px;
}
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 800px; }
.stat { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: 42px; color: var(--accent); line-height: 1; }
.stat-num small { font-size: 0.55em; color: var(--text-dim); }
.stat-label { font-size: 11px; letter-spacing: 2px; color: var(--text-mute); text-transform: uppercase; margin-top: 8px; }

/* === SECTION HEADERS === */
.section-head { margin-bottom: 80px; max-width: 800px; }
.section-tag { font-size: 11px; letter-spacing: 4px; color: var(--accent); text-transform: uppercase; margin-bottom: 24px; display: flex; align-items: center; gap: 14px; }
.section-tag::before { content: ''; width: 40px; height: 1px; background: var(--accent); }
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
}
.section-lead { font-size: 17px; color: var(--text-dim); line-height: 1.7; }

/* === ABOUT === */
.about { background: var(--bg-1); }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: start; }
.about-text p { margin-bottom: 24px; color: var(--text-dim); font-size: 16px; }
.about-meta { background: var(--bg-2); padding: 48px; border: 1px solid var(--line); }
.functions-list { list-style: none; padding: 0; margin: 32px 0; border-top: 1px solid var(--line); }
.functions-list li { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: start; }
.functions-list .fn-num { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 22px; color: var(--accent); letter-spacing: 1px; padding-top: 2px; }
.functions-list h5 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 20px; color: var(--text); margin: 0 0 8px; line-height: 1.25; }
.functions-list li p { font-size: 14px; color: var(--text-dim); line-height: 1.65; margin: 0; }
@media (max-width: 640px) { .functions-list li { grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 0; } .functions-list .fn-num { font-size: 18px; } }
.about-meta h4 { font-family: 'Cormorant Garamond', serif; font-size: 28px; margin-bottom: 32px; color: var(--accent); }
.meta-row { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.meta-row:last-child { border-bottom: none; }
.meta-row .label { color: var(--text-mute); }
.meta-row .value { color: var(--text); }

/* === SERVICES === */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--bg-1); padding: 40px 32px; transition: background 0.3s; }
.service:hover { background: var(--bg-2); }
.service-num { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--accent); margin-bottom: 32px; }
.service h3 { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400; margin-bottom: 16px; line-height: 1.2; }
.service p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* === FEATURED === */
.featured { background: var(--bg-1); }
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.featured-card { position: relative; overflow: hidden; border: 1px solid var(--line); cursor: pointer; }
.featured-card:first-child { grid-column: 1 / -1; }
.featured-img {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #14171d;
  transition: transform 0.8s;
}
.featured-card:hover .featured-img { transform: scale(1.04); }
.featured-card:first-child .featured-img { aspect-ratio: 16/9; }
.featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,11,13,0.95) 0%, rgba(10,11,13,0.3) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 40px;
}
.featured-card:first-child .featured-overlay { padding: 56px; }
.featured-cat { font-size: 11px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 16px; }
.featured-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 400; margin-bottom: 12px; }
.featured-card:first-child h3 { font-size: 48px; }
.featured-card p { font-size: 14px; color: var(--text-dim); }

/* === PROJECTS === */
.filter-bar {
  display: flex; gap: 8px; margin-bottom: 56px; flex-wrap: wrap;
  padding-bottom: 24px; border-bottom: 1px solid var(--line);
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  padding: 10px 20px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active { background: var(--accent); color: var(--bg-0); border-color: var(--accent); }
.filter-btn .count { margin-left: 8px; opacity: 0.6; font-size: 11px; }

.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.project-card { background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; transition: all 0.3s; overflow: hidden; }
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.project-img-wrap { aspect-ratio: 4/3; overflow: hidden; background: #14171d; position: relative; }
.project-img-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,11,13,0.55) 100%);
  pointer-events: none;
}
.project-img {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #14171d;
  transition: transform 0.6s;
}
.project-card:hover .project-img { transform: scale(1.06); }
.project-body { padding: 28px; }
.project-cat {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  display: flex; gap: 12px; align-items: center;
}
.project-cat .dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.status-badge {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  color: var(--text-mute);
  font-size: 9px;
}
.status-completed { color: #6ab07a; border-color: rgba(106,176,122,0.3); }
.status-construction { color: var(--accent); border-color: rgba(199,152,98,0.3); }
.status-design { color: #6a93b0; border-color: rgba(106,147,176,0.3); }
.project-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 400; line-height: 1.2;
  margin-bottom: 16px;
}
.project-meta { display: flex; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.project-meta-item { font-size: 12px; color: var(--text-mute); }
.project-meta-item strong { display: block; color: var(--text); font-size: 14px; font-weight: 500; margin-top: 2px; }

/* === CERTS === */
.certs { background: var(--bg-1); }
.certs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cert {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 40px 32px;
  text-align: center;
  transition: border 0.3s;
}
.cert:hover { border-color: var(--accent); }
.cert-icon { font-family: 'Cormorant Garamond', serif; font-size: 48px; color: var(--accent); margin-bottom: 20px; }
.cert h4 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 22px; margin-bottom: 12px; line-height: 1.2; }
.cert-id { font-size: 11px; letter-spacing: 1px; color: var(--text-mute); font-family: 'Manrope', monospace; }

/* === CONTACT === */
.contact { background: var(--bg-1); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-info h2 { font-family: 'Cormorant Garamond', serif; font-size: 56px; font-weight: 400; line-height: 1.1; margin-bottom: 40px; }
.contact-list { list-style: none; }
.contact-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-list .ctype { font-size: 11px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.contact-list .cval { font-size: 17px; color: var(--text); }
.contact-list a:hover { color: var(--accent); }

.contact-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 48px;
}
.contact-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 400; margin-bottom: 24px; color: var(--accent); }
.contact-card p { color: var(--text-dim); margin-bottom: 32px; }
.contact-detail { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 14px; }
.contact-detail:last-child { border-bottom: none; }
.contact-detail .label { color: var(--text-mute); }

/* === FOOTER === */
.footer {
  background: var(--bg-0);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 80px; margin-bottom: 48px; }
.footer-about p { font-size: 13px; color: var(--text-mute); margin-top: 20px; line-height: 1.7; }
.footer h5 { font-size: 11px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 24px; }
.footer ul { list-style: none; }
.footer ul li { padding: 6px 0; font-size: 13px; color: var(--text-dim); }
.footer ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-mute);
}

/* === MODAL === */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 32px;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  max-width: 900px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 40px; height: 40px;
  background: rgba(10,11,13,0.7);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}
.modal-close:hover { color: var(--accent); }
.modal-img { aspect-ratio: 16/9; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: #14171d; }
.modal-body { padding: 48px; }
.modal-body h2 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 40px; margin-bottom: 16px; line-height: 1.1; }
.modal-body .modal-cat { font-size: 11px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 16px; }
.modal-body p.desc { color: var(--text-dim); margin: 24px 0; font-size: 16px; line-height: 1.7; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; margin: 32px 0; }
.modal-grid .item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.modal-grid .item .lbl { font-size: 11px; letter-spacing: 2px; color: var(--text-mute); text-transform: uppercase; margin-bottom: 6px; }
.modal-grid .item .val { color: var(--text); font-size: 15px; }
.modal-roles { margin-top: 24px; }
.modal-roles h4 { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--accent); margin-bottom: 16px; }
.modal-roles ul { list-style: none; }
.modal-roles ul li { padding: 8px 0; padding-left: 24px; position: relative; color: var(--text-dim); font-size: 14px; }
.modal-roles ul li::before { content: ''; position: absolute; left: 0; top: 16px; width: 12px; height: 1px; background: var(--accent); }

/* === REVEAL ANIM === */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s, transform 1s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === MOBILE === */
@media (max-width: 1024px) {
  .nav { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card:first-child .featured-img { aspect-ratio: 16/9; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  section { padding: 80px 0; }
  .container { padding: 0 20px; }
  .hero { padding: 120px 0 80px; }
  .services-grid, .projects-grid, .certs-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 28px; }
  .modal-body h2 { font-size: 28px; }
  .featured-card:first-child h3 { font-size: 32px; }
  .featured-card h3 { font-size: 24px; }
  .featured-overlay, .featured-card:first-child .featured-overlay { padding: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
