:root {
  --bg: #071019;
  --bg-elevated: rgba(17, 27, 36, 0.72);
  --bg-soft: rgba(20, 31, 42, 0.9);
  --panel-border: rgba(158, 181, 199, 0.18);
  --text: #edf3f8;
  --muted: #a9b7c4;
  --accent: #8ae9c0;
  --accent-2: #85b5ff;
  --accent-3: #e0c3ff;
  --shadow: 0 24px 80px rgba(7, 16, 25, 0.58);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(133, 181, 255, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(138, 233, 192, 0.15), transparent 24%),
    linear-gradient(135deg, #071019 0%, #0d1d2b 32%, #0a1824 100%);
  color: var(--text);
  animation: fadeInPage 0.6s ease-out;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  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: 32px 32px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
  pointer-events: none;
  animation: gridShift 18s linear infinite alternate;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid rgba(158, 181, 199, 0.22);
  border-radius: 20px;
  background: rgba(10, 20, 30, 0.52);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 50px rgba(5, 11, 18, 0.42);
  position: sticky;
  top: 16px;
  z-index: 10;
  animation: fadeDown 0.7s ease-out both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #021319;
  font-size: 0.8rem;
  box-shadow: 0 14px 30px rgba(133, 181, 255, 0.35);
  animation: glowPulse 3s ease-in-out infinite alternate;
}

.brand-copy {
  font-size: 0.98rem;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.95fr;
  gap: 24px;
  align-items: center;
  padding: 48px 0 28px;
}

.hero-copy,
.hero-panel {
  animation: fadeUp 0.8s ease-out both;
}

.hero-copy h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.7rem, 3.7vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 10px 40px rgba(9, 17, 27, 0.45);
  background: linear-gradient(135deg, #f5fbff 0%, #dfeeff 34%, #afe7d3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subtitle {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-link {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #06151d;
  box-shadow: 0 18px 34px rgba(133, 181, 255, 0.28);
}

.secondary-link {
  border: 1px solid rgba(158, 181, 199, 0.24);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text);
}

.primary-link:hover,
.primary-link:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible {
  transform: translateY(-2px);
}

.hero-panel {
  border: 1px solid rgba(158, 181, 199, 0.22);
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(17, 27, 36, 0.92), rgba(11, 22, 31, 0.96));
  box-shadow: 0 24px 60px rgba(7, 16, 25, 0.5);
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(133, 181, 255, 0.2), transparent 62%);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(138, 233, 192, 0.35);
  background: rgba(138, 233, 192, 0.08);
  color: #dffef2;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(138, 233, 192, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

.meta-grid {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.meta-grid div {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.meta-grid label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-grid strong {
  font-size: 1.05rem;
}

.overview-section {
  padding-top: 12px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.insight-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(158, 181, 199, 0.18);
  background: linear-gradient(180deg, rgba(15, 26, 36, 0.8), rgba(11, 20, 28, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.insight-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.insight-card h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
}

.insight-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.insight-card a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(133, 181, 255, 0.5);
  padding-bottom: 2px;
}

.projects-section {
  padding-top: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.4rem);
  letter-spacing: -0.05em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(158, 181, 199, 0.18);
  background: rgba(13, 24, 32, 0.76);
  text-decoration: none;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  overflow: hidden;
  animation: fadeUp 0.7s ease-out both;
  backdrop-filter: blur(4px);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -28% auto auto -12%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 62%);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 45%, rgba(255,255,255,0.02));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-card:hover::after,
.project-card:focus-visible::after {
  opacity: 1;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(133, 181, 255, 0.52);
  box-shadow: 0 18px 50px rgba(16, 30, 44, 0.44);
}

.project-card[data-accent="portfolio"] {
  background: linear-gradient(180deg, rgba(14, 29, 42, 0.85), rgba(12, 26, 35, 0.94));
}

.project-card[data-accent="portfolio"]:hover,
.project-card[data-accent="portfolio"]:focus-visible {
  background: linear-gradient(180deg, rgba(17, 34, 49, 0.86), rgba(13, 28, 37, 0.97));
}

.project-card[data-accent="github"] {
  background: linear-gradient(180deg, rgba(18, 30, 39, 0.88), rgba(17, 28, 34, 0.96));
}

.project-card[data-accent="vercel"] {
  background: linear-gradient(180deg, rgba(17, 31, 46, 0.88), rgba(13, 23, 34, 0.96));
}

.project-card[data-accent="gaming"] {
  background: linear-gradient(180deg, rgba(21, 28, 42, 0.88), rgba(19, 22, 33, 0.96));
}

.project-card[data-accent="tools"] {
  background: linear-gradient(180deg, rgba(27, 24, 42, 0.88), rgba(21, 18, 32, 0.96));
}

.project-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.project-card h3 {
  margin: 18px 0 10px;
  font-size: 1.34rem;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
  position: relative;
  z-index: 1;
}

.card-footer span {
  color: var(--muted);
  font-size: 0.88rem;
}

.card-footer em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.project-card:hover .card-footer em,
.project-card:focus-visible .card-footer em {
  transform: translateX(4px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

@keyframes fadeInPage {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(138, 233, 192, 0.8);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 28px rgba(138, 233, 192, 1);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 14px 30px rgba(133, 181, 255, 0.35);
  }
  100% {
    box-shadow: 0 18px 36px rgba(133, 181, 255, 0.52);
  }
}

@keyframes gridShift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(12px, 12px, 0);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .insight-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 16px;
    border-radius: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .nav a {
    font-size: 0.84rem;
    padding: 6px 9px;
    border-radius: 999px;
    border: 1px solid rgba(158, 181, 199, 0.14);
    background: rgba(255, 255, 255, 0.015);
  }

  .nav a::after {
    display: none;
  }

  .brand-copy {
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 12vw, 3.2rem);
    line-height: 1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .insight-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 200px;
    padding: 18px;
  }

  .meta-grid strong {
    font-size: 0.96rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100% - 16px, 1100px);
  }

  .topbar {
    padding: 14px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 14vw, 2.8rem);
  }

  .subtitle {
    font-size: 0.96rem;
  }

  .insight-card,
  .project-card,
  .hero-panel {
    border-radius: 18px;
  }

  .hero-panel {
    padding: 18px;
  }

  .footer-links {
    width: 100%;
    row-gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1100px);
    padding-top: 18px;
  }
}
