:root {
  --font-main: 'Space Grotesk', sans-serif;

  --bg-app: #070b14;
  --bg-card: #0c1220;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --accent-blue: #38bdf8;
  --accent-blue-hover: #7dd3fc;
  --accent-blue-deep: #0284c7;
  --accent-blue-glow: rgba(56, 189, 248, 0.18);

  --accent-gold: #c8aa6e;
  --accent-gold-soft: #e8d5a3;
  --accent-gold-glow: rgba(200, 170, 110, 0.14);
  --accent-gold-border: rgba(200, 170, 110, 0.35);

  --glass-bg: rgba(16, 24, 40, 0.55);
  --glass-bg-strong: rgba(14, 20, 34, 0.82);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 22px;
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --radius-pill: 999px;
}

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

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent-blue) !important;
  outline-offset: 2px;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.text-mute {
  color: var(--text-muted);
}

.brand-accent {
  color: var(--accent-gold-soft);
}

/* Ambient depth — matches GamerConnect */
.app-ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(56, 189, 248, 0.16), transparent 58%),
    radial-gradient(720px 480px at 90% 8%, rgba(200, 170, 110, 0.1), transparent 55%),
    radial-gradient(640px 420px at 50% 100%, rgba(56, 189, 248, 0.06), transparent 60%),
    var(--bg-app);
}

.app-ambient::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 28% 42%, rgba(56, 189, 248, 0.06), transparent 30%),
    radial-gradient(circle at 78% 58%, rgba(200, 170, 110, 0.05), transparent 32%);
  animation: ambient-drift 22s ease-in-out infinite alternate;
  opacity: 0.9;
}

.app-ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 70%);
  opacity: 0.45;
}

@keyframes ambient-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1.5%, 0) scale(1.04); }
}

.page {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 0 28px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  animation: rise-in 0.7s ease both;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

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

.topbar-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.topbar-nav a:hover {
  color: var(--accent-gold-soft);
  border-color: var(--accent-gold-border);
  background: var(--accent-gold-glow);
}

/* Hero — one composition, brand first */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 48px 8px 40px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  animation: rise-in 0.85s ease 0.08s both;
}

.kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 12px;
}

.hero-brand {
  font-size: clamp(3rem, 9vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.95;
  margin: 0 0 18px;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 42ch;
  margin: 0 0 28px;
}

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

.btn {
  font-family: var(--font-main);
  font-weight: 700;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  font-size: 0.88rem;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue-deep), var(--accent-blue));
  color: #071018;
  border: none;
  box-shadow:
    0 10px 24px rgba(56, 189, 248, 0.28),
    0 0 0 1px rgba(200, 170, 110, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
  box-shadow:
    0 14px 30px rgba(56, 189, 248, 0.38),
    0 0 0 1px rgba(200, 170, 110, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--accent-gold-border);
  color: var(--accent-gold-soft);
  background-color: rgba(200, 170, 110, 0.08);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Projects — solid glass cards (must read clearly on the navy canvas) */
.projects {
  margin-top: 12px;
  padding-bottom: 28px;
  animation: rise-in 0.9s ease 0.16s both;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.section-head .text-mute {
  font-size: 0.85rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  background-color: #0c1220;
  background-image:
    linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, transparent 45%),
    linear-gradient(180deg, rgba(16, 24, 40, 0.98), #0a101c 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.project-card-id {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(56, 189, 248, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.project-card-gc {
  border-color: rgba(200, 170, 110, 0.4);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(200, 170, 110, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.project-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.75), rgba(200, 170, 110, 0.2), transparent);
}

.project-card-gc::before {
  background: linear-gradient(90deg, rgba(200, 170, 110, 0.8), rgba(56, 189, 248, 0.18), transparent);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.project-card-id:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.project-card-gc:hover {
  border-color: rgba(200, 170, 110, 0.58);
}

.project-card-shine {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.16) 50%,
    rgba(56, 189, 248, 0.14) 54%,
    transparent 66%,
    transparent 100%
  );
  background-size: 250% 100%;
  background-position: 120% 0;
  animation: card-shine 6.5s ease-in-out infinite;
}

.project-card-gc .project-card-shine {
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(200, 170, 110, 0.18) 54%,
    transparent 66%,
    transparent 100%
  );
  background-size: 250% 100%;
  animation-delay: 1.2s;
}

@keyframes card-shine {
  0%, 12% { background-position: 130% 0; }
  55%, 100% { background-position: -130% 0; }
}

.project-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 8px;
  line-height: 1.2;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #b6e4f8;
}

.project-badge-gc {
  background: rgba(200, 170, 110, 0.16);
  border-color: rgba(200, 170, 110, 0.42);
  color: #e8d5a3;
}

.project-kind {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a8b4c4;
}

.project-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.project-desc {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.92rem;
  color: #9aabbd;
  line-height: 1.5;
}

.project-features {
  position: relative;
  z-index: 1;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 6px;
  padding: 0;
  flex: 1;
  align-content: flex-start;
}

.project-features li {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card-id .project-features li {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.22);
}

.project-card-gc .project-features li {
  background: rgba(200, 170, 110, 0.08);
  border-color: rgba(200, 170, 110, 0.24);
}

.project-open {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: auto;
}

.site-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 600;
}

.site-footer .text-mute {
  font-weight: 500;
}

@media (max-width: 820px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 28px, 1080px);
  }

  .hero {
    padding: 36px 0 28px;
  }

  .topbar-nav a:not(:last-child) {
    display: none;
  }

  .project-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-ambient::before,
  .topbar,
  .hero-copy,
  .projects,
  .project-card-shine {
    animation: none !important;
  }
}
