:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --accent: #0ea5e9;
  --accent-soft: #e0f2fe;
  --success: #16a34a;
  --warning: #d97706;
  --error: #dc2626;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -20%, var(--accent-soft) 0%, transparent 30%),
    radial-gradient(circle at 90% 0%, #eef2ff 0%, transparent 25%), var(--bg);
  line-height: 1.6;
}

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

.container {
  width: min(1040px, 92vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--text);
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, #0b1220 0%, #111b30 100%);
  border-bottom: 1px solid #1e293b;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-decoration: none;
  color: #e2e8f0;
}

.tabs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.tab-link {
  display: inline-block;
  text-decoration: none;
  color: #94a3b8;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tab-link:hover {
  color: #e2e8f0;
  border-color: #334155;
  background: rgba(148, 163, 184, 0.14);
}

.tab-link[data-active="true"] {
  color: #e2e8f0;
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(96, 165, 250, 0.5);
}

main {
  padding: 6rem 0 3rem;
}

.hero {
  padding: 2rem 0 1rem;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

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

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

p {
  margin-top: 0;
}

.hero-text {
  max-width: 65ch;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.section {
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.about-split {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.15rem;
  align-items: center;
}

.about-photo-wrap {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
}

.about-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.about-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.04rem;
}

.inline-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.cards-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.project-scroll {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  gap: 1rem;
  padding: 0.15rem 0 0.45rem;
}

.project-scroll .project-card {
  flex: 0 0 min(82vw, 320px);
  scroll-snap-align: start;
}

.project-scroll::-webkit-scrollbar {
  height: 10px;
}

.project-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.project-scroll::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 999px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--surface-alt);
}

.project-card h3,
.project-card h2 {
  margin-bottom: 0.35rem;
}

.project-card a {
  color: var(--primary);
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

.chip-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0.8rem 0;
}

.chip {
  font-size: 0.85rem;
  border: 1px solid #bfdbfe;
  color: var(--primary-hover);
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.6rem;
}

.projects-feed {
  margin-top: 1rem;
  display: grid;
  gap: 2rem;
}

.project-feed-item {
  display: flex;
  flex-direction: column;
  padding: 1.3rem;
  scroll-margin-top: 6.25rem;
}

.project-feed-item .project-links {
  margin-top: 0.85rem;
  padding-top: 0;
}

.project-feed-item .prose {
  margin-top: 1rem;
}

.skills-list,
.social-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.skills-list li,
.social-list li {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
  padding: 0.8rem;
}

.button {
  display: inline-block;
  text-decoration: none;
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
}

.button:hover {
  background: var(--primary-hover);
}

.prose {
  margin-top: 1rem;
}

.prose a {
  color: var(--primary);
}

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

.site-footer {
  border-top: 1px solid #1e293b;
  margin-top: 2.5rem;
  padding: 1rem 0 1.5rem;
  background: linear-gradient(135deg, #0b1220 0%, #111b30 100%);
  color: #94a3b8;
}

.footer-inner {
  display: flex;
  justify-content: center;
  text-align: center;
}

.footer-connect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.footer-connect-label {
  margin: 0;
  color: #7dd3fc;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-icon-link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.5);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.social-icon-link:hover {
  color: #f8fafc;
  border-color: #7dd3fc;
  background: rgba(125, 211, 252, 0.15);
  text-decoration: none;
}

.social-icon-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

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

.site-footer a:hover {
  color: #bae6fd;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .about-split {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }

  .about-photo-wrap {
    width: min(68vw, 220px);
    height: min(68vw, 220px);
  }

  .project-scroll .project-card {
    flex-basis: min(84vw, 320px);
  }

  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.6rem 0;
  }

  .tabs {
    width: 100%;
    padding-bottom: 0.2rem;
  }

  main {
    padding-top: 7.75rem;
  }
}
