:root {
  --bg: #0e1420;
  --bg-soft: #141c2a;
  --panel: rgba(18, 28, 42, 0.82);
  --panel-solid: #111b29;
  --panel-2: rgba(24, 37, 56, 0.94);
  --text: #eef4fb;
  --muted: #adc0d5;
  --line: rgba(149, 179, 210, 0.17);
  --accent: #2d8cff;
  --accent-2: #19c2b5;
  --accent-soft: rgba(45, 140, 255, 0.12);
  --danger-soft: rgba(255,255,255,0.05);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.30);
  --radius: 28px;
  --radius-sm: 20px;
  --max: 1180px;
}

body.light-mode {
  --bg: #edf4fb;
  --bg-soft: #f6fbff;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --panel-2: rgba(255, 255, 255, 0.96);
  --text: #182538;
  --muted: #5f7287;
  --line: rgba(68, 96, 128, 0.14);
  --accent: #0d6efd;
  --accent-2: #0ca79a;
  --accent-soft: rgba(13, 110, 253, 0.08);
  --shadow: 0 22px 48px rgba(23, 41, 64, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(45,140,255,0.16), transparent 26%),
    radial-gradient(circle at 92% 12%, rgba(25,194,181,0.11), transparent 22%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.container { width: min(100% - 28px, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 8px;
  background: #fff;
  color: #000;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 1000;
}
.skip-link:focus { inset-inline-start: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(45, 140, 255, 0.26);
}
.brand-text { font-size: 1rem; }
.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.nav-link {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
  background: rgba(255,255,255,0.03);
}
.nav-link:hover { color: var(--text); border-color: rgba(45,140,255,0.28); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
body.light-mode .lang-switch,
body.light-mode .theme-toggle,
body.light-mode .lang-btn,
body.light-mode .nav-link,
body.light-mode .visit-chip { background: rgba(23,37,56,0.03); }
.lang-btn,
.theme-toggle {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
}
.lang-btn {
  min-width: 48px;
  height: 38px;
  border-radius: 999px;
  border-color: transparent;
  font-weight: 800;
}
.lang-btn.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.theme-toggle {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.main-wrap { padding: 30px 0 58px; }
.section { margin-top: 22px; }
.section + .section { margin-top: 26px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}
.hero-copy,
.hero-side { min-width: 0; }
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.pill {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 0.94rem;
  border: 1px solid rgba(45, 140, 255, 0.22);
  background: var(--accent-soft);
  color: var(--text);
}
.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero-subtitle {
  margin: 14px 0 0;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 1.08rem;
  max-width: 62ch;
}
.hero-summary {
  margin: 18px 0 0;
  color: color-mix(in srgb, var(--text) 85%, var(--muted));
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(45,140,255,0.28);
  box-shadow: 0 16px 30px rgba(9, 20, 35, 0.14);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}
.btn-secondary { background: rgba(255,255,255,0.03); }
.btn-ghost { background: transparent; color: var(--muted); }
.hero-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.highlight-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.highlight-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.highlight-value {
  font-size: 1.06rem;
  font-weight: 800;
}
.profile-panel {
  height: 100%;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.photo-wrap {
  width: 136px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}
.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}
.profile-name {
  margin: 16px 0 6px;
  text-align: center;
  font-size: 1.35rem;
}
.profile-role {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.mini-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.mini-label { color: var(--muted); }
.mini-value { font-weight: 800; text-align: end; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.metric {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  text-align: center;
}
.metric strong {
  display: block;
  font-size: 1.28rem;
  margin-bottom: 4px;
}
.metric span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2.2vw, 1.8rem);
}
.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}
.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  padding: 18px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.services-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.service-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.service-card h3 { margin: 0 0 8px; font-size: 1.06rem; }
.service-card p { margin: 0; color: color-mix(in srgb, var(--text) 86%, var(--muted)); }

.timeline {
  display: grid;
  gap: 16px;
}
.timeline-item {
  padding: 20px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.timeline-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 8px;
}
.timeline-title {
  margin: 0;
  font-size: 1.14rem;
}
.timeline-sub {
  color: var(--muted);
  font-weight: 700;
}
.timeline-date {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 800;
}
.timeline-item p { margin: 0 0 10px; color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.timeline-list {
  margin: 0;
  padding-inline-start: 18px;
}
.timeline-list li { margin-bottom: 6px; }

.project-grid,
.download-grid,
.contact-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.project-card,
.download-card,
.contact-card,
.media-card {
  padding: 20px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.project-card h3,
.download-card h3,
.contact-card h3,
.media-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.project-card p,
.download-card p,
.contact-card p,
.media-card p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 86%, var(--muted));
}
.media-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.media-kicker {
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.download-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.contact-meta {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.contact-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.contact-meta strong { font-weight: 800; }
.visit-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}
.site-footer {
  padding: 22px 0 34px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-link {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
}
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.center { text-align: center; }

@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: 1fr;
    padding: 12px 0 14px;
  }
  .header-nav { justify-content: flex-start; }
  html[dir="rtl"] .header-nav { justify-content: flex-end; }
  .header-actions { justify-content: flex-start; flex-wrap: wrap; }
  html[dir="rtl"] .header-actions { justify-content: flex-end; }
  .hero-grid,
  .services-grid,
  .project-grid,
  .download-grid,
  .contact-grid,
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 18px, var(--max)); }
  .hero { padding: 18px 14px; }
  .panel, .card, .timeline-item, .service-card, .project-card, .download-card, .contact-card, .media-card { border-radius: 22px; }
  .hero-highlights, .metric-grid { grid-template-columns: 1fr; }
  .photo-wrap { width: 116px; }
  .hero-title { font-size: clamp(2rem, 9vw, 3rem); }
  .theme-toggle { min-height: 42px; padding: 0 12px; }
}
