@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #060912;
  --bg-2: #0a0f1d;
  --card: #0d1426;
  --card-hover: #111a31;
  --border: #1d273f;
  --border-strong: #2a3754;
  --text: #e8ecf6;
  --muted: #9aa3bd;
  --faint: #5f6884;
  --accent: #5b9dff;     /* cool blue */
  --accent-2: #56e1e6;   /* icy cyan */
  --radius: 18px;
  --max: 1080px;
  --shadow: 0 24px 70px -30px rgba(0, 8, 30, 0.9);
  --shadow-soft: 0 10px 30px -18px rgba(0, 8, 30, 0.8);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Faint cool depth behind the page */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 520px at 50% -8%, rgba(91, 157, 255, 0.14), transparent 60%),
    radial-gradient(620px 520px at 88% 110%, rgba(86, 225, 230, 0.08), transparent 60%);
}

main, .nav, .footer { position: relative; z-index: 1; }

/* NAV */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* HERO */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 60px;
}

.hero-card {
  position: relative;
  border-radius: 28px;
  padding: 86px 48px 92px;
  text-align: center;
  background: #070b16;
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

/* The shader wallpaper */
.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  cursor: crosshair;
}

/* Soft darkening behind the text for legibility */
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%,
    rgba(6, 9, 18, 0.66), rgba(6, 9, 18, 0.18) 55%, transparent 78%);
}

/* Thin cool animated edge (two-tone, no rainbow) */
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle),
    rgba(91, 157, 255, 0.0), rgba(86, 225, 230, 0.55),
    rgba(91, 157, 255, 0.55), rgba(86, 225, 230, 0.0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: spin 10s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { --angle: 360deg; } }

.hero-content { position: relative; z-index: 2; }

.eyebrow {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin-bottom: 24px;
  text-shadow: 0 2px 30px rgba(6, 12, 28, 0.6);
}
/* Cool icy title gradient with a soft glow */
.grad {
  background: linear-gradient(100deg, #ffffff, var(--accent-2) 55%, var(--accent));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(86, 225, 230, 0.35));
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.lede {
  max-width: 620px;
  margin: 0 auto 36px;
  color: #c4cce0;
  font-size: 1.12rem;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04121f;
  box-shadow: 0 12px 30px -10px rgba(86, 225, 230, 0.5);
}
.btn-primary:hover { box-shadow: 0 16px 38px -10px rgba(91, 157, 255, 0.6); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent-2); background: rgba(86, 225, 230, 0.08); }

/* SECTIONS */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 24px;
}
.section-head { margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.section-head p { color: var(--muted); margin-top: 8px; font-size: 1.05rem; }

/* PROJECT GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
  background: var(--card-hover);
  box-shadow: 0 18px 44px -22px rgba(86, 225, 230, 0.35);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-emoji { font-size: 2rem; }
.card-arrow {
  color: var(--faint);
  font-size: 1.2rem;
  transition: color 0.2s, transform 0.2s;
}
.card:hover .card-arrow { color: var(--accent-2); transform: translate(2px, -2px); }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.card p { color: var(--muted); font-size: 0.98rem; margin-bottom: 18px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-2);
  background: rgba(86, 225, 230, 0.08);
  border: 1px solid rgba(86, 225, 230, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
}
.grid-note {
  text-align: center;
  color: var(--faint);
  font-size: 0.92rem;
  margin-top: 28px;
}

/* ABOUT */
.about-body { max-width: 680px; display: flex; flex-direction: column; gap: 18px; }
.about-body p { color: var(--muted); font-size: 1.08rem; }

/* CONTACT */
.contact { text-align: center; padding-bottom: 90px; }
.contact .section-head { margin-bottom: 28px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* FOOTER */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px 50px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 0.9rem;
}
.footer-dot { opacity: 0.5; }

/* RESPONSIVE */
@media (max-width: 720px) {
  .nav-links { gap: 18px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .hero-card { padding: 64px 24px 70px; }
}
@media (max-width: 480px) {
  .nav-links a:not(:last-child) { display: none; }
}

/* CATEGORIES */
.category { margin-bottom: 56px; }
.category:last-child { margin-bottom: 0; }
.category-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.category-emoji { font-size: 1.8rem; line-height: 1; }
.category-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.category-sub { color: var(--muted); font-size: 0.95rem; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-3 { grid-template-columns: 1fr; } }

/* ARCADE CALL-TO-ACTION */
.arcade-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(91, 157, 255, 0.10), rgba(86, 225, 230, 0.05));
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
}
.arcade-cta:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: 0 18px 44px -22px rgba(86, 225, 230, 0.4);
}
.arcade-cta-text h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.arcade-cta-text p { color: var(--muted); font-size: 0.95rem; max-width: 52ch; }
.arcade-previews { display: flex; gap: 10px; font-size: 2rem; flex-shrink: 0; }
@media (max-width: 560px) {
  .arcade-cta { flex-direction: column; align-items: flex-start; }
  .arcade-previews { font-size: 1.6rem; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-card::before, .grad { animation: none; }
}
