/* =====================
   Variables & Reset
   ===================== */
:root {
  /* HSL Colors for easier manipulation */
  --hue: 180;
  --sat: 50%;

  --bg-1: #050608;
  --bg-2: #0a0c10;
  --text: #eaf1f6;
  --muted: #8b9bb4;

  --accent: #b4fbf0;
  /* Neon Teal */
  --accent-dim: rgba(180, 251, 240, 0.1);
  --accent-glow: 0 0 20px rgba(180, 251, 240, 0.4);

  --card-bg: rgba(20, 25, 30, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.12);

  --font-main: 'Outfit', system-ui, -apple-system, sans-serif;
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

.light {
  --bg-1: #f2f4f6;
  --bg-2: #ffffff;
  --text: #0a0c10;
  --muted: #5e6b7c;

  --accent: #005f73;
  --accent-dim: rgba(0, 95, 115, 0.1);
  --accent-glow: 0 0 20px rgba(0, 95, 115, 0.25);

  --card-bg: rgba(255, 255, 255, 0.65);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-hover: rgba(255, 255, 255, 0.9);
}

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

html {
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-1);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg-1);
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

/* =====================
   Backgrounds
   ===================== */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 50%, rgba(74, 168, 181, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(100, 255, 218, 0.05), transparent 25%),
    radial-gradient(circle at 60% 80%, rgba(255, 100, 100, 0.04), transparent 18%);
  filter: blur(100px);
  /* Smoother blend */
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  /* Slightly more visible to hide banding */
  /* Higher frequency, smaller tile for "High Res" look */
  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)'/%3E%3C/svg%3E");
  background-size: 128px;
  /* Force smaller tile size */
  pointer-events: none;
}

/* =====================
   Pulse Canvas
   ===================== */
#pulse-canvas {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 210px;
  height: 210px;
  z-index: 0;
  pointer-events: none;
  cursor: default;
}

/* Clickable overlay centred on the pulse circle */
.pulse-link {
  position: fixed;
  /* canvas top(30) + centre(105) - hitRadius(45) = 90 */
  top: 90px;
  /* canvas right(30) + centre(105) - hitRadius(45) = 90 */
  right: 90px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  display: block;
}

/* =====================
   Utilities
   ===================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  /* 3D Context helpers */
  transform-style: preserve-3d;
  perspective: 1000px;
}

.glass {
  /* Liquid Glass Effect */
  background: linear-gradient(165deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);

  /* Refractive Edges */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  /* Specular highlight */
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  /* Specular highlight */

  /* Volume & Depth */
  box-shadow:
    0 8px 32px -4px rgba(0, 0, 0, 0.3),
    inset 0 4px 12px rgba(255, 255, 255, 0.03),
    /* Top inner glow */
    inset 0 -4px 12px rgba(0, 0, 0, 0.2);
  /* Bottom inner shadow */
}

.section-padded {
  padding: 120px 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--text);
  color: var(--bg-1);
  font-weight: 600;
  border-radius: 99px;
  /* Pill */
  text-decoration: none;
  transition: transform 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-text:hover {
  background: var(--accent-dim);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =====================
   Navigation
   ===================== */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  height: 70px;
  border-radius: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  transition: top 0.3s ease;
}

.nav-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.nav-brand {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-expo);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle,
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.theme-toggle:hover,
.lang-btn:hover {
  background: var(--card-border);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Theme switch logic */
.modifier-icon {
  display: none;
}

:root:not(.light) .moon {
  display: block;
}

:root:not(.light) .sun {
  display: none;
}

.light .moon {
  display: none;
}

.light .sun {
  display: block;
}


.lang-dropdown {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: 120%;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.lang-menu.open {
  display: flex;
}

.lang-menu button {
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-menu button:hover {
  background: var(--card-border);
}


/* =====================
   Hero Section
   ===================== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Simple Parallax/Fade handled by GSAP later, but default styling: */
}

.hero-content {
  text-align: center;
  z-index: 1;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(to right, var(--text), var(--muted));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: 0.3s var(--ease-expo);
}

.social-link:hover {
  background: var(--text);
  color: var(--bg-1);
  transform: scale(1.1);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* =====================
   About Section & Stats
   ===================== */
.about-heading-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 58px;
}

.profile-portrait {
  position: relative;
  width: 148px;
  height: 148px;
  flex: 0 0 148px;
  margin: 0;
  overflow: hidden;
  border: 2px solid rgba(180, 251, 240, 0.38);
  border-radius: 50%;
  background: var(--card-bg);
  box-shadow:
    0 18px 44px -22px rgba(0, 0, 0, 0.95),
    0 0 34px rgba(180, 251, 240, 0.09);
  isolation: isolate;
}

.profile-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(180, 251, 240, 0.08), transparent 48%, rgba(5, 6, 8, 0.12));
  pointer-events: none;
}

