/* style.css */
:root {
  --bg: #0a0a0a;
  --surface-low: rgba(255, 255, 255, 0.03);
  --surface-mid: rgba(255, 255, 255, 0.05);
  --surface-high: rgba(255, 255, 255, 0.08);

  --text-main: #fafafa;
  --text-dim: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);

  --nothing-red: #007aff;
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.05);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition: 0.4s var(--ease);

  --dot-bg: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface-low: rgba(0, 0, 0, 0.03);
  --surface-mid: rgba(0, 0, 0, 0.05);
  --surface-high: rgba(0, 0, 0, 0.08);

  --text-main: #0a0a0a;
  --text-dim: rgba(0, 0, 0, 0.7);
  --text-muted: rgba(0, 0, 0, 0.4);

  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.5);

  --dot-bg: radial-gradient(circle, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  line-height: 1.62;
  letter-spacing: -0.011em;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}

/* ✅ global: no grayscale / no blur-y effects */
img:not(.pacman-graph-img) {
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.pac-contribution-widget picture {
  display: block;
}
.pac-contribution-widget .pacman-graph-img {
  filter: none;
  opacity: 1;
  transform: none;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Graph wrapper: full-width */
.pac-graph-wrapper {
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
  border-radius: 12px;
}
.pac-graph-wrapper .pacman-graph-img {
  width: 100%;
  height: auto;
}

html[data-theme="dark"] .pacman-graph-img.theme-adaptive {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* BACKGROUND DOT */
.nt-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--dot-bg);
  background-size: 32px 32px;
  opacity: 0.5;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  pointer-events: none;
}

/* SCROLL PROGRESS BAR */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--nothing-red);
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* NAV */
nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;

  width: min(960px, calc(100% - 28px));
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);

  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 10px 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.1);

  transition: all 0.4s var(--ease);
  overflow: hidden;
}

nav.expanded {
  border-radius: 28px;
  background: var(--surface-low);
  padding: 14px;
  flex-wrap: wrap;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  text-decoration: none;
  flex: 0 0 auto;
  line-height: 1;
}
.nav-brand:hover {
  color: var(--nothing-red);
  background: rgba(255, 255, 255, 0.05);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

/* 2. Focus Effect: Dim all links when the menu is hovered */
.nav-menu:hover .nav-link {
  color: var(--text-muted);
  opacity: 0.5;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  transition: color 0.3s ease, opacity 0.3s ease;
  white-space: nowrap;
}

/* 1. Animated Underline (expanding from center) */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 32px);
  height: 2px;
  background: var(--nothing-red);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

/* Brighten the specific hovered/active link */
.nav-menu .nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  opacity: 1;
}

/* Expand underline on hover/active */
.nav-link.active::after,
.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--surface-low);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--text-dim);
  background: var(--surface-mid);
}

.nav-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.04);
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
nav.expanded .nav-hamburger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
nav.expanded .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
nav.expanded .nav-hamburger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-brand,
.nav-menu,
.nav-actions {
  position: relative;
  z-index: 2;
}

/* NAV_ONLY GLYPH EFFECT */
#mainNav .ng-segment {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: none;
}
#mainNav .ng-top-bar {
  top: 0;
  left: 20%;
  width: 60%;
  height: 2px;
  background: var(--text-main);
  box-shadow: 0 0 10px var(--text-main);
}
#mainNav .ng-right-arc {
  bottom: -15px;
  right: -10px;
  width: 50px;
  height: 50px;
  background: transparent;
  border: 3px solid var(--nothing-red);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--nothing-red), inset 0 0 10px var(--nothing-red);
}
#mainNav .ng-left-dot {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-main);
  box-shadow: 0 0 8px var(--text-main);
}
#mainNav .ng-bottom-dash {
  bottom: 0;
  left: 30%;
  width: 15%;
  height: 2px;
  background: var(--text-dim);
}

