/* =========================================================
   AMERICAN-LIFE — STYLE GLOBAL
   ========================================================= */

:root {
  --background: #070b14;
  --surface: rgba(16, 24, 40, 0.78);
  --surface-hover: rgba(22, 33, 54, 0.94);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f6f7fb;
  --muted: #aab2c3;
  --accent: #5fa8ff;
  --accent-secondary: #9b7cff;
  --line: rgba(148, 175, 216, 0.55);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(71, 117, 255, 0.22), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(155, 124, 255, 0.13), transparent 30%),
    var(--background);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.portal {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  padding: 72px 0 48px;
}

.hero {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
  background: linear-gradient(120deg, #ffffff 25%, #9ec7ff 65%, #b9a7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro {
  max-width: 630px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

.architecture {
  position: relative;
  min-height: 470px;
  margin-top: 45px;
  padding-top: 98px;
}

.root-node {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 92px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--accent), var(--line));
  box-shadow: 0 0 20px rgba(95, 168, 255, 0.35);
}

.node-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(95, 168, 255, 0.8);
}

.connector {
  position: absolute;
  top: 90px;
  width: calc(25% - 18px);
  height: 66px;
  border-top: 2px solid var(--line);
}

.connector-left {
  left: 25%;
  border-left: 2px solid var(--line);
  border-top-left-radius: 22px;
}

.connector-right {
  right: 25%;
  border-right: 2px solid var(--line);
  border-top-right-radius: 22px;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 72px);
  position: relative;
  z-index: 2;
}

.project-card {
  position: relative;
  min-height: 310px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition:
    transform 250ms ease,
    border-color 250ms ease,
    background 250ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--card-glow);
  filter: blur(12px);
  opacity: 0.26;
  transition: transform 300ms ease, opacity 300ms ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(137, 183, 255, 0.45);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    var(--surface-hover);
}

.project-card:hover::before {
  transform: scale(1.2);
  opacity: 0.42;
}

.cloud-card {
  --card-glow: #4da9ff;
}

.fivem-card {
  --card-glow: #9b7cff;
}

.project-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 1.6rem;
}

.project-type {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.project-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  letter-spacing: -0.035em;
}

.project-card > p:not(.project-type) {
  min-height: 76px;
  color: var(--muted);
  line-height: 1.65;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 750;
  text-decoration: none;
  transition: background 200ms ease, gap 200ms ease, border-color 200ms ease;
}

.project-link:hover {
  gap: 15px;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

footer {
  padding: 0 20px 24px;
  color: #717b90;
  font-size: 0.88rem;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: 360px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(12, 18, 30, 0.95);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .portal {
    padding-top: 52px;
  }

  .architecture {
    min-height: auto;
    margin-top: 36px;
    padding-top: 72px;
  }

  .root-node {
    height: 66px;
  }

  .connector {
    display: none;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-card {
    min-height: auto;
    padding: 28px;
  }

  .projects::before {
    content: "";
    position: absolute;
    top: -8px;
    bottom: 0;
    left: 50%;
    z-index: -1;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(var(--line), transparent 90%);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