.profile-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.8) contrast(1.06);
  transform: scale(1.55);
}

.about-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-heading-row .section-title {
  margin-bottom: 0;
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 80px;
  /* Space between Stats Card and Text */
  align-items: stretch;
}

.about-stats-container {
  padding: 40px;
  border-radius: 24px;
}

.stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  /* Horizontal now since it's full width */
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
  text-align: center;
}

.stats-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 190px;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(to right, var(--accent), var(--text));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  font-feature-settings: "tnum";
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-subtitle {
  font-size: 2rem;
  margin-bottom: 32px;
  opacity: 0.9;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  position: relative;
  padding-left: 32px;
  font-size: 1.1rem;
  color: var(--muted);
}

.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(180, 251, 240, 0.2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.3s;
}

.tag:hover {
  background: var(--accent);
  color: var(--bg-1);
}

/* =====================
   Work / Projects
   ===================== */
.section-desc {
  color: var(--muted);
  margin-bottom: 48px;
  font-size: 1.1rem;
  max-width: 620px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 24px;
  align-items: stretch;
}

.project-card {
  width: 100%;
  max-width: none;
  min-height: 100%;
  border-radius: 20px;
  padding: 28px;
  transition:
    transform 0.45s var(--ease-expo),
    border-color 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.45s var(--ease-expo);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(700px circle at 50% 0%, rgba(180, 251, 240, 0.055), transparent 48%);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 36px;
  right: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 251, 240, 0.65), transparent);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.4s ease, transform 0.55s var(--ease-expo);
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(180, 251, 240, 0.2);
  background-color: rgba(24, 30, 35, 0.72);
  box-shadow:
    0 22px 55px -28px rgba(0, 0, 0, 0.85),
    0 0 34px rgba(180, 251, 240, 0.035);
}

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

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card-featured {
  grid-column: span 2;
  border-color: rgba(180, 251, 240, 0.18);
  background:
    radial-gradient(600px circle at 18% 0%, rgba(180, 251, 240, 0.1), transparent 52%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
}

.card-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  z-index: 1;
}

.app-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.45s var(--ease-expo), filter 0.45s ease;
}

.cad-manager-icon {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.app-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(180, 251, 240, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(180, 251, 240, 0.14), rgba(180, 251, 240, 0.03));
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 0.45s var(--ease-expo), border-color 0.35s ease;
}

.project-card:hover .app-icon {
  transform: translateY(-2px) scale(1.035);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.38));
}

.project-card:hover .app-mark {
  transform: translateY(-2px) rotate(-2deg);
  border-color: rgba(180, 251, 240, 0.5);
}

.card-meta h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.card-meta p {
  font-size: 0.95rem;
  color: var(--accent);
  margin: 0;
  font-weight: 500;
}

/* New Card Features List */
.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1;
  flex-grow: 1;
  /* Pushes actions down */
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
}

.card-features li {
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-features li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.card-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

.card-actions-end {
  justify-content: flex-end;
}

.card-actions a.btn-text::after {
  content: '→';
  margin-left: 8px;
  transition: transform 0.3s var(--ease-expo);
}

.card-actions a.btn-text:hover::after {
  transform: translateX(4px);
}

/* Expandable logic */
.expandable-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-expo);
  z-index: 1;
}

.expandable-content .content-inner {
  overflow: hidden;
  padding-top: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

/* When Expanded */
.project-card.expanded {
  grid-column: 1 / -1;
  background: var(--bg-2);
  border-color: var(--accent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.project-card.expanded:hover {
  transform: none;
}

.project-card.expanded .expandable-content {
  grid-template-rows: 1fr;
  margin-top: 32px;
  border-top: 1px solid var(--card-border);
}

.project-card.expanded .expandable-content .content-inner {
  padding-top: 32px;
  opacity: 1;
}

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

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--bg-1);
}

/* Responsive */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card-featured {
    grid-column: span 2;
  }

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

  .about-stats-container {
    order: 2;
  }

  .about-text-content {
    order: 1;
  }

  .hero-title {
    font-size: 3.5rem;
  }
}