@keyframes glitch-scan {
  0% {
    opacity: 0;
    width: 10%;
    left: 20%;
  }
  10% {
    opacity: 1;
    width: 60%;
    left: 20%;
  }
  20% {
    opacity: 0;
  }
  30% {
    opacity: 0.8;
    width: 20%;
    left: 60%;
  }
  50% {
    opacity: 0;
  }
  60% {
    opacity: 1;
    width: 40%;
    left: 30%;
    box-shadow: 0 0 20px white;
  }
  100% {
    opacity: 0;
    width: 60%;
    left: 20%;
  }
}
@keyframes pulse-arc {
  0% {
    opacity: 0;
    transform: scale(0.9);
    border-width: 1px;
  }
  20% {
    opacity: 1;
    transform: scale(1);
    border-width: 3px;
  }
  30% {
    opacity: 0.5;
  }
  40% {
    opacity: 1;
    transform: scale(1.05);
    border-width: 4px;
  }
  60% {
    opacity: 0;
  }
  80% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0;
  }
}
@keyframes strobe-dot {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(-50%) scale(1.5);
  }
  20% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  100% {
    opacity: 0;
  }
}
@keyframes flicker-dash {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 0;
  }
  50% {
    opacity: 1;
    width: 15%;
  }
  60% {
    opacity: 0;
  }
  70% {
    opacity: 1;
    width: 25%;
  }
  100% {
    opacity: 0;
  }
}

#mainNav .ng-top-bar.active {
  animation: glitch-scan 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
#mainNav .ng-right-arc.active {
  animation: pulse-arc 0.6s ease-out forwards;
}
#mainNav .ng-left-dot.active {
  animation: strobe-dot 0.4s steps(2, start) forwards;
}
#mainNav .ng-bottom-dash.active {
  animation: flicker-dash 0.5s linear forwards;
}

/* MOBILE NAV */
@media (max-width: 980px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    order: 3;
    margin-top: 12px;
    border-top: 1px solid var(--glass-border);
    padding-top: 12px;
    gap: 6px;
  }
  nav.expanded .nav-menu {
    display: flex;
    animation: slideDown 0.35s var(--ease);
  }
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .nav-link {
    width: fit-content;
    padding: 14px 16px;
    border-radius: 14px;
  }
  .nav-brand {
    padding: 10px 16px;
  }
  #mainNav .ng-top-bar {
    left: 10%;
    width: 80%;
  }
  #mainNav .ng-bottom-dash {
    left: 10%;
  }
}

/* LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 20px 72px;
}
.grid-interface {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
section.widget {
  scroll-margin-top: 110px;
}

/* WIDGETS */
.widget {
  background: var(--surface-low);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 34px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.widget:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--surface-mid);
  transform: translateY(-2px);
}

/* HERO */
.hero-widget {
  grid-column: span 12;
  min-height: 520px;
  justify-content: center;
}
.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.hero-foot {
  margin-top: 16px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  max-width: 560px;
}
.glyph-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
@media (max-width: 900px) {
  .glyph-container {
    width: 100%;
    opacity: 0.9;
  }
}
.glyph-segment {
  position: absolute;
  background: var(--text-main);
  opacity: 0.03;
  border-radius: 100px;
  transition: opacity 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s ease;
}
.glyph-segment.active {
  opacity: 0.9;
  box-shadow: 0 0 30px 4px rgba(255, 255, 255, 0.4);
}
.gs-arc {
  top: 15%;
  right: 25%;
  width: 180px;
  height: 180px;
  background: transparent;
  border: 4px solid var(--text-main);
  border-radius: 50%;
  clip-path: inset(0 50% 0 0);
  transform: rotate(-45deg);
  opacity: 0.06;
}
.gs-arc.active {
  opacity: 1;
}
.gs-slant-top {
  top: 10%;
  right: 10%;
  width: 6px;
  height: 120px;
  transform: rotate(45deg);
}
.gs-mid-slant {
  top: 45%;
  right: 35%;
  width: 4px;
  height: 80px;
  transform: rotate(-30deg);
}
.gs-bottom-bar {
  bottom: 15%;
  right: 20%;
  width: 140px;
  height: 5px;
}
.gs-tail {
  bottom: 8%;
  right: 31%;
  width: 5px;
  height: 25px;
}
@keyframes glyph-idle {
  0%,
  100% {
    opacity: 0.03;
    box-shadow: none;
  }
  50% {
    opacity: 0.12;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
  }
}
.glyph-segment.idle {
  animation: glyph-idle 5s infinite ease-in-out;
}
.hero-content {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}
.hero-content:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 50px -10px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--nothing-red);
  background: transparent;
  padding: 6px 0;
  width: fit-content;
  margin-bottom: 18px;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
  border: none;
}

