:root {
  --bg: #05060a;
  --panel: rgba(14, 17, 26, 0.78);
  --panel-strong: rgba(20, 25, 37, 0.92);
  --accent: #e6c17a;
  --accent-2: #7ab0ff;
  --text: #e9ecf5;
  --muted: #96a0b8;
  --border: rgba(255, 255, 255, 0.08);
  --glow: 0 10px 40px rgba(230, 193, 122, 0.12);
  --radius: 18px;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  --nav-height: 76px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 25% 20%, rgba(122, 176, 255, 0.08), transparent 35%),
              radial-gradient(circle at 70% 30%, rgba(230, 193, 122, 0.08), transparent 30%),
              #05060a;
  color: var(--text);
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  scroll-behavior: smooth;
}

html { scrollbar-width: none; }

body { -ms-overflow-style: none; }

body::-webkit-scrollbar { display: none; }

body.loading {
  overflow: hidden;
}

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

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

body.overlay-open .page, .page.blurred { filter: blur(12px); pointer-events: none; }
body.overlay-open { overflow: hidden; }

.page {
  position: relative;
  z-index: 1;
  transition: filter 0.35s ease, opacity 0.35s ease;
  padding-top: var(--nav-height);
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(122, 176, 255, 0.12), transparent 32%),
              radial-gradient(circle at 70% 60%, rgba(230, 193, 122, 0.12), transparent 28%),
              rgba(5, 6, 10, 0.92);
  backdrop-filter: blur(14px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-dur, 0.45s) ease;
}

.loading-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loading-cube {
  display: block;
  object-fit: contain;
  max-width: min(90vw, 520px);
  max-height: min(90vh, 520px);
}

.overlay-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  width: min(460px, 90vw);
  box-shadow: var(--shadow);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.overlay-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.overlay-title { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.08em; }

.overlay-card p { color: var(--muted); margin: 6px 0 14px; }

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

.overlay-actions button {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(122, 176, 255, 0.12), rgba(230, 193, 122, 0.12));
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.overlay-actions button:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 193, 122, 0.4);
  box-shadow: var(--glow);
}

.overlay-note { font-size: 0.9rem; color: var(--muted); }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  backdrop-filter: blur(14px);
  background: rgba(5, 6, 10, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.site-header.blurred { filter: blur(6px); opacity: 0.7; }

.site-header.stopped { opacity: 0; pointer-events: none; filter: blur(10px); }

.site-header.fused {
  background: rgba(5, 6, 10, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  position: fixed;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-logo {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 999px; }

.nav { display: flex; align-items: center; gap: 18px; }

.nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.nav .cta {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(122, 176, 255, 0.08);
}

.nav .cta.active { border-color: rgba(230, 193, 122, 0.6); color: var(--accent); }

.lang-toggle {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(230, 193, 122, 0.12);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-toggle:hover { transform: translateY(-2px); border-color: rgba(230, 193, 122, 0.5); box-shadow: var(--glow); }

main { padding: 0 32px 0; }

section { margin: 0 auto; max-width: 1200px; }

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  isolation: isolate;
  padding-top: 32px;
}

#ui { position: absolute; top: 20px; left: 20px; z-index: 3; }

.hero #glcanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 40px;
  margin: 36px 0 48px 0;
  background: linear-gradient(140deg, rgba(5, 6, 10, 0.85), rgba(7, 10, 18, 0.7));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.pill {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(230, 193, 122, 0.14);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.hero h1 { margin: 10px 0 12px; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.15; }

.hero p { margin: 0 0 14px; color: var(--muted); font-size: 1.04rem; }

.hero .langs { color: var(--muted); font-size: 0.98rem; margin-top: 10px; }

.hero-actions { display: flex; gap: 12px; margin-top: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn.primary { background: linear-gradient(135deg, rgba(230, 193, 122, 0.18), rgba(122, 176, 255, 0.18)); color: var(--text); }

.btn.ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); }

.btn:hover { transform: translateY(-2px); border-color: rgba(230, 193, 122, 0.5); box-shadow: var(--glow); }

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

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 6px;
}

.lead, .section p { color: var(--muted); line-height: 1.6; }

.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  background: var(--panel);
  padding: 28px;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-top: 48px;
}

.card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.card-visual {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.badge {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(122, 176, 255, 0.12);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
}

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

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

.stat strong { display: block; font-size: 1.6rem; }

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

.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover { transform: translateY(-2px); border-color: rgba(122, 176, 255, 0.5); box-shadow: var(--glow); }

.tile h3 { margin-top: 0; margin-bottom: 8px; }

.tile p { margin: 0; color: var(--muted); }

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

.skill-col {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.skill-col h4 { margin: 0 0 8px; color: var(--accent); letter-spacing: 0.04em; }

.skill-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  display: grid;
  gap: 8px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.skill-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
  fill: currentColor;
}

.skill-icon path,
.skill-icon rect,
.skill-icon circle,
.skill-icon line,
.skill-icon polyline,
.skill-icon polygon {
  fill: currentColor;
}

.skill-icon [fill="none"] {
  fill: none;
}

.skill-icon [stroke] {
  stroke: currentColor;
}

.location-section { margin-top: 64px; }

.location-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: stretch;
}

.location-emblem {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
  box-shadow: var(--shadow);
}

.emblem-frame {
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: radial-gradient(circle at 40% 30%, rgba(122, 176, 255, 0.16), transparent 50%),
              radial-gradient(circle at 60% 70%, rgba(230, 193, 122, 0.18), transparent 50%),
              rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.emblem-frame img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.25));
}

.location-note { color: var(--muted); text-align: center; font-weight: 600; letter-spacing: 0.02em; }

