﻿:root {
  --bg: #0b1117;
  --text: #edf3f7;
  --muted: #a6b7c3;
  --line: rgba(237, 243, 247, 0.12);
  --accent: #82d6ff;
  --accent-strong: #42c2ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  --radius: 20px;
  --radius-sm: 14px;
}

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

body {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 130% at 90% -10%, rgba(127, 214, 255, 0.2), transparent 40%),
    radial-gradient(90% 100% at -10% 20%, rgba(86, 155, 201, 0.24), transparent 35%),
    linear-gradient(180deg, var(--bg) 0%, #0a151e 100%);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  backdrop-filter: blur(12px);
  background: rgba(9, 18, 25, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav-name {
  font-family: "Zalando Sans Expanded", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  align-content: center;
  gap: 5px;
  padding-inline: 10px;
  cursor: pointer;
}

.menu-line {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 20px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-open .menu-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 1.2rem;
  width: min(240px, calc(100vw - 2.4rem));
  background: rgba(12, 24, 34, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.45rem;
  display: grid;
  gap: 0.25rem;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.menu-open + .nav-panel,
.nav-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.5rem 0.62rem;
  font-size: 0.9rem;
  transition: 160ms ease;
}

.nav-link:hover {
  border-color: var(--line);
  color: var(--accent);
}

.nav-link.active {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle {
  position: fixed;
  right: 1rem;
  top: 5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 25;
}

.theme-toggle-track {
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(236, 242, 245, 0.25);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 2px;
}

.theme-toggle-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(0);
  transition: transform 220ms ease;
}

.theme-light .theme-toggle-thumb {
  transform: translateX(22px);
  background: var(--accent-strong);
}

.hero {
  min-height: 52vh;
  display: grid;
  align-content: end;
  padding: 5rem 1.2rem 2.8rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(7, 12, 18, 0.38), rgba(7, 12, 18, 0.82)),
    url("IMG_1974.jpeg") center / cover no-repeat;
}

.hero-projects {
  min-height: 38vh;
  background:
    linear-gradient(rgba(7, 12, 18, 0.65), rgba(7, 12, 18, 0.9)),
    radial-gradient(circle at 20% 20%, rgba(127, 214, 255, 0.22), transparent 40%),
    linear-gradient(180deg, #102232 0%, #0a151e 100%);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.7rem;
}

h1,
h2,
h3 {
  font-family: "Zalando Sans Expanded", sans-serif;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(2.4rem, 9vw, 5.4rem);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  max-width: 48ch;
  margin-top: 0.9rem;
  color: var(--muted);
}

main {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
}

.flow-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}

.flow-section:last-child {
  border-bottom: 0;
}

h2 {
  font-size: clamp(1.25rem, 4vw, 2.2rem);
  margin-bottom: 1.2rem;
}

p {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 0.68rem;
}

.meta-line {
  color: var(--muted);
  letter-spacing: 0.04em;
}

.carousel {
  position: relative;
  margin-top: 1.2rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.carousel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 420ms ease;
  pointer-events: none;
}

.carousel-image-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.carousel-button:hover {
  background: rgba(0, 0, 0, 0.55);
}

.carousel-prev {
  left: 0.7rem;
}

.carousel-next {
  right: 0.7rem;
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.48rem;
  z-index: 2;
}

.dot {
  border: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.dot.active {
  background: #fff;
}

.carousel-caption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  min-height: 1.3rem;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.education-grid article {
  padding: 0.9rem 0;
}

.education-grid h3 {
  font-size: 1rem;
  margin-bottom: 0.55rem;
}

.education-grid p {
  color: var(--muted);
}

.visuae-link {
  display: inline-block;
  margin-top: 0.8rem;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.1rem;
}

.projects-main {
  width: min(1240px, calc(100% - 2rem));
}

.projects-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.2rem;
  margin-top: 1.3rem;
}

.projects-filter {
  position: sticky;
  top: 5.6rem;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.projects-filter h3 {
  font-size: 0.92rem;
  text-transform: lowercase;
  margin-bottom: 0.8rem;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-chip {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 0.45rem 0.58rem;
  font-size: 0.84rem;
  cursor: pointer;
  transition: 160ms ease;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.active {
  border-color: var(--accent);
  background: rgba(127, 214, 255, 0.12);
  color: var(--accent);
}

.projects-content {
  min-width: 0;
}

.projects-count {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 0.9rem;
}

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

.project-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

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

.project-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin-bottom: 0.4rem;
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.project-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text);
}

.project-actions {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.95rem;
}

.project-actions a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  font-size: 0.88rem;
}

.projects-empty {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

footer {
  width: 100%;
  margin: 2rem 0 1.3rem;
  padding-top: 1.2rem;
  padding-inline: max(2.5vw, 1rem);
  border-top: 1px solid var(--line);
}

footer .footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

footer .footer-text {
  min-width: 0;
}

footer p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

footer a {
  color: var(--text);
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-logo {
  display: block;
  width: clamp(130px, 14vw, 210px);
  height: auto;
  opacity: 0.92;
}

.theme-light {
  --bg: #eef5f9;
  --text: #112433;
  --muted: #3c5a6d;
  --line: rgba(17, 36, 51, 0.22);
  --accent: #006ea0;
  --accent-strong: #148cc4;
  --shadow: 0 18px 42px rgba(13, 33, 46, 0.22);
}

body.theme-light {
  background:
    radial-gradient(120% 130% at 90% -10%, rgba(0, 110, 160, 0.17), transparent 40%),
    radial-gradient(90% 100% at -10% 20%, rgba(31, 129, 182, 0.2), transparent 35%),
    linear-gradient(180deg, #eff6fa 0%, #e3edf3 100%);
}

.theme-light .site-nav {
  background: rgba(243, 249, 252, 0.78);
}

.theme-light .menu-toggle {
  background: rgba(17, 36, 51, 0.04);
}

.theme-light .nav-panel {
  background: rgba(249, 252, 255, 0.98);
}

.theme-light .hero {
  background:
    linear-gradient(rgba(240, 247, 251, 0.42), rgba(227, 237, 243, 0.78)),
    url("IMG_1974.jpeg") center / cover no-repeat;
}

.theme-light .hero-projects {
  background:
    linear-gradient(rgba(240, 247, 251, 0.7), rgba(227, 237, 243, 0.88)),
    radial-gradient(circle at 20% 20%, rgba(0, 110, 160, 0.18), transparent 40%),
    linear-gradient(180deg, #eff6fa 0%, #dfeaf1 100%);
}

.theme-light .project-card {
  background: rgba(17, 36, 51, 0.03);
}

.theme-light .projects-filter {
  background: rgba(17, 36, 51, 0.03);
}

.theme-light .filter-chip {
  background: rgba(17, 36, 51, 0.02);
}

.theme-light .filter-chip.active {
  background: rgba(0, 110, 160, 0.1);
}

@media (max-width: 900px) {
  .education-grid {
    grid-template-columns: 1fr;
  }

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

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

  .projects-filter {
    position: static;
  }

  .filter-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .filter-chip {
    width: auto;
  }
}

@media (max-width: 700px) {
  .site-nav {
    padding: 0.75rem;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .hero {
    min-height: 40vh;
    padding: 4rem 0.9rem 2rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 14vw, 3.2rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .theme-toggle {
    right: 0.75rem;
    top: auto;
    bottom: 0.9rem;
  }

  .nav-panel {
    right: 0.5rem;
    width: min(300px, calc(100vw - 1rem));
  }

  .flow-section {
    padding: 2.1rem 0;
  }

  p {
    font-size: 0.95rem;
  }

  .carousel {
    border-radius: 12px;
  }

  .carousel-button {
    width: 32px;
    height: 32px;
  }

  .carousel-dots {
    bottom: 0.45rem;
  }

  .projects-main {
    width: min(1240px, calc(100% - 1rem));
  }

  .projects-layout {
    gap: 0.85rem;
  }

  .projects-filter {
    padding: 0.8rem;
  }

  .filter-list {
    gap: 0.4rem;
  }

  .filter-chip {
    font-size: 0.8rem;
    padding: 0.4rem 0.55rem;
  }

  .project-card {
    padding: 0.95rem;
  }

  .project-tags span {
    font-size: 0.75rem;
  }

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

  footer {
    margin-top: 1.6rem;
    padding-inline: 1rem;
  }

  footer .footer-text p {
    overflow-wrap: anywhere;
  }

  .footer-logo {
    width: 128px;
  }
}

@media (max-width: 420px) {
  .nav-name {
    font-size: 0.98rem;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  h2 {
    margin-bottom: 0.9rem;
  }

  .project-tags {
    gap: 0.4rem;
  }

  .footer-logo {
    width: 112px;
  }
}
