:root {
  --bg: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.5);
  --text: #94a3b8;
  --text-bright: #e2e8f0;
  --text-muted: #64748b;
  --accent: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.1);
  --ring: rgba(148, 163, 184, 0.1);
  --spotlight: rgba(29, 78, 216, 0.15);
  --max: 80rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

ol,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  background: var(--bg);
  color: var(--accent);
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: 1rem;
}

.spotlight {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  transition: background 0.3s ease;
}

.page {
  position: relative;
  z-index: 40;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

@media (min-width: 768px) {
  .page {
    padding: 4rem 3rem 6rem;
  }
}

@media (min-width: 1024px) {
  .page {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 6rem;
  }
}

.hero {
  padding-bottom: 3rem;
}

@media (min-width: 1024px) {
  .hero {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50%;
    max-height: 100vh;
    padding: 6rem 0;
  }
}

.hero-name {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-bright);
}

.hero-name a:hover {
  color: var(--accent);
}

.hero-role {
  margin-top: 0.75rem;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-bright);
}

.hero-tagline {
  margin-top: 1rem;
  max-width: 22rem;
  color: var(--text);
}

.site-nav {
  display: none;
  margin-top: 4rem;
}

@media (min-width: 1024px) {
  .site-nav {
    display: block;
  }
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  width: max-content;
}

.nav-indicator {
  display: block;
  height: 1px;
  width: 2rem;
  background: var(--text-muted);
  transition: width 0.2s ease, background 0.2s ease;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover .nav-indicator,
.nav-link.is-active .nav-indicator {
  width: 4rem;
  background: var(--text-bright);
}

.nav-link:hover .nav-label,
.nav-link.is-active .nav-label {
  color: var(--text-bright);
}

.socials {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .socials {
    margin-top: 0;
  }
}

.socials a {
  display: flex;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.socials a:hover {
  color: var(--text-bright);
}

.socials svg {
  width: 1.5rem;
  height: 1.5rem;
}

main {
  padding-top: 1rem;
}

@media (min-width: 1024px) {
  main {
    width: 50%;
    padding: 6rem 0;
  }
}

section {
  margin-bottom: 6rem;
  scroll-margin-top: 6rem;
}

.section-heading {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -1.5rem 1.5rem;
  padding: 1.25rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .section-heading {
    margin-left: -3rem;
    margin-right: -3rem;
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (min-width: 1024px) {
  .section-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    background: none;
    backdrop-filter: none;
  }
}

.section-heading h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-bright);
}

.prose p + p {
  margin-top: 1rem;
}

.prose a,
.card-body a,
.site-footer a {
  font-weight: 500;
  color: var(--text-bright);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: color 0.2s ease, background-size 0.2s ease;
}

.prose a:hover,
.card-body a:hover,
.site-footer a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.card-list {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .card-list:hover .card,
  .card-list:focus-within .card {
    opacity: 0.5;
  }

  .card-list:hover .card:hover,
  .card-list:focus-within .card:focus-within {
    opacity: 1;
  }
}

.card {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 1.25rem 0;
  transition: opacity 0.2s ease;
}

@media (min-width: 640px) {
  .card {
    grid-template-columns: 9.25rem minmax(0, 1fr);
    gap: 1rem 1.25rem;
    padding: 1.25rem 0;
  }

  .card-project {
    grid-template-columns: 6.25rem minmax(0, 1fr);
  }
}

.card-glow {
  display: none;
}

@media (min-width: 1024px) {
  .card-glow {
    display: block;
    position: absolute;
    inset: -1rem -1.5rem;
    z-index: -1;
    border-radius: 0.5rem;
    transition: background 0.2s ease, box-shadow 0.2s ease;
  }

  .card:hover .card-glow,
  .card:focus-within .card-glow {
    background: var(--bg-card);
    box-shadow: inset 0 1px 0 0 var(--ring);
  }
}

.card-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.25rem;
}

.card-body h3 {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-bright);
}

.card-body h3 a {
  display: inline;
  background-image: none;
  color: var(--text-bright);
}

.card-body h3 a:hover,
.card:hover .card-body h3,
.card:focus-within .card-body h3 {
  color: var(--accent);
}

.arrow {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.15rem;
  transition: transform 0.2s ease;
}

.arrow svg {
  width: 1rem;
  height: 1rem;
}

.card:hover .arrow,
.card:focus-within .arrow,
.resume-link a:hover .arrow {
  transform: translate(0.15rem, -0.15rem);
}

.card-sub {
  margin-top: 0.15rem;
  font-size: 0.95rem;
  color: var(--text);
}

.card-body p {
  margin-top: 0.7rem;
  font-size: 0.925rem;
}

.card-body h3 a {
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tags li {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.7rem;
}

.resume-link {
  margin-top: 1.5rem;
}

.resume-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--text-bright);
}

.resume-link a:hover {
  color: var(--accent);
}

.project-thumb {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--ring);
  background: #0b1220;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 640px) {
  .project-thumb {
    width: 5.5rem;
    height: 5.5rem;
    margin-top: 0.15rem;
  }
}

.card:hover .project-thumb,
.card:focus-within .project-thumb {
  border-color: rgba(148, 163, 184, 0.35);
  transform: translateY(-2px);
}

.project-stat {
  margin-top: 0.55rem !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  color: var(--text-bright);
}

.site-footer {
  max-width: 28rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .spotlight,
  .nav-indicator,
  .card,
  .card-glow,
  .arrow,
  .project-thumb,
  .prose a {
    transition: none;
  }
}