.red-dot {
  width: 8px;
  height: 8px;
  background: var(--nothing-red);
  border-radius: 50%;
  display: inline-block;
  animation: strobe 2s infinite;
  flex-shrink: 0;
}

#status-text {
  display: inline-block;
  min-width: 140px;
  color: var(--text-main);
}

.hero-title {
  font-size: clamp(38px, 7vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.hero-title .dot-matrix {
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  display: block;
  font-size: 0.4em;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  word-break: break-word;
}
.hero-desc {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 22px;
}

/* Common */
.label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
  letter-spacing: 0.1em;
}
.section-desc {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 720px;
  margin-bottom: 10px;
}

/* Section Header Layouts */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-header.sm-margin {
  margin-bottom: 10px;
}
.section-header .label {
  margin: 0;
}
.section-header h2 {
  font-size: clamp(24px, 4vw, 32px);
  margin: 8px 0 0;
  letter-spacing: -0.03em;
}

/* Contact Utilities */
.contact-tag-wrap {
  margin-bottom: 24px;
}
.contact-title .highlight {
  color: var(--text-dim);
}
.card-desc {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 13px;
}
.card-actions {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ABOUT */
.about-widget {
  grid-column: span 12;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}
.about-text-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-desc {
  color: var(--text-dim);
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.62;
  font-weight: 400;
}
.about-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.about-foot {
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  width: fit-content;
}

.about-photo-container {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  background: var(--surface-mid);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  transition: var(--transition);
}
.about-photo-container:hover {
  border-color: var(--nothing-red);
  background: var(--surface-high);
}
.about-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  transition: var(--transition);
  border-radius: var(--radius-lg);
}

.corner-mark {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--text-muted);
  z-index: 2;
  opacity: 0.5;
}
.corner-tl {
  top: 20px;
  left: 20px;
  border-right: 0;
  border-bottom: 0;
}
.corner-br {
  bottom: 20px;
  right: 20px;
  border-left: 0;
  border-top: 0;
}

@media (max-width: 1024px) {
  .about-grid {
    gap: 32px;
  }
}
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .about-photo-container {
    max-width: 220px;
    aspect-ratio: 1 / 1;
    justify-self: center;
    order: 1;
    margin-bottom: 12px;
  }
  .about-text-container {
    order: 2;
    text-align: left;
  }
  .about-widget .label {
    text-align: left;
  }
}

/* SKILLS */
.skills-widget {
  grid-column: span 12;
}

/* BENTO SKILLS */
.bento-skills {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-box {
  background: var(--surface-low);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.bento-box:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-mid);
  box-shadow: 0 25px 45px -10px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.05);
}

.bento-wide {
  grid-column: span 12;
}

.bento-square {
  grid-column: span 6;
}

.bento-header {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bento-header svg {
  color: var(--nothing-red);
}

/* Marquee Box */
.bento-marquee-box {
  justify-content: center;
  padding: 48px 0;
}

.bento-marquee-box .bento-header {
  position: absolute;
  top: 24px;
  left: 24px;
  margin-bottom: 0;
}

.marquee-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  display: flex;
  animation: marquee-scroll 20s linear infinite;
}

.marquee-content span {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-main);
  padding: 0 20px;
  line-height: 1;
}

.marquee-content span.dim {
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-weight: 400;
  font-size: 0.8em;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Icons Grid Box */
.bento-icons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  flex: 1;
}

.bento-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.bento-icon-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.bento-icon-item img, .bento-icon-item svg {
  width: 32px;
  height: 32px;
  filter: grayscale(100%) brightness(1.5);
  transition: all 0.3s ease;
}

