:root {
  --bg-overlay: rgba(8, 13, 28, 0.72);
  --panel: rgba(255, 255, 255, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.82);
  --text: #111827;
  --brand: #b91c1c;
  --brand-dark: #7f1d1d;
  --muted: #334155;
  --radius: 14px;
  --shadow: 0 12px 34px rgba(2, 6, 23, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: 16px;
  color: #fff;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(140deg, #05070f 0%, #0f172a 60%, #1d3557 100%);
}

.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  opacity: 0.32;
  z-index: -2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: -1;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 30;
}

.navbar {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  width: 260px;
  min-height: calc(100vh - 2.5rem);
  background: rgba(127, 29, 29, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.2rem 1rem;
  z-index: 20;
}

.profile-image {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  margin: 0 auto 0.5rem;
}

.nav-element {
  text-decoration: none;
  color: #fff;
  font-size: 0.98rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
}

.nav-element:hover,
.nav-element:focus-visible {
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-dark);
}

.social {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.social a {
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.social a:hover,
.social a:focus-visible {
  background: #fff;
  color: var(--brand-dark);
}

.hero {
  margin-left: 320px;
  padding: 2rem 2rem 1rem;
}

.hero-kicker {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #dbeafe;
}

.heading {
  margin: 0.25rem 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 0;
  max-width: 760px;
  color: #e2e8f0;
}

.container {
  margin-left: 320px;
  padding: 1rem 2rem 2rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.card h2 {
  margin-top: 0;
  color: var(--brand-dark);
}

.card h3 {
  margin-bottom: 0.45rem;
  color: #0f172a;
}

.card p {
  margin: 0.45rem 0;
  line-height: 1.5;
}

.card ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.card li {
  margin: 0.4rem 0;
  line-height: 1.45;
}

.project-item,
.post-item {
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.7rem;
}

#contact a {
  color: var(--brand-dark);
  font-weight: 600;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-block;
  }

  .navbar {
    width: min(84vw, 320px);
    min-height: auto;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    transform: translateX(-125%);
    transition: transform 0.2s ease;
  }

  .navbar.open {
    transform: translateX(0);
  }

  .hero,
  .container {
    margin-left: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding-top: 4.25rem;
  }
}

@media (max-width: 560px) {
  .card {
    padding: 1rem;
  }
}