.contact-container {
  max-width: 600px;
}

.contact-card {
  padding: 40px;
  border-radius: 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--text);
}

/* =====================
   Footer
   ===================== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

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

/* =====================
   Plugin library
   ===================== */
.library-page {
  min-height: 100vh;
}

.library-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--card-border);
  background: rgba(5, 6, 8, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.library-header-inner,
.library-brand,
.library-nav {
  display: flex;
  align-items: center;
}

.library-header-inner {
  min-height: 74px;
  justify-content: space-between;
  gap: 24px;
}

.library-brand {
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.library-brand img {
  border-radius: 12px;
}

.library-nav {
  gap: 24px;
  color: var(--muted);
}

.library-nav a,
.breadcrumbs a {
  transition: color 0.2s ease;
}

.library-nav a:hover,
.breadcrumbs a:hover {
  color: var(--accent);
}

.library-hero {
  padding: 130px 0 110px;
}

.library-hero-inner {
  max-width: 960px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  color: var(--muted);
  font-size: 0.9rem;
}

.library-eyebrow,
.plugin-category {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.library-hero h1 {
  max-width: 900px;
  margin-bottom: 28px;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.library-lead {
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  line-height: 1.55;
}

.library-context {
  max-width: 720px;
  margin: 0 0 38px;
  color: var(--muted);
  font-size: 1.05rem;
}

.plugin-index-section {
  padding: 0 0 100px;
}

.plugin-index-section h2 {
  margin-bottom: 24px;
  font-size: 1.25rem;
}

.plugin-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.plugin-index a {
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--muted);
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.plugin-index a:hover {
  border-color: rgba(180, 251, 240, 0.35);
  color: var(--text);
  transform: translateY(-2px);
}

.plugin-library {
  padding: 110px 0 130px;
  border-top: 1px solid var(--card-border);
}

.library-section-heading {
  max-width: 760px;
  margin-bottom: 60px;
}

.library-section-heading h2 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.library-section-heading > p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
}

.plugin-detail {
  margin-bottom: 34px;
  padding: 42px;
  border-radius: 24px;
  scroll-margin-top: 100px;
}

.plugin-detail-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.plugin-detail-header img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.32));
}

.plugin-detail-mark {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(180, 251, 240, 0.3);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(180, 251, 240, 0.15), rgba(180, 251, 240, 0.035));
  color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 28px rgba(0, 0, 0, 0.2);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.plugin-detail-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.plugin-category {
  margin-bottom: 5px;
}

.plugin-summary {
  max-width: 900px;
  margin: 0 0 34px;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.7;
}

.plugin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--card-border);
}

.plugin-detail-grid h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.plugin-detail-grid p,
.plugin-points {
  margin: 0;
  color: var(--muted);
}

.plugin-points {
  padding-left: 20px;
}

.plugin-points li + li {
  margin-top: 8px;
}

