:root {
  --bg-color: #050816;
  --bg-alt-color: #0b1020;
  --surface-color: #111827;
  --text-color: #e5e7eb;
  --muted-text-color: #9ca3af;
  --accent-color: #38bdf8;
  --accent-color-soft: rgba(56, 189, 248, 0.12);
  --border-color: rgba(148, 163, 184, 0.3);
  --danger-color: #f97373;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    sans-serif;

  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.55);
  --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.45);

  --content-width: min(1120px, 100% - 2.5rem);
  --header-height: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #1f2937 0, #020617 45%, #000 100%);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
textarea {
  font-family: inherit;
}

main {
  padding-top: var(--header-height);
}

.container {
  width: var(--content-width);
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(circle at bottom, rgba(129, 140, 248, 0.2), transparent 60%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 2.4vw, 2.15rem);
  letter-spacing: 0.03em;
}

.section-intro {
  margin: 0 0 2rem;
  color: var(--muted-text-color);
  max-width: 38rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.78));
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 0.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  color: inherit;
  text-decoration: none;
}

.brand-title {
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.brand-subtitle {
  font-size: 0.7rem;
  text-transform: lowercase;
  color: var(--muted-text-color);
}

.brand-subtitle:hover,
.brand-subtitle:focus-visible {
  letter-spacing: 0.08em;
  color: var(--accent-color);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-nav a {
  display: block;
  padding: 0.35rem 0;
  color: var(--muted-text-color);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-color);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), rgba(30, 64, 175, 0.2));
  color: inherit;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 1.2rem;
  height: 2px;
  border-radius: 999px;
  background-color: var(--text-color);
  display: block;
  position: relative;
}

.nav-toggle-bar + .nav-toggle-bar {
  margin-top: 0.22rem;
}

.site-nav {
  position: absolute;
  inset-inline: 0;
  top: var(--header-height);
  padding: 0.75rem 1.25rem 1.25rem;
  background: radial-gradient(circle at top, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
  transform-origin: top;
  transform: scaleY(0.8);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 150ms ease-out,
    transform 150ms ease-out;
}

body.nav-open .site-nav {
  opacity: 1;
  transform: scaleY(1);
  pointer-events: auto;
}

.hero {
  padding: 4.5rem 0 4rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.hero-text {
  max-width: 34rem;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2.3rem, 5vw, 2.9rem);
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin: 0 0 1.75rem;
  color: var(--muted-text-color);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 140ms ease-out,
    color 140ms ease-out,
    border-color 140ms ease-out,
    box-shadow 140ms ease-out,
    transform 80ms ease-out;
}

.btn-primary {
  background: radial-gradient(circle at top, #38bdf8, #0ea5e9);
  color: #0b1120;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: radial-gradient(circle at top, #06b6d4, #0284c7);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-color);
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: var(--shadow-subtle);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(148, 163, 184, 0.9);
  text-decoration: none;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.95));
  color: var(--text-color);
  font-size: 0.8rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.98));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 1.3rem 1.35rem 1.2rem;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-title {
  margin: 0;
  font-size: 1.1rem;
}

.project-description {
  margin: 0;
  color: var(--muted-text-color);
}

.project-tech {
  margin: 0.3rem 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted-text-color);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-link {
  font-size: 0.85rem;
  color: var(--accent-color);
}

.cv-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cv-item {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.98));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 1.3rem 1.35rem 1.2rem;
  box-shadow: var(--shadow-subtle);
}

.cv-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.cv-meta {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-text-color);
}

.cv-item ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  color: var(--muted-text-color);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-form {
  margin-top: 2rem;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 1.5rem 1.4rem 1.4rem;
  box-shadow: var(--shadow-subtle);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.85rem;
  color: var(--muted-text-color);
}

.form-field input,
.form-field textarea {
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 0.55rem 0.85rem;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
  color: var(--text-color);
  resize: vertical;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 1px;
  border-color: transparent;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.5);
  padding: 1.4rem 0 1.6rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.85));
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-text-color);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-links a {
  color: var(--muted-text-color);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.egg-badge {
  display: none;
  margin-left: 0.75rem;
  font-size: 0.75rem;
  color: var(--accent-color);
}

body.egg-unlocked .egg-badge {
  display: inline-block;
}

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

@media (min-width: 640px) {
  .section {
    padding: 5rem 0;
  }

  .hero {
    padding: 5rem 0 4.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-row {
    flex-direction: row;
  }

  .form-field {
    flex: 1;
  }
}

@media (min-width: 840px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-text {
    max-width: 30rem;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto;
    padding: 0;
    background: transparent;
    border: none;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 1.5rem;
  }

  .site-nav a {
    padding: 0.25rem 0;
  }

  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

