:root {
  --bg-dark: #050508;
  --bg-darker: #020204;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(155, 109, 255, 0.3);
  
  --text-main: #f0eeff;
  --text-muted: rgba(240, 238, 255, 0.65);
  --text-dim: rgba(240, 238, 255, 0.55);

  --purple-main: #9b6dff;
  --purple-deep: #6b3fff;
  --purple-glow: rgba(155, 109, 255, 0.25);
  --cyan-accent: #00e5ff;
  --green-status: #4ade80;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-code: 'Fira Code', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--cyan-accent);
  outline-offset: 3px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Canvas Shooting Stars / Comets */
.comets-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Scroll Reveal Animations ("вылетает снизу") */
.reveal {
  opacity: 0;
  transform: translateY(35px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Hero Entrance Animations */
.anim-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  will-change: transform, opacity;
  animation: wordIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-fade-up {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Selection Color — purple highlight with crisp white text so purple labels never blend in */
::selection {
  background: rgba(155, 109, 255, 0.38);
  color: #ffffff !important;
}
::-moz-selection {
  background: rgba(155, 109, 255, 0.38);
  color: #ffffff !important;
}
.detail-label::selection {
  background: rgba(155, 109, 255, 0.45);
  color: #ffffff !important;
}
.detail-label::-moz-selection {
  background: rgba(155, 109, 255, 0.45);
  color: #ffffff !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wordIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--purple-deep);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--purple-main);
}

/* Ambient Noise Overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
}

/* Glowing Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.glow-1 {
  top: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(107, 63, 255, 0.35), transparent 70%);
}

.glow-2 {
  bottom: 20%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(155, 109, 255, 0.25), transparent 70%);
  animation-delay: -5s;
}

.glow-3 {
  top: 40%;
  left: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15), transparent 70%);
  animation-delay: -9s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.1); }
}

/* High-Tech Background Grid Pattern */
.grid-pattern {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(168, 85, 247, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.085) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 92% 88% at 50% 35%, black 45%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 35%, black 45%, transparent 95%);
  pointer-events: none;
  z-index: 0;
}

/* Container & Layout */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.purple-accent {
  color: var(--purple-main);
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 20%, var(--purple-main) 70%, var(--cyan-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-padding {
  padding: 85px 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  font-family: var(--font-code);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--purple-main);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(155, 109, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(107, 63, 255, 0.1);
}

.glass-card:hover::before {
  opacity: 1;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1000;
  transition: all 0.4s ease;
}

nav.scrolled {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-text {
  display: inline-block;
  transform: scaleY(1.15);
  transform-origin: center center;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: text-shadow 0.35s ease, color 0.35s ease;
}

.logo-icon-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 16px rgba(155, 109, 255, 0.4);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.logo-icon {
  width: 100%;
  height: 100%;
  max-width: 36px;
  max-height: 36px;
  object-fit: cover;
  transition: filter 0.35s ease;
}

/* ========================================= */
/* WINNING LOGO INTERACTION: Solid Purple P1  */
/* ========================================= */
.logo:hover {
  transform: translateY(-2px);
}

.logo:hover .logo-text {
  color: var(--purple-main);
  text-shadow: 0 0 16px var(--purple-glow);
}

.logo:hover .logo-icon-wrap {
  border-color: var(--purple-main);
  box-shadow: 0 0 22px var(--purple-glow), 0 0 45px rgba(107, 63, 255, 0.45);
}


.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  position: relative;
}

.nav-menu a:hover {
  color: var(--text-main);
}

.nav-menu .btn-nav-cta {
  background: rgba(155, 109, 255, 0.12);
  border: 1px solid rgba(155, 109, 255, 0.3);
  color: var(--purple-main);
  padding: 8px 18px;
  border-radius: 10px;
  transition: all 0.3s;
}

.nav-menu .btn-nav-cta:hover {
  background: var(--purple-deep);
  color: #ffffff;
  box-shadow: 0 0 25px var(--purple-glow);
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  transition: transform 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.98);
  backdrop-filter: blur(30px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

/* Hero Section */
#hero {
  min-height: 90vh;
  padding-top: 130px;
  padding-bottom: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1.5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 3.5rem;
  position: relative;
  max-width: 100%;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green-status);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-status);
}

.pulse-ring {
  position: absolute;
  left: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--green-status);
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.badge-text {
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  white-space: normal;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

/* Hero name line — Syne Cyberpunk (Ultra Bold, Slightly Stretched Vertically) */
.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 9.5vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-main);
  text-transform: uppercase;
  display: inline-block;
  padding: 0.12em 0.35em;
  transform: scaleY(1.15);
  transform-origin: center center;
}

/* Hero role line — lighter, normal font */
.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.6vw, 1.75rem);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  margin-top: 0.45rem;
}