.bento-icon-item:hover img, .bento-icon-item:hover svg {
  filter: grayscale(0%) brightness(1);
}

.bento-icon-item span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-dim);
}

/* Tools Box */
.bento-tools {
  display: flex;
  flex-direction: column;
}
.bento-tools-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.bento-tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.bento-tool-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--nothing-red);
}

.bento-tool-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bento-tool-item-left svg {
  width: 20px;
  height: 20px;
  color: var(--text-main);
}

.bento-tool-name {
  font-size: 15px;
  font-weight: 600;
}

.bento-tool-status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bento-tool-status .dot {
  width: 6px;
  height: 6px;
  background: var(--nothing-red);
  border-radius: 50%;
  animation: strobe 2s infinite;
}
.bento-tool-status span {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .bento-square {
    grid-column: span 12;
  }
}

/* EXPERIENCE */
.experience-widget {
  grid-column: span 12;
  margin-bottom: 6px;
}
.timeline-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--glass-border);
}
.timeline-item:last-child {
  border-bottom: none;
}
.timeline-item .date {
  font-family: "JetBrains Mono";
  font-size: 11px;
  color: var(--nothing-red);
  margin-bottom: 4px;
  display: block;
}
.timeline-item h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

/* PROJECTS */
.projects-widget {
  grid-column: span 12;
  margin-top: 16px;
}
.projects-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 24px;
  padding-bottom: 24px;
}

.work-card-inner {
  position: relative;
  border: none;
  border-bottom: 1px solid var(--glass-border);
  min-height: 1px;
  border-radius: 0;
  padding: 28px 16px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: background 0.3s ease, padding-left 0.3s ease;
  cursor: pointer;
}
.work-card-inner:first-child {
  border-top: 1px solid var(--glass-border);
  min-height: 1px;
}

.work-card-inner:hover,
.work-card-inner.is-active {
  background: rgba(255, 255, 255, 0.025);
  padding-left: 22px;
}

/* header row */
.work-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.work-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.work-list-title {
  font-size: clamp(20px, 2.8vw, 34px);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-dim);
  transition: color 0.3s ease;
  word-break: break-word;
  line-height: 1;
}
.work-card-inner:hover .work-list-title,
.work-card-inner.is-active .work-list-title {
  color: var(--text-main);
}

.work-expand-icon {
  color: var(--text-muted);
  transition: transform 0.4s ease, color 0.3s ease;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}
.work-card-inner:hover .work-expand-icon,
.work-card-inner.is-active .work-expand-icon {
  color: var(--text-main);
  transform: rotate(45deg);
}

/* expandable body */
.work-list-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, margin-top 0.3s ease;
  margin-top: 0;
}
.work-card-inner:hover .work-list-body,
.work-card-inner.is-active .work-list-body {
  max-height: 700px;
  opacity: 1;
  margin-top: 20px;
}

/* desktop: text left / image right */
.work-list-content {
  display: flex;
  flex-direction: row;
  gap: 28px;
  align-items: flex-start;
}

.work-list-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-list-text .card-desc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.work-list-img {
  flex: 0 0 36%;
  max-width: 36%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  align-self: flex-start;
}
.work-list-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  display: block;
}

/* tablet: 190px thumbnail beside text */
@media (max-width: 1024px) {
  .work-list-img {
    flex: 0 0 190px;
    max-width: 190px;
  }
  .work-card-inner:hover .work-list-body,
  .work-card-inner.is-active .work-list-body {
    max-height: 700px;
  }
}

