/* ===========================================================
   Bayoumi.dk — Systemudvikler
   =========================================================== */

:root {
  --bg: #0b0e14;
  --bg-alt: #10141d;
  --surface: #151b26;
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #eef1f7;
  --text-muted: #9aa5b8;
  --accent: #5eead4;
  --accent-2: #7c9cff;
  --accent-gradient: linear-gradient(120deg, #5eead4, #7c9cff);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1120px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  touch-action: pan-x pan-y;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img, svg, pre, table, video, iframe { max-width: 100%; }
img { display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- background glow ---------- */

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(94, 234, 212, 0.12), transparent 60%),
    radial-gradient(700px circle at 85% 25%, rgba(124, 156, 255, 0.14), transparent 60%),
    var(--bg);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 14, 20, 0.7);
  border-bottom: 1px solid var(--surface-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.main-nav a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: #0b0e14 !important;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- hero ---------- */

.hero {
  padding: 110px 0 90px;
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

.highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0b0e14;
  box-shadow: 0 10px 30px -10px rgba(94, 234, 212, 0.4);
}

.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  border: 1px solid var(--surface-border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- section shell ---------- */

.section {
  padding: 90px 0;
}

.section-first {
  padding-top: 140px;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.section-eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.center { text-align: center; }
.section .center + .center { margin-left: auto; margin-right: auto; }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}

.about-media,
.about-text {
  min-width: 0;
}

.code-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.code-card-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.code-card-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface-border);
}

.code-card-dots span:nth-child(1) { background: #ff5f56; }
.code-card-dots span:nth-child(2) { background: #ffbd2e; }
.code-card-dots span:nth-child(3) { background: #27c93f; }

.code-card pre {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tok-key { color: #7c9cff; }
.tok-var { color: #eef1f7; }
.tok-str { color: #5eead4; }
.tok-num { color: #ffbd2e; }

.about-text p {
  color: var(--text-muted);
}

.about-points {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-points li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-gradient);
}

/* ---------- skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 234, 212, 0.35);
}

.skill-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent);
  margin-bottom: 18px;
}

.skill-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.skill-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 32px;
  position: relative;
}

.service-number {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 700;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 14px 0 10px;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- projects ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.project-card:hover { transform: translateY(-4px); }

.project-thumb {
  height: 150px;
  background: var(--accent-gradient);
  opacity: 0.85;
}

.thumb-1 { background: linear-gradient(135deg, #5eead4, #22d3ee); }
.thumb-2 { background: linear-gradient(135deg, #7c9cff, #a78bfa); }
.thumb-3 { background: linear-gradient(135deg, #34d399, #7c9cff); }

.project-body { padding: 24px; }

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.project-body p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tags span {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
}

/* ---------- contact ---------- */

.contact-section { text-align: center; }

.contact-inner {
  max-width: 640px;
}

.contact-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.contact-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--surface-border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--surface-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .main-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--surface-border);
  }

  .main-nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-cta {
    margin-top: 12px;
    text-align: center;
  }

  .menu-toggle { display: flex; }

  .skills-grid { grid-template-columns: 1fr; }

  .section-first { padding-top: 100px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .about-grid { gap: 32px; }

  .code-card { padding: 16px; }

  .code-card pre { font-size: 0.72rem; }
}