:root {
  --bg: #050712;
  --bg-elevated: #0b1020;
  --bg-soft: #111827;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --accent: #22d3ee; /* cyan */
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-strong: #06b6d4;
  --danger: #fb7185;

  --radius-lg: 18px;
  --radius-md: 999px;
  --radius-sm: 999px;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  --shadow-outline: 0 0 0 1px rgba(148, 163, 184, 0.3);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.85rem;
  --text-md: 0.95rem;
  --text-lg: 1.15rem;
  --text-xl: 1.6rem;
  --text-2xl: 2.3rem;

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: radial-gradient(circle at 0 0, #1d2233 0, transparent 45%),
    radial-gradient(circle at 100% 0, #0f172a 0, transparent 45%),
    radial-gradient(circle at 50% 110%, #0b1120 0, transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-strong);
}

button {
  font-family: inherit;
}

.shell {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.92),
      rgba(15, 23, 42, 0.88),
      transparent
    );
  border-bottom: 1px solid rgba(30, 64, 175, 0.3);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.22rem 0.9rem 0.22rem 0.3rem;
  border-radius: 999px;
  background: linear-gradient(
      120deg,
      rgba(34, 211, 238, 0.12),
      rgba(129, 140, 248, 0.08)
    ),
    rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), var(--shadow-outline);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: conic-gradient(
    from 220deg,
    #22d3ee,
    #a855f7,
    #f97316,
    #22d3ee
  );
  position: relative;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9),
    0 0 20px rgba(34, 211, 238, 0.4);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 25%, #f9fafb 0, #0b1120 60%);
  mix-blend-mode: screen;
}

.brand-text {
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

.nav-toggle {
  display: none;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
}

.nav-toggle-bar + .nav-toggle-bar {
  margin-top: 3px;
}

main {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr);
  padding-block: var(--space-6);
}

.hero-content {
  position: relative;
  padding: var(--space-4);
  border-radius: 26px;
  background:
    radial-gradient(circle at 0 0, rgba(34, 211, 238, 0.14) 0, transparent 55%),
    radial-gradient(
      circle at 80% 0,
      rgba(168, 85, 247, 0.2) 0,
      transparent 55%
    ),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.hero-content::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 24px;
  background: radial-gradient(
      circle at 20% 0,
      rgba(59, 130, 246, 0.4),
      transparent 55%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(14, 165, 233, 0.3),
      transparent 55%
    ),
    linear-gradient(145deg, #020617 0%, #020617 40%, #020617 100%);
  opacity: 0.88;
  z-index: 0;
}

.hero-content > * {
  position: relative;
  z-index: 1;
}

.hero-main {
  flex: 1 1 0;
  min-width: 0;
}

.hero-eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 2.9rem);
  margin: 0 0 0.4rem;
  letter-spacing: 0.03em;
}

.hero-title {
  font-size: var(--text-lg);
  color: #e5e7eb;
  margin: 0 0 var(--space-3);
}

.hero-tagline {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 38rem;
  margin-bottom: var(--space-4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hero-portrait {
  flex: 0 0 auto;
  width: 200px;
  height: 200px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(148, 163, 184, 0.7),
    0 18px 40px rgba(15, 23, 42, 0.9);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease,
    transform 0.12s ease, border-color 0.16s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  color: #0b1120;
  box-shadow: 0 12px 40px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 46px rgba(56, 189, 248, 0.5);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.6);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(148, 163, 184, 0.9);
}

.section {
  padding-block: var(--space-5);
}

.section-header {
  margin-bottom: var(--space-3);
}

.section-header h2 {
  font-size: var(--text-xl);
  margin: 0 0 0.25rem;
}

.section-kicker {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.section-body {
  color: var(--text-muted);
  font-size: var(--text-md);
}

.section-body p {
  margin: 0 0 0.8rem;
}

.section-body p:last-child {
  margin-bottom: 0;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}

.card {
  position: relative;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: radial-gradient(
      circle at 0 0,
      rgba(15, 23, 42, 1) 0,
      rgba(15, 23, 42, 1) 45%
    ),
    linear-gradient(145deg, #020617, #020617);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-lg) - 2px);
  background: radial-gradient(
      circle at 0 0,
      rgba(37, 99, 235, 0.08),
      transparent 55%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(56, 189, 248, 0.06),
      transparent 55%
    );
  opacity: 0.75;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 0.75rem;
}

.card-header h3 {
  font-size: var(--text-lg);
  margin: 0 0 0.1rem;
  color: var(--text-main);
}

.card-meta {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin: 0;
}

.card-tag {
  font-size: var(--text-xs);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.6);
  white-space: nowrap;
}

.card-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  font-size: var(--text-md);
}

.card-list li {
  padding-left: 0.2rem;
}

.card-link {
  font-size: var(--text-xs);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
}

.card-link:hover,
.card-link:focus-visible {
  border-color: rgba(148, 163, 184, 0.9);
  transform: translateY(-1px);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.skills-group h3 {
  font-size: var(--text-md);
  margin: 0 0 0.6rem;
  color: var(--text-main);
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill-list li {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  font-size: var(--text-xs);
  color: var(--text-main);
}

.contact {
  font-size: var(--text-md);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.contact-list a {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  font-size: var(--text-sm);
}

.site-footer {
  border-top: 1px solid rgba(30, 64, 175, 0.4);
  padding-block: var(--space-3);
  background: radial-gradient(
      circle at 50% 0,
      rgba(30, 64, 175, 0.5),
      transparent 60%
    ),
    rgba(15, 23, 42, 0.98);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .site-header .shell {
    padding-block: var(--space-2);
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    right: 1rem;
    top: 3.4rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.4rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: var(--shadow-soft);
    transform-origin: top right;
    transform: scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  .nav-links-open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  .nav-links a {
    justify-content: flex-start;
    border-radius: 12px;
  }

  main {
    padding-top: var(--space-5);
  }

  .hero {
    padding-block: var(--space-5);
  }

  .hero-content {
    padding: var(--space-3);
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-portrait {
    width: 110px;
    height: 110px;
    align-self: flex-end;
  }

  .skills-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@supports (animation: fade-in 1s ease-out) {
  .hero-content,
  .card,
  .skills-group,
  .contact-list li {
    animation: fade-in-up 0.7s ease-out both;
  }

  .card {
    animation-delay: 0.1s;
  }

  .card:nth-of-type(2) {
    animation-delay: 0.17s;
  }

  .skills-group:nth-of-type(2) {
    animation-delay: 0.08s;
  }

  .skills-group:nth-of-type(3) {
    animation-delay: 0.14s;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