/* mobile: image first, stacked */
@media (max-width: 640px) {
  .work-card-inner {
    padding: 18px 14px;
  }
  .work-card-inner:hover,
  .work-card-inner.is-active {
    padding-left: 18px;
  }
  .work-list-header {
    gap: 10px;
  }
  .work-list-title {
    font-size: clamp(15px, 5vw, 22px);
    letter-spacing: -0.02em;
  }
  .work-title-group {
    gap: 6px;
  }
  .work-list-content {
    flex-direction: column;
    gap: 12px;
  }
  .work-list-img {
    order: -1;
    flex: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
  }
  .work-list-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
  }
  .work-list-text {
    order: 0;
    gap: 8px;
  }
  .work-card-inner:hover .work-list-body,
  .work-card-inner.is-active .work-list-body {
    max-height: 800px;
  }
  .work-list-text .card-desc {
    font-size: 13px;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ===== LANG UI ===== */
.lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}
.lang-strip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lang-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.lang-ico {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.lang-ico img {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0.95;
}
.lang-text b {
  color: var(--text-main);
  font-weight: 800;
}
.lang-sep {
  width: 1px;
  min-width: 1px;
  height: 14px;
  background: var(--glass-border);
  border-left: 1px solid var(--glass-border);
  opacity: 1;
  flex-shrink: 0;
}
.lang-strip:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}
@media (max-width: 600px) {
  .lang-row {
    gap: 8px;
  }
  .lang-strip {
    padding: 7px 10px;
    gap: 8px;
  }
  .lang-item {
    font-size: 9px;
  }
  .lang-ico,
  .lang-ico img {
    width: 14px;
    height: 14px;
  }
  .lang-sep {
    height: 12px;
  }
}



/* PLAYGROUND */
.playground-widget {
  grid-column: span 12;
  background: var(--surface-mid);
}
.play-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.play-title {
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}
.play-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.play-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin-top: 16px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .play-grid {
    grid-template-columns: 1fr;
  }
}
.play-panel {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  user-select: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}
.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 15px rgba(255, 255, 255, 0.05);
}
.chip b {
  color: var(--text-main);
  font-weight: 800;
}
.divider {
  height: 1px;
  min-height: 1px;
  background: var(--glass-border);
  border-top: 1px solid var(--glass-border);
  margin: 14px 0;
  opacity: 0.85;
}
.play-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.toggle-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: center;
  justify-content: space-between;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.toggle:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--surface-high);
}
.switch {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}
.knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-main);
  opacity: 0.85;
  transition: transform 0.22s var(--ease);
}
.toggle.on .knob {
  transform: translateX(20px);
}
.toggle.on {
  color: var(--text-main);
}

.play-board {
  height: 270px;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: radial-gradient(120px 120px at 20% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(140px 140px at 80% 70%, rgba(255, 255, 255, 0.05), transparent 62%), rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.play-seg {
  position: absolute;
  border-radius: 999px;
  background: var(--text-main);
  opacity: 0.06;
  transition: opacity 0.12s var(--ease), box-shadow 0.12s var(--ease), transform 0.12s var(--ease);
}
.play-seg.on {
  opacity: 0.95;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.35);
}
.ps1 {
  left: 22px;
  top: 30px;
  width: 120px;
  height: 6px;
}
.ps2 {
  left: 60px;
  top: 60px;
  width: 6px;
  height: 110px;
}
.ps3 {
  left: 90px;
  top: 90px;
  width: 150px;
  height: 5px;
  transform: rotate(20deg);
}
.ps4 {
  right: 26px;
  top: 26px;
  width: 6px;
  height: 90px;
}
.ps5 {
  right: 60px;
  top: 120px;
  width: 120px;
  height: 6px;
}
.ps6 {
  left: 30px;
  bottom: 34px;
  width: 200px;
  height: 6px;
}
.ps7 {
  right: 40px;
  bottom: 40px;
  width: 6px;
  height: 70px;
}
.ps8 {
  left: 170px;
  top: 40px;
  width: 70px;
  height: 70px;
  background: transparent;
  border: 4px solid var(--text-main);
  border-radius: 50%;
  opacity: 0.1;
}
.ps8.on {
  opacity: 1;
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.28);
}
.ps9 {
  left: 260px;
  bottom: 50px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.board-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
  padding: 5px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
}

