:root {
  --bg-dark: #050505;
  --bg-panel: rgba(20, 20, 22, 0.6);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #a855f7;
  --accent: #06b6d4;

  --text-main: #ededed;
  --text-muted: #888888;

  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25;
  animation: float 20s infinite alternate;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  top: 40%;
  left: 30%;
  opacity: 0.15;
  animation-delay: -10s;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(5, 5, 5, 0.7);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
}

.nav-link:hover {
  color: var(--text-main);
}

.lang-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: 0.3s;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.bar {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: 0.3s;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(to bottom right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--primary);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-button {
  background: var(--text-main);
  color: var(--bg-dark);
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.main-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.1);
}

.social-mini {
  display: flex;
  gap: 20px;
  font-size: 1.4rem;
  color: var(--text-muted);
}

.social-mini a:hover {
  color: var(--text-main);
  transform: scale(1.1);
}

/* === Bento Grid (Cards) === */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 50px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.bento-card {
  background: linear-gradient(180deg, rgba(30, 30, 35, 0.7) 0%, rgba(20, 20, 22, 0.4) 100%);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 32px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
}

.bento-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(180deg, rgba(35, 35, 40, 0.8) 0%, rgba(25, 25, 27, 0.5) 100%);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: var(--primary);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 16px;
}

.bento-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  flex-grow: 1;
  line-height: 1.6;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags-row span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.bento-card:hover .tags-row span {
  border-color: rgba(99, 102, 241, 0.2);
  color: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 28px;
  cursor: pointer;
  transition: 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--primary);
  background: rgba(30, 30, 35, 0.8);
  box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.15);
}

.project-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.folder-icon {
  color: var(--primary);
  font-size: 1.6rem;
}

.project-links-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.project-links-top i {
  color: var(--text-muted);
  transition: 0.3s;
  font-size: 1.1rem;
}

.arrow-icon {
  opacity: 0;
  transform: translateX(-5px);
}

.project-card:hover .arrow-icon {
  opacity: 1;
  transform: translateX(0);
}

.project-card:hover .project-links-top i {
  color: #fff;
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 650px;
  padding: 20px;
  z-index: 10001;
}

.modal-content {
  background: #0f0f11;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.modal.active .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-right: 40px;
}

.modal-icon-wrapper {
  min-width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.modal-header h2 {
  font-size: 1.8rem;
  line-height: 1.1;
  margin-bottom: 8px;
}

.modal-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.modal-body p {
  color: #d4d4d8;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.modal-tags-wrapper h4 {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags-cloud span {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 8px;
}

/* Футер модалки */
.modal-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: var(--text-main);
  color: var(--bg-dark);
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
  transition: 0.2s;
}

.modal-btn:hover {
  background: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 1.2rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.footer-links a:hover {
  opacity: 1;
  color: #fff;
}

/* === Mobile === */
@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #000;
    flex-direction: column;
    justify-content: center;
    transition: 0.3s;
    z-index: 99;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    font-size: 1.5rem;
  }

  .hamburger {
    display: flex;
    z-index: 101;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(20px, 40px);
  }
}
