:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #111114;
  --surface-hover: #17171b;
  --border: #25252b;
  --text: #f2f2f4;
  --muted: #92929d;
  --accent: #b8ff65;
  --radius: 16px;
  --container: 1080px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.accent {
  color: var(--accent);
}

.muted,
.section-description,
.contact-description {
  color: var(--muted);
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgb(255 255 255 / 5%);
  background: rgb(11 11 13 / 88%);
  backdrop-filter: blur(16px);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  flex-shrink: 0;
  font-family: "DM Mono", monospace;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.07em;
}

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

.logo i {
  color: var(--accent);
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 180ms ease;
}

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

.nav-links .nav-contact {
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.nav-links .nav-contact:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 11px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--text);
  transition: transform 180ms ease;
}

.menu-toggle.active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle.active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.hero {
  min-height: 0;
  display: flex;
  align-items: center;
  padding-block: 65px 55px;
}

.hero-content {
  max-width: 740px;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin-bottom: 0;
  font-size: clamp(3.8rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.085em;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 27px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
}

.section {
  padding-block: 76px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

.section-heading h2,
.contact-inner h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.06em;
}

.section-description {
  margin-top: 12px;
  font-size: 0.95rem;
}

.about-layout {
  max-width: 760px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.about-copy p {
  color: var(--muted);
  font-size: 0.97rem;
}

.about-copy p + p {
  margin-top: 18px;
}

.about-copy .lead {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  min-height: 175px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: #45454d;
  background: var(--surface-hover);
}

.skill-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgb(184 255 101 / 20%);
  border-radius: 10px;
  background: rgb(184 255 101 / 7%);
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.9rem;
  font-weight: 500;
}

.python-icon {
  color: #91b9ff;
  border-color: rgb(145 185 255 / 20%);
  background: rgb(145 185 255 / 7%);
}

.html-icon {
  font-size: 0.78rem;
}

.node-icon {
  color: #a4e6a4;
  border-color: rgb(164 230 164 / 20%);
  background: rgb(164 230 164 / 7%);
}

.skill-card h3 {
  margin-bottom: 5px;
  font-size: 0.98rem;
  font-weight: 600;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
}

.text-link {
  color: var(--accent);
  transition: opacity 180ms ease;
}

.text-link:hover {
  opacity: 0.75;
}

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

.project-card,
.loading-card,
.empty-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #45454d;
  background: var(--surface-hover);
}

.project-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-name {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  font-weight: 600;
}

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

.project-visibility {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
}

.project-description {
  flex: 1;
  margin-block: 14px 22px;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.project-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
}

.project-language {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.language-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.loading-card,
.empty-card {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
}

.loading-dots {
  display: inline-block;
  width: 20px;
  overflow: hidden;
  vertical-align: bottom;
  animation: loading 1.2s steps(4, end) infinite;
}

@keyframes loading {
  from {
    width: 0;
  }

  to {
    width: 20px;
  }
}

.contact-section {
  margin-top: 50px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 50% 0%, rgb(184 255 101 / 6%), transparent 60%),
    var(--surface);
}

.contact-inner {
  padding-block: 100px;
  text-align: center;
}

.contact-inner .eyebrow {
  margin-bottom: 14px;
}

.contact-description {
  max-width: 530px;
  margin: 20px auto 0;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.social-link {
  display: inline-flex;
  min-width: 105px;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  font-size: 0.85rem;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

.footer {
  padding-block: 25px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  color: var(--muted);
  font-size: 0.78rem;
}

.copyright {
  font-family: "DM Mono", monospace;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 800px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    gap: 20px;
  }

  .hero {
    min-height: 400px;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .navbar {
    min-height: 68px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    right: 16px;
    left: 16px;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #111114;
    box-shadow: 0 18px 40px rgb(0 0 0 / 30%);
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
  }

  .nav-links a {
    display: block;
    padding: 12px;
  }

  .nav-links .nav-contact {
    border: 0;
  }

  .hero {
    min-height: 0;
    padding-block: 45px 35px;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 17vw, 5rem);
  }

  .section {
    padding-block: 55px;
  }

  .about-layout {
    padding: 22px;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: auto;
  }

  .skill-icon {
    margin-bottom: 13px;
  }

  .contact-inner {
    padding-block: 75px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
