:root {
  --bg: #0b0b0b;
  --bg-soft: #121212;
  --surface: #1a1a1a;
  --line: #2d2d2d;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --accent: #e5e5e5;
  --radius: 1rem;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 10% 20%, #1f1f1f 0%, var(--bg) 45%);
  color: var(--text);
  line-height: 1.6;
}


body {
  opacity: 1;
  transition: opacity 0.48s ease;
  will-change: opacity;
}

body.page-enter {
  opacity: 0;
}

body.page-enter.page-enter-active {
  opacity: 1;
}

body.page-leave-active {
  opacity: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.grid-cell {
  position: absolute;
  width: 42px;
  height: 42px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: translate3d(var(--cell-x, 0px), var(--cell-y, 0px), 0);
  transition: transform 110ms ease-out;
  will-change: transform;
}

.site-header,
main,
.site-footer {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.contact .btn {
  margin-top: 1rem;
}


.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  isolation: isolate;
  transition: padding 0.35s ease, gap 0.35s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  border-radius: 0 0 16px 16px;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  mask-image: radial-gradient(140% 120% at 50% -20%, #000 58%, transparent 100%);
  -webkit-mask-image: radial-gradient(140% 120% at 50% -20%, #000 58%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

.site-header--large {
  padding: 2rem 0;
}

.site-header--small {
  padding: 0.8rem 0;
}

.logo {
  font-size: 2rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: font-size 0.3s ease;
}

.site-header--small .logo {
  font-size: 1.35rem;
}

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

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, #121212 40%, transparent);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.site-header--small nav a {
  padding: 0.35rem 0.65rem;
  font-size: 0.92rem;
}

nav a:hover {
  border-color: var(--line);
  color: var(--text);
}

.section {
  padding: 4rem 0;
  scroll-margin-top: 6rem;
}

.hero {
  padding-top: 4rem;
  max-width: 760px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.8rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.9rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

h1 span {
  display: block;
  color: #cfcfcf;
}

.lead {
  color: var(--text-muted);
  max-width: 62ch;
}

.cta-group {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-primary {
  background: var(--accent);
  color: #101010;
  border-color: var(--accent);
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: linear-gradient(145deg, #141414, var(--bg-soft));
}

.skills-grid,
.projects-grid,
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card,
.project,
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #161616;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.project:hover,
.metric:hover {
  transform: scale(1.03);
  border-color: #4b4b4b;
  z-index: 1;
}

.card::after,
.project::after,
.metric::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  border: 1px solid #3a3a3a;
  transform: rotate(45deg);
  top: -35px;
  right: -35px;
}

.metric strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.project-tag {
  color: #d4d4d4;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

p {
  margin: 0;
  color: var(--text-muted);
}

.site-footer {
  padding: 2rem 0 3rem;
  color: #8b8b8b;
  font-size: 0.9rem;
}



.spotlight {
  position: relative;
  isolation: isolate;
}

.spotlight::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: calc(var(--radius) + 12px);
  background: radial-gradient(circle at 50% 30%, rgba(229, 229, 229, 0.22), rgba(229, 229, 229, 0));
  filter: blur(20px);
  opacity: 0.45;
  z-index: -1;
  animation: spotlightPulse 2.8s ease-in-out infinite;
}

@keyframes spotlightPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.03);
  }
}


.detail-list {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.detail-list li {
  margin-bottom: 0.45rem;
}

.detail-list.compact li {
  margin-bottom: 0.3rem;
}

.site-footer a {
  color: #b7b7b7;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 0.8rem;
  }

  .site-header--large {
    padding: 1.1rem 0;
  }

  .site-header--small {
    padding: 0.7rem 0;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
  }

  .logo,
  .site-header--small .logo {
    font-size: 1.2rem;
  }

  nav a,
  .site-header--small nav a {
    font-size: 0.86rem;
    padding: 0.3rem 0.5rem;
  }

  .hero {
    padding-top: 2.4rem;
  }
}