/* CONTACT */
.contact-widget {
  grid-column: span 12;
  text-align: center;
  padding: 100px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.contact-title {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.contact-desc {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 0 40px;
  font-size: 16px;
  line-height: 1.6;
}
.contact-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.contact-actions .btn-system {
  padding: 16px 32px;
  font-size: 14px;
  min-width: 180px;
  justify-content: center;
}
.contact-actions .btn-ghost {
  padding: 16px 24px;
}
.copy-toast {
  opacity: 0;
  transform: translateY(4px);
  transition: var(--transition);
  margin-bottom: 32px;
  color: var(--text-main);
  font-weight: 700;
}
.contact-socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.contact-socials .chip {
  padding: 12px 20px;
  font-size: 13px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .contact-widget {
    padding: 80px 20px;
  }
  .contact-title {
    font-size: clamp(32px, 8vw, 40px);
  }
  .contact-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    gap: 12px;
  }
  .contact-actions .btn-system {
    width: 100%;
  }
  .contact-socials {
    width: 100%;
    max-width: 320px;
    gap: 12px;
  }
  .contact-socials .chip {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* PREMIUM FOOTER */
.premium-footer {
  grid-column: span 12;
  padding: 60px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  background: linear-gradient(180deg, transparent 0%, var(--surface-low) 100%);
  border-top: 1px solid var(--glass-border);
}
.pf-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.pf-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
}
.pf-brand h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.pf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
}
.pf-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 140px;
}
.pf-col .label {
  margin: 0 0 8px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 100%;
}
.pf-link {
  color: var(--text-dim);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}
.pf-link::before {
  content: '→';
  margin-right: 8px;
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition);
  color: #54aeff;
}
.pf-link:hover {
  color: #54aeff;
  transform: translateX(4px);
}
.pf-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}
.pf-divider {
  margin: 0;
  height: 1px;
  min-height: 1px;
  background: var(--glass-border);
  border-top: 1px solid var(--glass-border);
  opacity: 0.7;
}
.pf-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}
.pf-copy span:first-child {
  color: var(--text-main);
}
.pf-status {
  display: flex;
  flex-direction: column;
  text-align: right;
  gap: 4px;
}
.pf-live {
  color: var(--text-main);
  font-weight: 700;
}

/* BUTTONS */
.btn-system {
  background: var(--text-main);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--bg);
  border: 1px solid var(--text-main);
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
.btn-system:hover {
  background: var(--nothing-red);
  border-color: var(--nothing-red);
  color: #ffffff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 20px -5px rgba(0, 122, 255, 0.3);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-main);
  color: var(--text-main);
}
.btn-mini {
  padding: 10px 12px;
  font-size: 11px;
}
.btn-tiny {
  padding: 8px 10px;
  font-size: 10px;
}

@keyframes strobe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* SMALL */
@media (max-width: 600px) {
  .container {
    padding: 92px 14px 64px;
  }
  .grid-interface {
    gap: 12px;
  }
  .widget {
    padding: 22px;
  }
  .theme-toggle,
  .nav-hamburger {
    width: 40px;
    height: 40px;
  }
  .hero-widget {
    min-height: unset;
    padding-top: 26px;
    padding-bottom: 26px;
  }
  .premium-footer {
    padding: 40px 24px 32px;
  }
  .pf-top {
    flex-direction: column;
    gap: 48px;
  }
  .pf-links {
    width: 100%;
    justify-content: space-between;
    gap: 32px;
  }
  .pf-bottom {
    flex-direction: column;
    text-align: left;
  }
  .pf-status {
    text-align: left;
  }
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-high);
  border-radius: 10px;
}

#mainNav.expanded {
  --nav-row-h: 60px;
  --led-nudge: 2.5px;
}
#mainNav.expanded .ng-left-dot {
  top: calc((var(--nav-row-h) / 2) + var(--led-nudge));
  transform: translateY(-50%);
}

.work-input{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--surface-low);
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  outline: none;
  min-width: 220px;
}
.work-input:focus{ border-color: var(--nothing-red); }

/* === Work cards: meta row + nicer language icons === */
.meta-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
  opacity:.95;
}
.meta-row .chip{
  padding:8px 10px;
}
.lang-item{
  color: var(--nothing-red);
}
.lang-ico img{
  /* tint devicon icons to match site accent */
  filter: grayscale(1) sepia(1) saturate(9) hue-rotate(330deg) brightness(1.15);
}
.lang-ico svg{
  color: var(--nothing-red);
}