/* Hero tagline — dim, no gradient */
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.35rem);
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  margin-top: 0.2rem;
}

.hero-line-wrap {
  display: block;
  overflow: hidden;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  margin-top: -0.25em;
  margin-bottom: -0.25em;
}

.hero-line {
  display: inline-block;
}

.hero-bio {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.25rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-main));
  color: #ffffff;
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 30px var(--purple-glow);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(155, 109, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(155, 109, 255, 0.3);
  transform: translateY(-2px);
}

/* Code Snippet Box */
.hero-code-box {
  background: #08080f;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  max-width: 520px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: left;
  transition: border-color 0.1s, box-shadow 0.1s;
}

.code-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-title {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.code-content {
  padding: 18px;
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.syn-key { color: var(--purple-main); }
.syn-str { color: #a5d6ff; }

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.75rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card .project-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.project-card .project-footer-tags {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.featured-card {
  border-color: rgba(155, 109, 255, 0.2);
}

.project-header-top {
  margin-bottom: 1.25rem;
}

.project-category {
  font-family: var(--font-code);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple-main);
  display: inline-block;
  margin-bottom: 0.4rem;
}

.project-title {
  font-family: 'Saira Stencil One', sans-serif;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.project-subtitle {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-block p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.detail-label {
  display: block;
  font-size: 0.74rem;
  font-family: var(--font-code);
  text-transform: uppercase;
  color: #d8b4fe;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: 0.06em;
}

.link-blue {
  color: #58a6ff;
  text-decoration: underline;
  text-decoration-color: rgba(88, 166, 255, 0.4);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link-blue:hover {
  color: #79c0ff;
  text-decoration-color: #79c0ff;
}

.architecture-block .arch-code {
  display: block;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--cyan-accent);
  overflow-x: auto;
}

.lesson-block {
  background: rgba(155, 109, 255, 0.06);
  border-left: 3px solid var(--purple-main);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
}

.lesson-block p {
  color: var(--text-main);
}

.project-footer-tags {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(155, 109, 255, 0.1);
  border: 1px solid rgba(155, 109, 255, 0.3);
  color: var(--purple-main);
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.project-demo-link:hover {
  background: rgba(155, 109, 255, 0.2);
  border-color: rgba(155, 109, 255, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 63, 255, 0.25);
}

/* Screen readers & AI Crawler accessible hidden text (takes 0 layout space) */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.project-badge {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan-accent);
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.05);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 0.5rem;
}


.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.tag-lang {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px 6px 12px;
  border-radius: 8px;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--text-main);
  border: 1.5px solid transparent;
  line-height: 1.25;
}

.tag-lang .lang-ico {
  width: 17px;
  height: 17px;
  flex: none;
  display: block;
  transform: translateY(-0.5px);
}

.tag-py {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              conic-gradient(from var(--border-angle),
                #387eb8 0deg,
                #387eb8 150deg,
                #ffd43b 180deg,
                #ffd43b 330deg,
                #387eb8 360deg
              ) border-box;
  animation: borderRotate 16s linear infinite;
}

.tag-cpp {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              linear-gradient(135deg, #00599c, #659ad2) border-box;
}

.tag-cs {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              linear-gradient(135deg, #68217a, #b86bb3) border-box;
}

.tag-js {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              linear-gradient(135deg, #b8a012, #f7df1e) border-box;
}
.tag-linux {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              conic-gradient(from var(--border-angle),
                #e4e2f0 0deg,
                #6c697d 120deg,
                #2c2a38 200deg,
                #ffd43b 270deg,
                #e4e2f0 360deg
              ) border-box;
  animation: borderRotate 18s linear infinite;
}

.tag-tg {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              linear-gradient(135deg, #2AABEE, #179cde) border-box;
  box-shadow: 0 0 14px rgba(42, 171, 238, 0.2);
}

.tag-termux {
  background: #000000;
  border: 1.5px solid #27272a;
  color: #f4f4f5;
  box-shadow: none;
}

.tag-gemini {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              conic-gradient(from var(--border-angle),
                #ea4335 0deg,
                #4285f4 90deg,
                #34a853 180deg,
                #fbbc05 270deg,
                #ea4335 360deg
              ) border-box;
  animation: borderRotate 14s linear infinite;
  box-shadow: 0 0 16px rgba(66, 133, 244, 0.2);
}

.tag-gemini .lang-ico,
.tag-cardinal .lang-ico {
  width: 19px;
  height: 19px;
}

.tag-cardinal {
  background: linear-gradient(#0b0912, #0b0912) padding-box,
              linear-gradient(135deg, #f43f5e, #dc2626 40%, #991b1b) border-box;
  box-shadow: 0 0 14px rgba(225, 29, 72, 0.25);
}

/* AI Workflow Section */
.ai-workflow-card {
  padding: 3rem;
}

.ai-intro strong {
  color: #f1f0fb;
  font-weight: 600;
}

.ai-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 940px;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.ai-workflow-card code {
  font-family: var(--font-code);
  font-size: 0.82em;
  background: rgba(155, 109, 255, 0.12);
  border: 1px solid rgba(155, 109, 255, 0.25);
  color: #e9d5ff;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.ai-step {
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--purple-main);
  opacity: 0.75;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.ai-step h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #f1f0fb;
  line-height: 1.35;
}

.ai-step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex-grow: 1;
}

.ai-step p strong {
  color: #f1f0fb;
  font-weight: 600;
}

.ai-step-tags {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ai-tag {
  font-family: var(--font-code);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(155, 109, 255, 0.08);
  border: 1px solid rgba(155, 109, 255, 0.2);
  color: #d8b4fe;
  letter-spacing: 0.02em;
}

/* Skills Section - 4 columns in 1 row on desktop */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(155, 109, 255, 0.35);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
}

.skill-category {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #f1f0fb;
  letter-spacing: -0.01em;
}

.skill-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.25rem;
  flex-grow: 1;
}

.skill-card .skill-tags {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.skill-card .skill-tags .tag {
  justify-content: center;
  text-align: center;
  padding: 6px 8px;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-card .skill-tags .tag-lang {
  gap: 5.5px;
  padding: 6px 5px;
  font-size: 0.72rem;
}

@media (max-width: 1080px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 600px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* About Card */
.about-card {
  padding: 3rem;
}

.about-content p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* About Card */

/* Tilt Wrapper */
.tilt-wrapper {
  perspective: 1000px;
  /* Add padding so the hover area doesn't shrink when tilted */
  padding: 40px;
  margin: -40px; /* Offset the padding to keep visual alignment */
}

/* Contacts Card Block — Тёмная карточка с бордером */
.contacts-card-block {
  max-width: 100%;
  margin: 0 auto;
  background: rgba(8, 8, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3.5rem 3rem;
  text-align: center;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.1s, box-shadow 0.1s;
}

.contacts-card-block::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(107, 63, 255, 0.06), transparent 70%);
  pointer-events: none;
}

.contacts-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.contacts-desc {
  font-size: 0.97rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

.contacts-pills {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.contact-pill:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}

.contact-pill:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}

/* Ripple */
.pill-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  transform: scale(0);
  animation: rippleOut 0.55s ease-out forwards;
}

@keyframes rippleOut {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.pill-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.pill-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(155, 109, 255, 0.25);
  color: var(--text-muted);
  transform: translateY(-1px);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(9, 9, 16, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--purple-main);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--purple-glow);
  z-index: 2000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

/* Responsiveness */
@media (max-width: 900px) {
  .hero-title { font-size: 2.5rem; }
  .nav-menu { display: none; }
  .menu-toggle { display: flex; }
  .ai-workflow-card, .about-card, .contacts-card-block { padding: 2rem 1.25rem; }
}

@media (max-width: 600px) {
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
  .toast-notification {
    right: 50%;
    transform: translate(50%, 20px);
    width: calc(100% - 40px);
    max-width: 360px;
    justify-content: center;
  }
  .toast-notification.show {
    transform: translate(50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .comets-canvas {
    display: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* Projects Grid & Card Tuning */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.75rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: auto;
  border-radius: 20px;
  padding: 2.2rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(155, 109, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(155, 109, 255, 0.1);
}

.project-header-top {
  margin-bottom: 1.25rem;
}

.project-badge {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--cyan-accent);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.project-category {
  font-family: var(--font-code);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple-main);
  display: block;
  margin-bottom: 0.4rem;
}

.project-title {
  font-family: 'Saira Stencil One', sans-serif;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.project-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.detail-block {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.detail-label {
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d8b4fe;
  display: block;
  margin-bottom: 0.25rem;
}

/* Architecture block is canonically purple (#d8b4fe) */
.architecture-block .arch-code {
  display: block;
  background: rgba(10, 10, 18, 0.6);
  border: 1px solid rgba(155, 109, 255, 0.22);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: #d8b4fe;
  line-height: 1.4;
  word-break: break-word;
}

.lesson-block {
  background: transparent;
  border-left: none;
  border-radius: 0;
  padding: 0;
}

.project-footer-tags {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--cyan-accent);
  text-decoration: none;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 5px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.project-demo-link:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--cyan-accent);
  transform: translateY(-1px);
}




/* Glowing Purple Perimeter Runner (Open Source / Proof Cards) */
@property --border-angle {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}

@keyframes borderRotate {
  0% {
    --border-angle: 0deg;
  }
  100% {
    --border-angle: 360deg;
  }
}

.proof-card {
  position: relative;
  overflow: visible !important;
  background: var(--bg-card) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(168, 85, 247, 0.1) !important;
}

/* Disable the top 1px line inherited from .glass-card::before */
.proof-card::before {
  display: none !important;
}

/* Seamless Symmetrical Glowing Point Running Smoothly Around Entire Perimeter */
.proof-card::after {
  content: '' !important;
  position: absolute;
  inset: -2.5px !important;
  height: auto !important;
  width: auto !important;
  border-radius: 22.5px !important;
  padding: 2.5px !important;
  background: conic-gradient(
    from var(--border-angle),
    #ffffff 0deg,
    #e9d5ff 2deg,
    #a855f7 6deg,
    rgba(168, 85, 247, 0.45) 15deg,
    rgba(168, 85, 247, 0.15) 30deg,
    transparent 45deg,
    transparent 135deg,
    rgba(168, 85, 247, 0.15) 150deg,
    rgba(168, 85, 247, 0.45) 165deg,
    #a855f7 174deg,
    #e9d5ff 178deg,
    #ffffff 180deg,
    #e9d5ff 182deg,
    #a855f7 186deg,
    rgba(168, 85, 247, 0.45) 195deg,
    rgba(168, 85, 247, 0.15) 210deg,
    transparent 225deg,
    transparent 315deg,
    rgba(168, 85, 247, 0.15) 330deg,
    rgba(168, 85, 247, 0.45) 345deg,
    #a855f7 354deg,
    #e9d5ff 358deg,
    #ffffff 360deg
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  opacity: 1 !important;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.75));
}

.proof-card:hover {
  background: var(--bg-card-hover) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(168, 85, 247, 0.22) !important;
  transform: translateY(-4px);
}



/* Visual Anchors & Soft Eye-Friendly Typography */
.project-details p strong {
  color: #f1f0fb;
  font-weight: 600;
}

.project-details p code {
  font-family: var(--font-code);
  font-size: 0.8em;
  background: rgba(155, 109, 255, 0.12);
  border: 1px solid rgba(155, 109, 255, 0.25);
  color: #e9d5ff;
  padding: 1px 5px;
  border-radius: 4px;
}

.architecture-block .arch-code {
  display: block;
  background: rgba(10, 10, 18, 0.6);
  border: 1px solid rgba(155, 109, 255, 0.22);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: #d8b4fe;
  line-height: 1.4;
  word-break: break-word;
}

.project-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: #d8b4fe;
  text-decoration: none;
  background: rgba(155, 109, 255, 0.1);
  border: 1px solid rgba(155, 109, 255, 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.project-demo-link:hover {
  background: rgba(155, 109, 255, 0.22);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(155, 109, 255, 0.3);
  transform: translateY(-1px);
}



/* About Section Typography */
.about-content p {
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content p strong {
  color: #f8fafc;
  font-weight: 600;
}





.tag-linux .lang-ico {
  width: 19.5px;
  height: 19.5px;
  margin: -2px 0;
}


.lang-ico-tux {
  height: 24px;
  width: auto;
  aspect-ratio: 216 / 256;
  margin: -4px 0;
  flex: none;
  display: block;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

@media (prefers-reduced-motion: reduce) { .tag-py, .tag-linux { animation: none; } }
/* Keep the brand mark still on hover and focus; preserve its resting appearance. */
.logo,.logo-text,.logo-icon-wrap,.logo-icon{transition:none!important}
.logo:hover,.logo:focus-visible{transform:none!important}
.logo:hover .logo-text,.logo:focus-visible .logo-text{color:inherit!important;text-shadow:none!important}
.logo:hover .logo-icon-wrap,.logo:focus-visible .logo-icon-wrap{border-color:rgba(255,255,255,.2)!important;box-shadow:0 0 16px rgba(155,109,255,.4)!important}
/* Language selection in the portfolio navigation. */
.locale-switch{display:inline-flex;align-items:center;gap:2px;margin-left:auto;margin-right:20px;padding:3px;border:1px solid rgba(186,156,255,.25);border-radius:10px;background:rgba(25,20,39,.88);font:700 11px/1 inherit;letter-spacing:.03em}
.locale-switch a,.locale-switch .locale-current{display:grid;place-items:center;min-width:34px;min-height:32px;border-radius:7px;text-decoration:none;font-size:11px;font-weight:700}
.locale-switch a{color:#b9afc8;transition:color .2s,background .2s}
.locale-switch a:hover,.locale-switch a:focus-visible{color:#fff;background:rgba(185,154,247,.18)}
.locale-switch .locale-current{color:#fff;background:#6e48ce}
@media(max-width:800px){.locale-switch{margin-right:12px}.locale-switch a,.locale-switch .locale-current{min-width:32px;min-height:32px}}

/* Navigation order follows the business page on desktop. */
#navbar .nav-menu{margin-left:auto;gap:clamp(1.3rem,2.1vw,2.5rem)}
#navbar .locale-switch{margin-left:clamp(1.5rem,2.5vw,3rem);margin-right:clamp(1.5rem,2.5vw,3rem)}
#navbar > .btn-nav-cta{background:rgba(155,109,255,.12);border:1px solid rgba(155,109,255,.3);color:var(--purple-main);padding:8px 18px;border-radius:10px;text-decoration:none;font-size:.9rem;white-space:nowrap;transition:background .2s,color .2s,border-color .2s}
#navbar > .btn-nav-cta:hover{background:var(--purple-deep);color:#fff}
#navbar > .btn-nav-cta:focus-visible{outline:2px solid #c4a7ff;outline-offset:3px}
@media(max-width:800px){#navbar .locale-switch{margin-left:auto;margin-right:12px}#navbar > .btn-nav-cta{display:none}}
@media(prefers-reduced-motion:reduce){#navbar > .btn-nav-cta{transition:none}}