.plugin-detail-featured {
  border-color: rgba(180, 251, 240, 0.2);
  background:
    radial-gradient(850px circle at 12% 0%, rgba(180, 251, 240, 0.08), transparent 52%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.plugin-highlight-stat {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: -8px 0 34px;
  padding: 20px 22px;
  border: 1px solid rgba(180, 251, 240, 0.14);
  border-radius: 16px;
  background: rgba(180, 251, 240, 0.055);
}

.plugin-highlight-stat strong {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1.45rem;
}

.plugin-highlight-stat span {
  color: var(--muted);
}

.plugin-external-action {
  margin-top: 32px;
}

.plugin-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.plugin-gallery img {
  width: 100%;
  height: auto;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--bg-1);
}

.library-note {
  margin-top: 72px;
  padding: 48px;
  border-radius: 24px;
}

.library-note h2 {
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.library-note p {
  max-width: 760px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.08rem;
}

.library-note-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .section-padded {
    padding: 76px 0;
  }

  #pulse-canvas,
  .pulse-link {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 104px 0 72px;
  }

  .hero-content {
    width: 100%;
  }

  .about-grid {
    gap: 52px;
  }

  .about-heading-row {
    gap: 18px;
    margin-bottom: 42px;
  }

  .profile-portrait {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
    margin-bottom: 0;
    border-radius: 50%;
  }

  .profile-portrait img {
    height: 100%;
    object-position: center;
    transform: scale(1.55);
  }

  .about-kicker {
    max-width: 180px;
    margin-bottom: 6px;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .hero-title {
    margin-bottom: 20px;
    font-size: clamp(3rem, 15vw, 4.25rem);
    line-height: 1;
    letter-spacing: -0.045em;
  }

  .hero-subtitle {
    max-width: 340px;
    margin-bottom: 32px;
    font-size: 1rem;
    line-height: 1.55;
  }

  .socials {
    gap: 14px;
  }

  .social-link {
    width: 46px;
    height: 46px;
  }

  .section-title {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
  }

  .about-stats-container {
    padding: 28px 24px;
  }

  .stats-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    text-align: left;
  }

  .stats-list li {
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid var(--card-border);
  }

  .stats-list li:first-child {
    padding-top: 0;
  }

  .stats-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .stat-value {
    font-size: 2.5rem;
  }

  .about-subtitle {
    margin-bottom: 24px;
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .feature-list {
    gap: 14px;
    margin-bottom: 32px;
  }

  .feature-list li {
    padding-left: 26px;
    font-size: 1rem;
  }

  .skill-tags {
    gap: 8px;
  }

  .tag {
    padding: 7px 12px;
    font-size: 0.85rem;
  }

  .section-desc {
    margin-bottom: 36px;
    font-size: 1rem;
    line-height: 1.6;
  }

  .navbar {
    width: 95%;
    max-width: none;
  }

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

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

  .project-card-featured {
    grid-column: auto;
  }

  .project-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .project-card::after {
    left: 20px;
    right: 20px;
  }

  .card-top {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
  }

  .app-icon {
    width: 56px;
    height: 56px;
  }

  .app-mark {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .card-meta h3 {
    font-size: 1.25rem;
  }

  .card-features {
    padding-top: 18px;
  }

  .card-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn-text {
    padding: 8px 12px;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .library-header-inner {
    min-height: 68px;
    gap: 14px;
  }

  .library-nav {
    gap: 12px;
    font-size: 0.85rem;
  }

  .library-nav a:last-child {
    display: none;
  }

  .library-hero {
    padding: 84px 0 68px;
  }

  .library-hero h1 {
    margin-bottom: 24px;
    font-size: clamp(2.75rem, 13vw, 4.5rem);
    line-height: 1;
  }

  .library-lead {
    font-size: 1.12rem;
  }

  .library-context {
    font-size: 1rem;
  }

  .breadcrumbs {
    margin-bottom: 34px;
  }

  .plugin-index {
    grid-template-columns: 1fr;
  }

  .plugin-index-section {
    padding-bottom: 72px;
  }

  .plugin-library {
    padding: 80px 0 96px;
  }

  .plugin-detail {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .plugin-detail-header {
    align-items: flex-start;
    gap: 14px;
  }

  .plugin-detail-header img {
    width: 56px;
    height: 56px;
  }

  .plugin-detail-mark {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 15px;
    font-size: 0.82rem;
  }

  .plugin-summary {
    margin-bottom: 28px;
    font-size: 1.05rem;
  }

  .plugin-highlight-stat {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 28px;
    padding: 18px;
  }

  .plugin-highlight-stat strong {
    font-size: 1.3rem;
  }

  .plugin-detail-grid {
    gap: 24px;
  }

  .plugin-detail-grid,
  .plugin-gallery {
    grid-template-columns: 1fr;
  }

  .library-note {
    padding: 30px 20px;
  }

  .library-note-links {
    align-items: stretch;
    flex-direction: column;
  }

  .library-note-links .btn-primary,
  .library-note-links .btn-text {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #pulse-canvas,
  .pulse-link {
    display: none;
  }

  .hero-title,
  .hero-subtitle,
  .social-link,
  .section-title,
  .about-stats-container,
  .project-card,
  .char-inner {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

/* Author byline under a page title, and the About link on the home page */
.library-byline {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.library-byline a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(180, 251, 240, 0.28);
}

.library-byline a:hover {
  border-bottom-color: var(--accent);
}

.about-more {
  margin: 4px 0 18px;
}

/* ── Language switch (shared by all bilingual pages) ────── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-switch a {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a[aria-current="true"] {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Floating variant for pages without a header bar */
.lang-switch-floating {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 90;
}

@media (max-width: 640px) {
  .lang-switch-floating {
    top: 14px;
    right: 14px;
  }
}