/* Small hover polish */
.work-card-inner{
  transition: transform .18s ease, box-shadow .18s ease;
}
.work-card-inner:hover{
  transform: translateY(-3px);
}

/* ================================= */
/* Scroll and Page Load Animations   */
/* ================================= */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Base Page Load states */
body:not(.page-loaded) #mainNav {
  transform: translate(-50%, -20px);
  opacity: 0;
}

body:not(.page-loaded) .hero-widget {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
}

body.page-loaded #mainNav {
  transform: translate(-50%, 0);
  opacity: 1;
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s, opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
}

body.page-loaded .hero-widget {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}

/* PRELOADER */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.8, 0, 0.2, 1), opacity 0.8s var(--ease);
}
.preloader.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}
.loader-logo {
  font-size: clamp(32px, 8vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  color: var(--text-main);
  opacity: 0;
  animation: fadeUp 0.6s var(--ease) forwards;
}
.loader-logo .red-dot {
  width: clamp(8px, 2vw, 16px);
  height: clamp(8px, 2vw, 16px);
  background: var(--nothing-red);
  border-radius: 50%;
  animation: pulseDot 1s infinite alternate;
}
.loader-text {
  overflow: hidden;
}
.loader-text-inner {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: translateY(100%);
  animation: revealText 0.6s var(--ease) 0.3s forwards;
}
.loader-counter {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--text-main);
  margin-top: 16px;
  line-height: 1;
  opacity: 0;
  animation: fadeUp 0.4s var(--ease) 0.1s forwards;
}
.loader-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
}
.loader-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--nothing-red);
  transition: width 0.1s linear;
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes revealText {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}
@keyframes pulseDot {
  0% { opacity: 0.4; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* ==========================================
   BONUS TECHNIQUES: LERP & TEXT SPLITTING
   ========================================== */

/* 1. Map Range / Lerp Scroll Bar */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--nothing-red);
  z-index: 10000;
  width: 0%;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 45, 55, 0.5);
}

/* 2. Text Splitting & Premium Easing */
.split-text {
  /* Container for split words */
}
.split-word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
  vertical-align: top;
}
.split-char {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  /* Super premium easing cubic-bezier */
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s var(--ease);
}
.split-text.in-view .split-char {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================
   PAC-MAN CONTRIBUTION GRAPH
   ========================================== */
.pac-contribution-widget {
  grid-column: span 12;
  overflow: visible;
}

/* Top bar: title + GH link */
.pac-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pac-widget-title {
  font-size: clamp(22px, 3.5vw, 30px);
  margin: 6px 0 0;
  letter-spacing: -0.03em;
}
.pac-gh-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface-low);
  transition: var(--transition);
  flex-shrink: 0;
}
.pac-gh-link:hover {
  color: #54aeff;
  border-color: #54aeff;
  background: rgba(84,174,255,0.07);
}

/* ── Hero stat block ── */
.pac-hero-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.pac-hero-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(84,174,255,0.4), transparent);
}
.pac-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pac-hero-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.pac-hero-value {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #54aeff 0%, #007aff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Secondary stats row ── */
.pac-secondary-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--surface-low);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  max-width: 100%;
}
.pac-sec-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 16px;
  transition: background 0.3s ease;
  text-align: center;
  min-width: 80px;
}
.pac-sec-chip:hover {
  background: var(--surface-mid);
}
.pac-sec-chip svg {
  color: #54aeff;
  flex-shrink: 0;
}
.pac-streak-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.pac-sec-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}
.pac-sec-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}
.pac-sec-divider {
  width: 1px;
  min-width: 1px;
  align-self: stretch;
  background: var(--glass-border);
  flex-shrink: 0;
  opacity: 0.9;
}

/* ── Legend ── */
.pac-legend-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  padding-right: 4px;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}
.pac-legend-text {
  margin: 0 2px;
}
.pac-legend-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

/* Streak active pulse */
@keyframes streak-pulse-blue {
  0%   { box-shadow: 0 0 0 0 rgba(84,174,255,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(84,174,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(84,174,255,0); }
}
#pacStreakChip.streak-active {
  background: rgba(84,174,255,0.06);
}
#pacStreakChip.streak-active .pac-sec-value {
  color: #54aeff;
}