.location-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, filter 0.35s ease;
  text-decoration: none;
  color: inherit;
}

.location-card:hover { transform: translateY(-4px); filter: brightness(1.05); }

.location-map {
  position: relative;
  border-radius: 16px;
  background: radial-gradient(circle at 40% 35%, rgba(122, 176, 255, 0.3), transparent 45%),
              radial-gradient(circle at 70% 65%, rgba(230, 193, 122, 0.35), transparent 40%),
              linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  min-height: 180px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.location-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e66767;
  border: 2px solid rgba(255, 255, 255, 0.7);
  top: 48%;
  left: 62%;
  box-shadow: 0 0 0 8px rgba(230, 103, 103, 0.2), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.location-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(10px);
  border-radius: 50%;
}

.cloud-a { width: 180px; height: 60px; top: 18%; left: 12%; }
.cloud-b { width: 140px; height: 50px; bottom: 14%; right: 10%; }

.location-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0;
}

.location-meta h3 { margin: 6px 0; }

.location-meta .muted { color: var(--muted); margin: 4px 0 0; }

.location-badge {
  align-self: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(122, 176, 255, 0.16);
  border: 1px solid var(--border);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.contact {
  margin: 92px 0 0;
  background: linear-gradient(145deg, rgba(8, 10, 18, 0.96), rgba(14, 16, 26, 0.94));
  border: 1px solid var(--border);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 48px 0 36px;
  text-align: center;
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.35);
  max-width: 100%;
  width: 100%;
}

.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: 28px;
  align-items: center;
}

.contact-copy { text-align: left; }
.contact-copy h2 { margin: 10px 0 8px; }

.contact-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-rail { display: grid; gap: 12px; }
.contact .contact-footer { margin-left: 0; margin-right: 0; }

.footer-branding {
  display: grid;
  grid-template-columns: auto;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.footer-tagline { color: var(--muted); max-width: 240px; line-height: 1.5; font-size: 0.95rem; }

.contact-footer .social-rail { margin: 0; justify-content: center; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  display: grid;
  gap: 6px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 193, 122, 0.4);
  box-shadow: var(--glow);
}

.contact-label {
  color: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
}

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

 .social-rail { display: flex; justify-content: center; margin: 16px 0; }

.social-rail .card {
  width: max-content;
  height: max-content;
  background: linear-gradient(135deg, rgba(230, 193, 122, 0.16), rgba(122, 176, 255, 0.16));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  gap: 14px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

.social-rail .card a {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 12px;
  justify-content: center;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.15, 0.83, 0.66, 1);
  border: 1px solid var(--border);
}

.social-rail .card a:hover { transform: scale(1.12); border-color: rgba(230, 193, 122, 0.6); box-shadow: var(--glow); background: linear-gradient(135deg, rgba(230, 193, 122, 0.2), rgba(122, 176, 255, 0.2)); }

.social-rail .card a:active { transform: scale(1.08); transition-duration: 0.3s; }

.social-rail .card a svg:first-child {
  display: flex;
  scale: 1.3;
  position: absolute;
  width: 17px;
  opacity: 1;
  transform: translateY(0px);
  transition: all 0.4s cubic-bezier(0.15, 0.83, 0.66, 1);
}

.social-rail .card a svg:first-child path { fill: rgb(255, 255, 255); }

.social-rail .card a:hover svg:first-child { transform: translateY(-40px); opacity: 0; }

.social-rail .card a svg:last-child {
  display: flex;
  position: absolute;
  width: 17px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.15, 0.83, 0.66, 1);
}

.social-rail .card a svg:last-child path { fill: rgb(255, 255, 255); }

.social-rail .card a:hover svg:last-child { opacity: 1; transform: translateY(0px); }

.site-footer {
  margin-top: 32px;
  padding: 24px 32px 32px;
  border-top: 1px solid var(--border);
  background: rgba(5, 6, 10, 0.6);
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-branding { display: flex; align-items: center; gap: 12px; }

.footer-logo {
  width: 132px;
  height: 132px;
  border-radius: 18px;
  border: 1px solid var(--border);
  object-fit: cover;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
}

.up-button { min-width: 60px; }

.works-page main { padding-top: 32px; }

.works-hero { margin-top: 24px; text-align: left; }

.works-grid { margin-top: 32px; }

.work .tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(122, 176, 255, 0.1);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.placeholder {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border);
}

.hero.blur #glcanvas { filter: blur(6px); transition: filter 0.3s ease; }

@media (max-width: 900px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 10px; height: auto; }
  .menu-toggle { display: flex; }
  .nav { flex-wrap: wrap; width: 100%; display: none; flex-direction: column; align-items: flex-start; }
  .site-header.nav-open .nav { display: flex; }
  .nav a, .lang-toggle, .nav .cta { width: 100%; text-align: left; }
  main { padding: 0 18px 0; }
  .hero-content { margin: 32px 0; }
  .location-grid { grid-template-columns: 1fr; }
  .location-card { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; align-items: flex-start; }
  .contact-copy { text-align: center; }
  .contact-footer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-branding { justify-items: center; }
  .footer-tagline { max-width: 100%; }
}

@media (max-width: 600px) {
  .hero-content { padding: 26px; }
  .nav { gap: 10px; }
  .nav a { padding: 8px 10px; }
  .hero { min-height: 90vh; padding-top: 16px; }
  .hero-content { margin-top: 90px; padding: 24px; }
  .location-emblem .emblem-frame { width: 140px; height: 140px; }
  .location-card { padding: 14px; }
  .contact { padding: 26px; }
  .social-rail { margin: 14px 0; }
}
