:root {
  --bg: #070b1a;
  --bg-soft: #0d1530;
  --surface: rgba(20, 31, 64, 0.72);
  --surface-solid: #18264f;
  --text: #eef2ff;
  --text-muted: #aab6db;
  --primary: #89b4ff;
  --primary-2: #7cf7d4;
  --primary-hover: #a9c7ff;
  --border: rgba(137, 180, 255, 0.28);
  --shadow: 0 20px 50px rgba(5, 9, 22, 0.55);
  --radius: 16px;
  --container: 1040px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(circle at 12% 0%, #1a2660 0%, transparent 36%),
    radial-gradient(circle at 85% 10%, #11605d 0%, transparent 32%), var(--bg);
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--primary-hover);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 11, 26, 0.72);
  border-bottom: 1px solid rgba(137, 180, 255, 0.2);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1rem;
}

.logo {
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  font-weight: 800;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  transition: all 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--border);
  background: rgba(137, 180, 255, 0.12);
  color: var(--text);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
}

.lang-toggle {
  border: 1px solid var(--border);
  background: rgba(137, 180, 255, 0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  background: rgba(137, 180, 255, 0.22);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: rgba(124, 247, 212, 0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: rgba(124, 247, 212, 0.2);
}

.hero {
  padding: 6rem 0 4rem;
  border-bottom: 1px solid rgba(137, 180, 255, 0.16);
}

.hero .container {
  background: linear-gradient(145deg, rgba(23, 37, 76, 0.78), rgba(16, 25, 51, 0.64));
  border: 1px solid rgba(137, 180, 255, 0.25);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 3vw, 2.3rem);
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-avatar-wrap {
  flex: 0 0 auto;
}

.hero-avatar {
  width: clamp(156px, 24vw, 220px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 18px rgba(10, 18, 40, 0.28);
}

.hero-kicker {
  margin: 0 0 0.65rem;
  color: var(--primary-2);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.16;
  max-width: 780px;
}

.hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 720px;
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.section {
  padding: 3.8rem 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(13, 21, 48, 0.45), rgba(13, 21, 48, 0.7));
}

.section .container {
  background: var(--surface);
  border: 1px solid rgba(137, 180, 255, 0.19);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: clamp(1.05rem, 2.5vw, 1.8rem);
}

.section h2 {
  margin-top: 0;
  margin-bottom: 0.95rem;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}

.section-intro {
  margin-top: 0;
  color: var(--text-muted);
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tag-list li {
  background: linear-gradient(135deg, rgba(137, 180, 255, 0.2), rgba(124, 247, 212, 0.16));
  border: 1px solid rgba(137, 180, 255, 0.35);
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  font-size: 0.88rem;
}

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

.project-card {
  border: 1px solid rgba(137, 180, 255, 0.26);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(31, 48, 95, 0.82), rgba(24, 35, 70, 0.7));
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(169, 199, 255, 0.45);
  box-shadow: 0 12px 30px rgba(7, 11, 26, 0.45);
}

.project-card h3 {
  margin: 0;
}

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

.project-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #eaf8ff;
  background: linear-gradient(135deg, rgba(124, 247, 212, 0.36), rgba(137, 180, 255, 0.38));
  border: 1px solid rgba(124, 247, 212, 0.55);
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
}

.project-card-footer {
  margin-top: auto;
}

.project-page {
  max-width: 800px;
}

.project-page section {
  margin-top: 1.3rem;
}

.project-back-link {
  margin-top: 0;
}

.project-title {
  margin-bottom: 0.6rem;
}

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

.feature-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

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

.btn-link {
  display: inline-block;
  padding: 0.56rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(137, 180, 255, 0.42);
  color: #f2f6ff;
  background: linear-gradient(135deg, #4d7ff0, #4071dc);
  box-shadow: 0 8px 18px rgba(56, 97, 192, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-link:hover,
.btn-link:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(56, 97, 192, 0.45);
  filter: brightness(1.07);
}

.btn-link-secondary {
  background: linear-gradient(135deg, rgba(124, 247, 212, 0.2), rgba(137, 180, 255, 0.2));
  border-color: rgba(124, 247, 212, 0.42);
  box-shadow: none;
}

.contact-list,
.social-list {
  margin: 0;
  padding-left: 1.15rem;
}

.contact-list li,
.social-list li {
  margin-bottom: 0.32rem;
}

.site-footer {
  border-top: 1px solid rgba(137, 180, 255, 0.18);
  padding: 1.55rem 0;
}

.site-footer .container {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
}

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

  .header-controls {
    margin-left: 0;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: rgba(7, 11, 26, 0.95);
    border-top: 1px solid rgba(137, 180, 255, 0.26);
    border-bottom: 1px solid rgba(137, 180, 255, 0.26);
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav-static {
    display: flex;
    position: static;
    border: 0;
    background: transparent;
    padding: 0;
    flex-direction: row;
  }

  .site-nav-static a {
    padding: 0.22rem 0;
    border: 0;
    border-radius: 0;
  }

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

  .hero-layout {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .section {
    padding: 2.6rem 0;
  }
}

html[data-theme="light"] {
  --bg: #f3f6ff;
  --bg-soft: #ebf1ff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --text: #0f1a36;
  --text-muted: #4f628f;
  --primary: #2c61d6;
  --primary-2: #0f8c78;
  --primary-hover: #1f4fb8;
  --border: rgba(44, 97, 214, 0.25);
  --shadow: 0 14px 36px rgba(31, 53, 103, 0.12);
}

html[data-theme="light"] body {
  background: radial-gradient(circle at 10% 0%, #dbe6ff 0%, transparent 34%),
    radial-gradient(circle at 88% 12%, #d9fff5 0%, transparent 32%), var(--bg);
}

html[data-theme="light"] .site-header {
  background: rgba(243, 246, 255, 0.88);
  border-bottom: 1px solid rgba(44, 97, 214, 0.2);
}

html[data-theme="light"] .site-nav a {
  color: #3f5280;
}

html[data-theme="light"] .hero .container {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.9));
  border: 1px solid rgba(44, 97, 214, 0.2);
}

html[data-theme="light"] .hero-avatar {
  border-color: rgba(44, 97, 214, 0.26);
  box-shadow: 0 10px 24px rgba(31, 53, 103, 0.16), 0 0 0 1px rgba(44, 97, 214, 0.22);
}

html[data-theme="light"] .section-muted {
  background: linear-gradient(180deg, rgba(235, 241, 255, 0.72), rgba(235, 241, 255, 0.92));
}

html[data-theme="light"] .section .container {
  border: 1px solid rgba(44, 97, 214, 0.18);
}

html[data-theme="light"] .project-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 255, 0.93));
  border: 1px solid rgba(44, 97, 214, 0.2);
}

html[data-theme="light"] .project-badge {
  color: #0f5d67;
  background: linear-gradient(135deg, rgba(15, 140, 120, 0.16), rgba(44, 97, 214, 0.15));
  border-color: rgba(15, 140, 120, 0.4);
}

html[data-theme="light"] .btn-link {
  color: #ffffff;
}

html[data-theme="light"] .btn-link-secondary {
  color: #164f8e;
}

html[data-theme="light"] .site-footer {
  border-top: 1px solid rgba(44, 97, 214, 0.18);
}