/* ── Mobile: contribution section ── */
@media (max-width: 640px) {
  .pac-contribution-widget {
    display: none !important;
  }
  .pac-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .pac-hero-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 18px;
  }
  .pac-secondary-stats {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
  }
  .pac-sec-chip {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
  }
  .pac-sec-label {
    font-size: 8px;
    letter-spacing: 0.04em;
  }
  .pac-sec-value {
    font-size: 15px;
  }
  .pac-legend-row {
    justify-content: center;
  }
}
[data-theme="light"] .pac-hero-stat { background: rgba(0,0,0,0.02); }
[data-theme="light"] .pac-legend-cell:first-of-type { border-color: rgba(0,0,0,0.12) !important; }



/* STREAK CHIP PULSE on new record */
@keyframes streak-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,215,0,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(255,215,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,215,0,0); }
}
.pac-stat-chip.streak-active {
  border-color: rgba(255,215,0,0.5);
  animation: streak-pulse 1.8s ease infinite;
}
.pac-stat-chip.streak-active .pac-stat-value { color: #FFD700; }

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  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;
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
  transform: translateY(2px);
}





/* Loader 9: Bounce Shadow */
.circle-bounce-shadow {
  --size-multiplier: calc(var(--loader-size, 40px) / 40);
  width: calc(80px * var(--size-multiplier));
  height: calc(36px * var(--size-multiplier));
  position: relative;
  z-index: 1;
}

.circle-bounce-shadow .bounce-circle {
  width: calc(10px * var(--size-multiplier));
  height: calc(10px * var(--size-multiplier));
  position: absolute;
  border-radius: 50%;
  background-color: var(--loader-color, var(--nothing-red));
  left: 15%;
  transform-origin: 50%;
  animation: bounce-circle-anim var(--loader-duration, 0.6s) alternate infinite ease;
}

@keyframes bounce-circle-anim {
  0% {
    top: calc(28px * var(--size-multiplier));
    height: calc(3px * var(--size-multiplier));
    border-radius: 30px 30px 15px 15px;
    transform: scaleX(1.7);
  }
  40% {
    height: calc(10px * var(--size-multiplier));
    border-radius: 50%;
    transform: scaleX(1);
  }
  100% {
    top: 0%;
  }
}

.circle-bounce-shadow .bounce-circle:nth-child(2) {
  left: 45%;
  animation-delay: 0.2s;
}

.circle-bounce-shadow .bounce-circle:nth-child(3) {
  left: auto;
  right: 15%;
  animation-delay: 0.4s;
}

.circle-bounce-shadow .bounce-shadow {
  width: calc(10px * var(--size-multiplier));
  height: calc(3px * var(--size-multiplier));
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  position: absolute;
  top: calc(30px * var(--size-multiplier));
  transform-origin: 50%;
  z-index: -1;
  left: 15%;
  filter: blur(1px);
  animation: bounce-shadow-anim var(--loader-duration, 0.6s) alternate infinite ease;
}
[data-theme="light"] .circle-bounce-shadow .bounce-shadow {
  background-color: rgba(0, 0, 0, 0.15);
}

@keyframes bounce-shadow-anim {
  0% {
    transform: scaleX(1.5);
  }
  40% {
    transform: scaleX(1);
    opacity: .7;
  }
  100% {
    transform: scaleX(.2);
    opacity: .4;
  }
}

.circle-bounce-shadow .bounce-shadow:nth-child(4) {
  left: 45%;
  animation-delay: 0.2s;
}

.circle-bounce-shadow .bounce-shadow:nth-child(5) {
  left: auto;
  right: 15%;
  animation-delay: 0.4s;
}

.preloader-spinner.circle-bounce-shadow {
  --loader-size: 50px !important;
  --size-multiplier: 1.25 !important;
  --loader-color: var(--nothing-red) !important;
  --loader-duration: 0.6s !important;
  margin-top: 24px;
  margin-bottom: 8px;
}


