:root {
  --bg: #020617;
  --bg-elevated: #02081f;
  --bg-soft: rgba(15, 23, 42, 0.9);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.2);
  --accent-2: #a855f7;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.9);
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.85);
  --transition-fast: 180ms ease-out;
  --transition-med: 260ms ease-out;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #0f172a 0, #020617 52%, #000 100%);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

/* Loader */

.page-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #020617, #000);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loader-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: spin 900ms linear infinite;
}

/* Layout */

.section {
  padding: 120px min(9vw, 120px);
}

@media (max-width: 768px) {
  .section {
    padding: 96px 20px;
  }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px min(9vw, 120px);
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.96),
    rgba(2, 6, 23, 0.8),
    transparent
  );
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

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

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 30% 0, #38bdf8, #0f172a 55%, transparent 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #e0f2fe;
}

.brand-text {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
}

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

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.75);
  padding: 8px 18px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  cursor: pointer;
  display: none;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-cta {
    display: inline-flex;
  }
}

/* Buttons */

.btn {
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast);
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0b1120;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 26px 60px rgba(8, 47, 73, 0.75);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.7);
}

.btn.secondary:hover {
  border-color: var(--accent);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), #020617);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: rgba(148, 163, 184, 0.4);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 52px;
}

.hero-kicker {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero-title {
  font-size: clamp(2.4rem, 3.7vw, 3.5rem);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 32rem;
  margin: 0 0 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 30rem;
}

.metric-card {
  border-radius: 14px;
  padding: 12px 14px;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.1), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.metric-value {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Hero visual */

.hero-visual {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbital {
  position: relative;
  width: min(360px, 80vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 25% 0, #38bdf8 0, #020617 55%, #000 100%);
  box-shadow: 0 26px 70px rgba(8, 47, 73, 0.85);
  overflow: hidden;
}

.planet-main {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #38bdf8, #a855f7, #38bdf8);
  filter: blur(2px);
  opacity: 0.6;
}

.orbit {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  animation: orbit-rotate 22s linear infinite;
}

.orbit-2 {
  inset: 22%;
  animation-duration: 32s;
}

.orbit-3 {
  inset: 34%;
  animation-duration: 40s;
}

.planet-small {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 0, #f97316, #0f172a);
  box-shadow: 0 0 16px rgba(248, 250, 252, 0.9);
}

.hero-tag {
  position: absolute;
  max-width: 220px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: var(--shadow-card);
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-tag--moufta {
  top: 10%;
  left: -4%;
}

.hero-tag--dusyndic {
  bottom: 8%;
  right: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--text);
  margin-bottom: 8px;
}

/* Sections */

.section-header h2 {
  margin: 0;
  font-size: 1.6rem;
}

.section-header p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 32rem;
}

/* Projects */

.projects {
  background: radial-gradient(circle at top, #020617, #000);
}

.project-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero-visual {
    order: -1;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-tag--moufta {
    left: 2%;
  }
}

@media (max-width: 640px) {
  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-card {
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.98),
    rgba(30, 64, 175, 0.28)
  );
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-med);
  z-index: -1;
}

.project-card:hover::before {
  opacity: 1;
}

.project-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  padding: 5px 11px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.75);
  color: var(--muted);
}

.project-title {
  margin: 12px 0 6px;
  font-size: 1.25rem;
}

.project-tagline {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-body {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text);
}

.project-list {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-list li + li {
  margin-top: 6px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-badge {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 5px 11px;
  font-size: 0.75rem;
  color: var(--muted);
}

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

/* Table */

.table-wrapper {
  margin-top: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(30, 64, 175, 0.55);
}

.compare-table thead {
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.12), rgba(88, 28, 135, 0.2));
}

.compare-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.9);
}

/* About */

.about {
  background: radial-gradient(circle at top, #020617, #020617 45%, #000 100%);
}

.about-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.about-block {
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-card);
  font-size: 0.92rem;
  color: var(--muted);
}

.about-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

/* Contact */

.contact-inner {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.98));
  padding: 26px 22px 26px;
  box-shadow: var(--shadow-soft);
  max-width: 720px;
  margin: 0 auto;
}

.contact-inner h2 {
  margin: 0 0 10px;
}

.contact-inner p {
  margin: 0 0 18px;
  color: var(--muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.96);
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.6);
  background: #020617;
  transform: translateY(-1px);
}

.contact-note {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Footer */

.footer {
  padding: 30px 20px 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: #020617;
}

/* Animations */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit-rotate {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 540ms ease-out, transform 540ms ease-out;
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

/* Utilities */

.table-wrapper::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track {
  background: #020617;
}

body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}



/* CONTACT – animated email focus */

.contact-shell {
  position: relative;
  overflow: hidden;
}

.contact-header {
  position: relative;
  z-index: 2;
}

.contact-glow-orbit {
  position: absolute;
  inset: -30%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.45;
}

.contact-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  animation: contact-orbit-spin 24s linear infinite;
}

.contact-orbit-1 {
  width: 360px;
  height: 360px;
}

.contact-orbit-2 {
  width: 260px;
  height: 260px;
  animation-duration: 32s;
  border-color: rgba(168, 85, 247, 0.32);
}

.contact-orbit-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #38bdf8, #0b1120);
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.9),
    0 0 42px rgba(56, 189, 248, 0.7);
  animation: contact-dot-pulse 2.6s ease-in-out infinite;
}

.contact-callout {
  position: relative;
  z-index: 3;
  margin-top: 26px;
  text-align: center;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.9);
  margin-bottom: 10px;
}

.contact-line {
  margin: 0 0 12px;
  font-size: 0.98rem;
  color: var(--text);
}

.contact-mail {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.7);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), #020617);
  color: #e0f2fe;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow:
    0 18px 40px rgba(8, 47, 73, 0.85),
    0 0 22px rgba(56, 189, 248, 0.6);
  overflow: hidden;
  margin-bottom: 20px;
}

.contact-mail:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 22px 48px rgba(8, 47, 73, 0.9),
    0 0 32px rgba(56, 189, 248, 0.8);
}

.mail-pill-left {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #e0f2fe;
  box-shadow:
    0 0 16px rgba(248, 250, 252, 0.9),
    0 0 32px rgba(56, 189, 248, 0.7);
}

.mail-text {
  letter-spacing: 0.04em;
}

.mail-pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.7);
  opacity: 0;
  pointer-events: none;
  animation: mail-pulse 2.4s ease-out infinite;
}

.contact-subline {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Animations */

@keyframes contact-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes contact-dot-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 18px rgba(56, 189, 248, 0.9),
      0 0 42px rgba(56, 189, 248, 0.7);
  }
  50% {
    transform: scale(1.12);
    box-shadow:
      0 0 26px rgba(56, 189, 248, 1),
      0 0 60px rgba(56, 189, 248, 0.9);
  }
}

@keyframes mail-pulse {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  70% {
    opacity: 0;
    transform: scale(1.18);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}
