/* ============================================
   Base styles
   ============================================ */
:root {
  --bg: #070d1c;
  --bg-2: #0b1530;
  --surface: rgba(14, 26, 54, 0.62);
  --surface-hover: rgba(18, 34, 70, 0.78);
  --border: rgba(94, 200, 255, 0.14);
  --border-strong: rgba(94, 200, 255, 0.32);
  --text: #e6edf8;
  --muted: #93a3c0;
  --blue: #2f6fed;
  --blue-bright: #5ec8ff;
  --nav-h: 88px;
  --radius: 16px;
  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at top, var(--bg-2) 0%, var(--bg) 60%) fixed;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

section[id],
main[id] {
  scroll-margin-top: var(--nav-h);
}

/* ---------- Background layers ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.glow {
  position: fixed;
  z-index: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}

.glow-a {
  top: -140px;
  left: -120px;
  background: var(--blue);
}

.glow-b {
  bottom: -180px;
  right: -140px;
  background: #1b4fc4;
  opacity: 0.28;
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(90px, 60px) scale(1.12); }
}

main,
section,
footer {
  position: relative;
  z-index: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 28px rgba(47, 111, 237, 0.35);
}

.btn-primary:hover {
  background: #3d7cf5;
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(47, 111, 237, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--blue-bright);
  color: #fff;
  transform: translateY(-2px);
}

.btn:focus-visible,
.nav-link:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 5rem;
  text-align: center;
}

.hero-content {
  max-width: 820px;
}

.hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 8.5vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
}

.hero-title {
  margin: 1.1rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 500;
  color: var(--blue-bright);
}

.hero-tagline {
  max-width: 38ch;
  margin: 1.25rem auto 0;
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--muted);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 52px;
  background: rgba(94, 200, 255, 0.15);
  overflow: hidden;
}

.scroll-cue-line {
  display: block;
  width: 100%;
  height: 40%;
  background: var(--blue-bright);
  animation: scroll-cue 2.2s ease-in-out infinite;
}

@keyframes scroll-cue {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(260%); }
}

/* ---------- Sections ---------- */
.about,
.skills,
.work,
.certificates,
.contact {
  padding: 6.5rem 0;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-bright);
}

.section-heading {
  margin: 0 0 2.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
}

/* About */
.about-bio {
  max-width: 68ch;
}

.about-bio p {
  margin: 0 0 1.25rem;
  font-size: 1.075rem;
  line-height: 1.8;
  color: #c3cfe3;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-4px);
}

.project-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #fff;
}

.project-description {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}

.tech-tag {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue-bright);
  background: rgba(47, 111, 237, 0.12);
  border: 1px solid rgba(94, 200, 255, 0.2);
  border-radius: 999px;
}

.project-card > .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Contact */
.contact-form-wrapper {
  max-width: 640px;
  padding: 2.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #dbe4f3;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--text);
  background: rgba(5, 10, 24, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #5f6f8c;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(94, 200, 255, 0.18);
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.contact-success {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--blue-bright);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .about,
  .skills,
  .work,
  .certificates,
  .contact {
    padding: 4.5rem 0;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .contact-form .btn,
  .hero-cta .btn {
    width: 100%;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .glow,
  .scroll-cue-line {
    animation: none;
  }
  .btn,
  .skill-card,
  .project-card {
    transition: none;
  }
}

/* ============================================
   additions.css
   Language switcher + Certificates section.
   Extra styles for the two new features.
   
   ============================================ */

/* ---------- Cyrillic headings ----------
   Space Grotesk has no Cyrillic letters, so on the
   Russian version headings fall back to Manrope
   instead of a random system font. */
html[lang="ru"] .hero-name,
html[lang="ru"] .section-heading,
html[lang="ru"] .project-title {
  font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
}

/* ---------- Certificates section ---------- */
.certificates {
  position: relative;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 1.5rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cert-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.cert-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--blue-bright, #5ec8ff);
  background: rgba(47, 111, 237, 0.14);
  border: 1px solid rgba(94, 200, 255, 0.25);
}

.cert-source {
  min-width: 0;
}

.cert-issuer,
.cert-type {
  margin: 0;
  line-height: 1.35;
}

.cert-issuer {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.cert-type {
  font-size: 0.8rem;
  color: rgba(226, 234, 248, 0.58);
}

.cert-card .cert-title {
  margin-top: 0;
}

.cert-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  margin: 1.25rem 0 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(94, 200, 255, 0.14);
}

.cert-meta div {
  min-width: 0;
}

.cert-meta dt {
  font-size: 0.75rem;
  color: rgba(226, 234, 248, 0.55);
  margin-bottom: 0.3rem;
}

.cert-meta dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(240, 245, 255, 0.9);
}

.cert-id {
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  font-size: 0.8rem !important;
  color: rgba(226, 234, 248, 0.72) !important;
}

/* Keep the button at the bottom so both cards line up */
.cert-card > .btn {
  margin-top: auto;
  align-self: flex-start;
}

@media (max-width: 480px) {
  .cert-meta {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
}

/* ---------- Education section ---------- */
.education {
  padding: 6.5rem 0;
}

.edu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.edu-main {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.edu-main .cert-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.edu-title {
  margin-bottom: 0.3rem;
}

.edu-program {
  margin: 0 0 0.2rem;
  font-weight: 600;
  color: var(--blue-bright);
}

.edu-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.edu-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #cfeede;
  background: rgba(61, 220, 151, 0.08);
  border: 1px solid rgba(61, 220, 151, 0.25);
  border-radius: 999px;
  white-space: nowrap;
}

.edu-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.2);
}

.cert-note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(226, 234, 248, 0.5);
}

@media (max-width: 720px) {
  .education {
    padding: 4.5rem 0;
  }
  .edu-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }
}

/* ---------- Contact: centered ---------- */
.contact .section-eyebrow,
.contact .section-heading {
  text-align: center;
}

.contact-form-wrapper {
  margin: 0 auto;
}

.contact-form .btn {
  align-self: center;
  min-width: 220px;
}

.contact-success {
  text-align: center;
}

/* ---------- Nav: floating glass bar ---------- */
.site-nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  pointer-events: none;
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  pointer-events: auto;
  background: rgba(12, 22, 46, 0.55);
  border: 1px solid rgba(94, 200, 255, 0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-nav.is-scrolled .nav-inner {
  background: rgba(8, 14, 32, 0.82);
  border-color: rgba(94, 200, 255, 0.24);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Sliding pill behind the active link */
.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.34), rgba(47, 111, 237, 0.18));
  border: 1px solid rgba(94, 200, 255, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.3, 0.7, 0.2, 1),
    width 0.4s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.25s ease;
}

.nav-link {
  position: relative;
  z-index: 1;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-divider {
  width: 1px;
  height: 22px;
  margin: 0 6px;
  background: rgba(94, 200, 255, 0.18);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(226, 234, 248, 0.6);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 111, 237, 0.45);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Longer Russian / Uzbek labels on mid-size screens */
@media (min-width: 721px) and (max-width: 1000px) {
  .nav-link {
    padding: 0.5rem 0.7rem;
    font-size: 0.84rem;
  }
  .nav-divider {
    margin: 0 3px;
  }
}

@media (max-width: 720px) {
  .site-nav {
    top: 12px;
  }

  .nav-inner {
    width: 100%;
    justify-content: space-between;
    border-radius: 22px;
  }

  .nav-divider,
  .nav-indicator {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    background: rgba(8, 14, 32, 0.95);
    border: 1px solid rgba(94, 200, 255, 0.18);
    border-radius: 22px;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 14px;
  }

  .nav-link.is-active {
    background: rgba(47, 111, 237, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-indicator,
  .nav-links {
    transition: none;
  }
}

/* ---------- Social links ---------- */
.social-block {
  margin-top: 2.5rem;
  text-align: center;
}

.social-label {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.social-link {
  --brand: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.25rem 0.45rem 0.45rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, background-color 0.25s ease,
    color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(94, 200, 255, 0.12);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.social-linkedin { --brand: #0a66c2; }
.social-facebook { --brand: #1877f2; }
.social-x { --brand: #000000; }

.social-link:hover {
  color: #fff;
  border-color: color-mix(in srgb, var(--brand) 70%, #ffffff 30%);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 35%, transparent);
  transform: translateY(-2px);
}

.social-link:hover .social-icon {
  background: var(--brand);
  transform: scale(1.06);
}

.social-x:hover .social-icon {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.social-link:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .social-link,
  .social-icon {
    transition: none;
  }
}

/* ---------- Skills: centered, interactive ---------- */
.skills .section-eyebrow,
.skills .section-heading {
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  max-width: 980px;
  margin: 0 auto;
}

.skill-card {
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding: 2rem 1.25rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, border-color 0.3s ease, box-shadow 0.35s ease;
}

/* Spotlight that follows the cursor */
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    240px circle at var(--mx) var(--my),
    color-mix(in srgb, var(--accent) 24%, transparent),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Glowing border that follows the cursor */
.skill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    180px circle at var(--mx) var(--my),
    var(--accent),
    transparent 70%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.skill-card:hover {
  border-color: transparent;
  box-shadow: 0 24px 50px -18px color-mix(in srgb, var(--accent) 45%, transparent);
}

.skill-card:hover::before,
.skill-card:hover::after {
  opacity: 1;
}

.skill-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 0.9rem;
  border-radius: 18px;
  font-size: 1.7rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translateZ(30px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease, background-color 0.35s ease;
}

.skill-card:hover .skill-icon {
  transform: translateZ(50px) scale(1.12) rotate(-6deg);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--accent) 55%, transparent);
}

.skill-name {
  font-weight: 600;
  color: #fff;
  transform: translateZ(20px);
}

.skill-tag {
  font-size: 0.825rem;
  color: var(--muted);
  transform: translateZ(10px);
}

/* Entrance: cards rise, sharpen and scale in one after another */
.skills-grid .skill-card {
  opacity: 0;
  translate: 0 46px;
  scale: 0.88;
  filter: blur(8px);
  transition: opacity 0.7s ease calc(var(--i) * 75ms),
    translate 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i) * 75ms),
    scale 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i) * 75ms),
    filter 0.7s ease calc(var(--i) * 75ms),
    transform 0.25s ease-out, border-color 0.3s ease, box-shadow 0.35s ease;
}

.skills-grid.is-in .skill-card {
  opacity: 1;
  translate: 0 0;
  scale: 1;
  filter: none;
}

@media (max-width: 860px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .skill-card {
    padding: 1.5rem 0.9rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skills-grid .skill-card {
    opacity: 1;
    translate: none;
    scale: none;
    filter: none;
    transition: none;
  }
  .skill-icon,
  .skill-card:hover .skill-icon {
    transition: none;
    transform: none;
  }
}

  
