/* style.css */
:root {
  --bg: #000;
  --surface-low: #0a0a0a;
  --surface-mid: #141414;
  --surface-high: #1f1f1f;

  --text-main: #fff;
  --text-dim: #a0a0a0;
  --text-muted: #666;

  --nothing-red: #ff2d37;
  --nothing-green: #00ff88;
  --nothing-yellow: #ffc857;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.04);

  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 16px;

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

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

[data-theme="light"] {
  --bg: #f4f4f4;
  --surface-low: #fff;
  --surface-mid: #eee;
  --surface-high: #e0e0e0;

  --text-main: #000;
  --text-dim: #444;
  --text-muted: #777;

  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(0, 0, 0, 0.03);

  --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);
  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);
}

main,
section,
div,
img {
  min-width: 0;
}

img {
  max-width: 100%;
}

/* ✅ global: no grayscale / no blur-y effects */
img {
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.widget:hover {
  transform: none !important;
  box-shadow: none !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;
}

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

  width: calc(100vw - clamp(16px, 2.4vw, 40px));
  background: var(--glass-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);

  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 20px 40px -10px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.05);

  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;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-radius: 999px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  background: var(--surface-mid);
}

.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 {
    width: calc(100vw - 20px);
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    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: 100%;
    text-align: center;
    padding: 14px;
    border-radius: 14px;
  }

  .nav-brand {
    padding: 10px 16px;
  }

  #mainNav .ng-top-bar {
    left: 10%;
    width: 80%;
  }

  #mainNav .ng-bottom-dash {
    left: 10%;
  }
}

/* LAYOUT */
.container {
  width: calc(100vw - clamp(16px, 2.4vw, 40px));
  margin: 0 auto;
  padding: 96px 0 72px;
}

.grid-interface {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 1.5vw, 20px);
}

section.widget {
  scroll-margin-top: 110px;
}

/* WIDGETS */
.widget {
  background: var(--surface-low);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 2vw, 34px);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.widget:hover {
  border-color: var(--text-dim);
}

/* 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;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--nothing-green);
  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-green);
  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: 885px;
  margin-bottom: 22px;
  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

/* 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: 100%;
  margin-bottom: 10px;
  text-wrap: pretty;
}

.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: minmax(0, 1fr) clamp(260px, 24vw, 360px);
  gap: 18px;
  align-items: start;
  width: 100%;
}

.about-text-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.about-desc {
  color: var(--text-dim);
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.62;
  font-weight: 400;
  text-wrap: pretty;
  max-width: none;
  width: 100%;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: auto;
  hyphens: auto;
}

.about-inline-link {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
  transition: var(--transition);
}

.about-inline-link:hover {
  color: var(--nothing-green);
  text-decoration-color: rgba(0, 255, 136, 0.45);
}

.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: clamp(260px, 24vw, 360px);
  max-width: 100%;
  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;
  align-self: start;
  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: cover;
  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;
}

.skill-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

@media (max-width: 900px) {
  .skill-groups {
    grid-template-columns: 1fr;
  }
}

.skill-group {
  background: linear-gradient(160deg, var(--surface-mid) 0%, var(--surface-low) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.skill-group::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--glass-border) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.15;
  pointer-events: none;
}

.skill-group:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--surface-mid);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.sg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}

.sg-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sg-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-high);
  border-radius: 8px;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  flex: 0 0 auto;
}

.sg-title {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.sg-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--text-dim);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  transition: var(--transition);
}

.skill-group:hover .sg-tag {
  background: var(--text-main);
  color: var(--bg);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: auto;
  position: relative;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 200, 87, 0.28);
  background: rgba(255, 200, 87, 0.07);
  color: #d7c38c;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
  cursor: default;
}

.pill:hover {
  border-color: rgba(255, 200, 87, 0.42);
  background: rgba(255, 200, 87, 0.11);
  color: var(--text-main);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nothing-yellow);
  opacity: 0.95;
  transition: var(--transition);
}

.pill.live {
  border-color: rgba(0, 255, 136, 0.28);
  background: rgba(0, 255, 136, 0.07);
  color: #b8ffd9;
}

.pill.live .pill-dot {
  background: var(--nothing-green);
  opacity: 1;
  animation: skill-blink 2s infinite ease-in-out;
}

.pill:hover .pill-dot {
  opacity: 1;
  background: var(--nothing-yellow);
}

.pill.live:hover .pill-dot {
  background: var(--nothing-green);
}

.skill-note {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  position: relative;
  font-style: italic;
}

/* 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 .date.active {
  color: var(--nothing-yellow);
}

.timeline-item .date.complete {
  color: var(--nothing-green);
}

.timeline-item h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

/* PROJECTS */
.projects-widget {
  grid-column: span 12;
  margin-top: 16px;
}

.projects-container {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.graphic-work-shell {
  margin-top: 24px;
}

.graphic-work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.graphic-work-header h3 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-top: 8px;
}

.graphic-work-header .card-desc {
  max-width: 760px;
  margin-top: 10px;
}

.graphics-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 16px;
}

.graphic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 42%), var(--surface-mid);
  color: var(--text-main);
  text-decoration: none;
  isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  break-inside: avoid;
  
  width: 100%;

  height: 100%;
}

.graphic-card-media {
  position: relative;
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 48%),
    rgba(255, 255, 255, 0.02);
}

.graphic-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  
}

.graphic-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.46);
  color: rgba(255, 255, 255, 0.84);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graphic-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.92) 100%);
  min-height: 78px;
}

.graphic-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.graphic-card-brief {
  max-height: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  transition: max-height 0.35s var(--ease), opacity 0.35s var(--ease);
}

.graphic-card:hover,
.graphic-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
}

.graphic-card:hover .graphic-card-body,
.graphic-card:focus-visible .graphic-card-body {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.96) 100%);
}

.graphic-card:hover .graphic-card-brief,
.graphic-card:focus-visible .graphic-card-brief {
  max-height: 120px;
  opacity: 1;
}

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

@media (max-width: 640px) {
  .projects-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .graphics-gallery {
      grid-template-columns: repeat(3, 1fr);
      grid-auto-rows: 220px;
    }
}

@media (max-width: 850px) {
  .graphics-gallery {
      grid-template-columns: repeat(2, 1fr);
      grid-auto-rows: 200px;
    }
}

@media (max-width: 680px) {
  .graphic-work-header {
    align-items: flex-start;
  }

  .graphics-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 16px;
}
}

@media (hover: none) {
  .graphic-card-brief {
    max-height: 110px;
    opacity: 1;
  }
}

.work-card-inner {
  background: var(--surface-mid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  min-width: 0;
}

.work-card-inner:hover {
  border-color: var(--nothing-red);
  background: var(--surface-high);
}

.project-img-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface-low);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

.project-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 10, 18, 0.82);
  color: rgba(255, 255, 255, 0.9);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
}

.project-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: currentColor;
  color: #09111d;
}

.project-status-icon svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-status-building {
  color: #ffd15c;
}

.project-status-finished {
  color: #62f5a6;
}

.project-status-building .project-status-icon {
  animation: status-pulse 1.4s ease-in-out infinite;
}

.project-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  /* optional sharpness helpers */
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@keyframes status-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 209, 92, 0.24);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(255, 209, 92, 0);
  }
}

/* ===== 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: 8px 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  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: 6px;
  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;
  position: relative;
}

.lang-ico img {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0.95;
}

.lang-ico-tag {
  position: absolute;
  right: -7px;
  bottom: -6px;
  padding: 1px 4px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.84);
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.lang-text b {
  color: var(--text-main);
  font-weight: 800;
}

.lang-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-percent {
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.lang-sep {
  width: 1px;
  height: 14px;
  background: var(--glass-border);
  opacity: 0.9;
}

.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: 8px 10px;
    gap: 7px 10px;
  }

  .lang-item {
    font-size: 9px;
  }

  .lang-percent {
    font-size: 8px;
  }

  .lang-ico,
  .lang-ico img {
    width: 14px;
    height: 14px;
  }

  .lang-ico-tag {
    right: -6px;
    bottom: -5px;
    font-size: 5px;
  }

  .lang-sep {
    height: 12px;
  }
}

/* GLYPH MINI */
.p-glyph {
  position: absolute;
  background: var(--nothing-red);
  opacity: 0;
  border-radius: 100px;
  transition: all 0.4s var(--ease);
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 10px var(--nothing-red);
}

.pg-arc {
  top: -10px;
  right: -10px;
  width: 60px;
  height: 60px;
  background: transparent;
  border: 3px solid var(--nothing-red);
  border-radius: 50%;
  clip-path: inset(0 0 50% 50%);
  transform: rotate(45deg);
}

.pg-bar {
  bottom: 10%;
  right: -2px;
  width: 3px;
  height: 40px;
}

.pg-dot {
  top: 15%;
  left: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.work-card-inner:hover .p-glyph {
  opacity: 0.8;
  box-shadow: 0 0 15px var(--nothing-red);
}

.p-glyph.triggered {
  animation: glyph-pulse 0.6s var(--ease);
}

@keyframes glyph-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.5);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(2);
  }

  100% {
    opacity: 0.8;
    transform: scale(1);
    filter: brightness(1);
  }
}

/* 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: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  user-select: none;
  white-space: nowrap;
}

.chip b {
  color: var(--text-main);
  font-weight: 800;
}

.gh-user-link {
  color: var(--text-main);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.22);
  text-underline-offset: 3px;
  transition: var(--transition);
}

.gh-user-link:hover {
  color: var(--nothing-green);
  text-decoration-color: rgba(0, 255, 136, 0.4);
}

.repo-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.repo-chip-label {
  color: var(--text-dim);
}

.repo-chip-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.repo-chip-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.repo-chip-segment b {
  color: var(--text-main);
  font-weight: 800;
}

.repo-chip-segment.public {
  color: #9de7be;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.18);
}

.repo-chip-segment.public b {
  color: var(--nothing-green);
}

.repo-chip-segment.private {
  color: #f0c98a;
  background: rgba(255, 200, 87, 0.08);
  border: 1px solid rgba(255, 200, 87, 0.2);
}

.repo-chip-segment.private b {
  color: var(--nothing-yellow);
}

.repo-chip-segment.total {
  color: #d7d7d7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.repo-chip-segment.total b {
  color: var(--text-main);
}

#ghStatus.status-live {
  color: var(--nothing-green);
}

#ghStatus.status-loading,
#ghStatus.status-cached,
#ghStatus.status-stale {
  color: var(--nothing-yellow);
}

#ghStatus.status-error,
#ghStatus.status-rate-limit {
  color: var(--nothing-red);
}

.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 14px 0;
}

.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;
  background: var(--surface-mid);
  text-align: left;
}

.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.contact-title {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}

.contact-sub {
  color: var(--text-dim);
  max-width: 620px;
  font-size: 14px;
  margin-top: 10px;
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: min(320px, 100%);
}

.contact-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 18px;
  overflow: hidden;
  position: relative;
}

.contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.status-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.contact-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copy-toast {
  opacity: 0;
  transform: translateY(4px);
  transition: var(--transition);
}

/* FOOTER */
footer {
  grid-column: span 12;
  padding: 52px 0 10px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono";
  font-size: 10px;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 700px;
}

.footer-right {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  text-align: right;
  flex-grow: 1;
}

.footer-strong {
  color: var(--text-dim);
}

.footer-link {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 2px;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text-main);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.legal {
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.6;
  font-size: 12px;
}

/* BUTTONS */
.btn-system {
  background: var(--text-main);
  color: var(--bg);
  border: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.btn-system:hover {
  background: var(--nothing-red);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.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 {
    width: calc(100vw - 16px);
    padding: 92px 0 64px;
  }

  .grid-interface {
    gap: 12px;
  }

  .widget {
    padding: 22px;
  }

  .skill-group {
    padding: 20px;
  }

  .pill-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  .pill {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.3;
  }

  .theme-toggle,
  .nav-hamburger {
    width: 40px;
    height: 40px;
  }

  .hero-widget {
    min-height: unset;
    padding-top: 26px;
    padding-bottom: 26px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
  }
}

::-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 {
  filter: none;
}

.lang-special-flask img,
.lang-special-flask-cors img {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.16));
}

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

.work-card-inner:hover {
  transform: translateY(-3px);
}


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

.work-card-inner:hover {
  transform: translateY(-3px);
}

.work-card-inner:hover {
  transform: translateY(-3px);
}

/* ===== SKILLS LIVE DOT BLINK ===== */
@keyframes skill-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.project-status-paused {
  color: #888888;
}

.pill.yellow {
  border-color: rgba(255, 200, 87, 0.28);
  background: rgba(255, 200, 87, 0.07);
  color: #ffeba1;
}

.pill.yellow .pill-dot {
  background: var(--nothing-yellow);
  opacity: 1;
  animation: skill-blink 2s infinite ease-in-out;
}

.pill.yellow { background-color: rgba(255, 200, 87, 0.1); color: var(--nothing-yellow); border-color: rgba(255, 200, 87, 0.2); }
.project-status-paused { color: #888888; border: 1px solid #333333; background: rgba(255,255,255,0.05); }
.graphic-work-shell > summary::-webkit-details-marker { display: none; }
.graphic-work-shell[open] .dropdown-arrow { transform: rotate(180deg); }

.pill.blue {
  border-color: rgba(0, 191, 255, 0.28);
  background: rgba(0, 191, 255, 0.07);
  color: #a8e5ff;
}
.pill.blue .pill-dot {
  background: #00bfff;
  opacity: 1;
  animation: skill-blink 2s infinite ease-in-out;
}
.skill-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.skill-stack .skill-group {
  height: max-content;
}
.primary-skill {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.graphic-span-large { grid-column: span 2; grid-row: span 2; }
.graphic-span-tall { grid-column: span 1; grid-row: span 2; }
.graphic-span-wide { grid-column: span 2; grid-row: span 1; }
.graphic-span-small { grid-column: span 1; grid-row: span 1; }
/* SYSTEM FLOW ANIMATION */
.sys-flow-container {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin-top: auto;
  padding: 32px 16px;
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.sys-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.sys-node span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.3s ease;
  margin-top: 4px;
}

.sys-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.sys-icon svg {
  width: 16px;
  height: 16px;
}

.sys-node:hover .sys-icon {
  border-color: rgba(0, 255, 170, 0.5);
  color: #00ffaa;
  box-shadow: 0 0 16px rgba(0, 255, 170, 0.2), inset 0 0 10px rgba(0, 255, 170, 0.1);
  transform: translateY(-2px);
}

.sys-node:hover span {
  color: #00ffaa;
}

.sys-path {
  flex-grow: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 8px;
  position: relative;
  top: -10px;
  overflow: hidden;
}

.sys-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 170, 0.8), transparent);
  animation: sys-flow-dot 3s linear infinite;
  opacity: 0;
}

@keyframes sys-flow-dot {
  0% { left: -100%; opacity: 1; }
  33% { left: 100%; opacity: 1; }
  33.01% { opacity: 0; }
  100% { left: 100%; opacity: 0; }
}
  100% { left: 100%; }
}

.sys-node-terminal .sys-icon {
  border-color: rgba(0, 191, 255, 0.3);
  color: #00bfff;
}

.sys-node-terminal:hover .sys-icon {
  border-color: rgba(0, 191, 255, 0.6);
  color: #00bfff;
  box-shadow: 0 0 16px rgba(0, 191, 255, 0.3), inset 0 0 10px rgba(0, 191, 255, 0.15);
}

.sys-node-terminal:hover span {
  color: #00bfff;
}

.sys-pulse-ring {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 10px;
  border: 1px solid rgba(0, 191, 255, 0.8);
  animation: sys-pulse 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  pointer-events: none;
}

@keyframes sys-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 500px) {
  .sys-flow-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }
  .sys-node {
    flex-direction: row;
  }
  .sys-path {
    width: 2px;
    height: 24px;
    margin: 0 0 0 17px;
    top: 0;
  }
  .sys-dot {
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 170, 0.8), transparent);
    animation: sys-flow-dot-vertical 1.5s linear infinite;
  }
  @keyframes sys-flow-dot-vertical {
    0% { top: -100%; left: 0; opacity: 1; }
    33% { top: 100%; left: 0; opacity: 1; }
    33.01% { opacity: 0; }
    100% { top: 100%; left: 0; opacity: 0; }
  }
    100% { top: 100%; left: 0; }
  }
}
/* SYSTEM ARCHITECTURE CENTERPIECE */
.sys-flow-cp {
  position: relative;
  flex-grow: 1;
  min-height: 340px;
  background: radial-gradient(circle at center, rgba(0, 255, 170, 0.04) 0%, transparent 60%),
              rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  margin-top: 32px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.sf-svg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
}

.sf-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 2px;
}

.sf-track-glow {
  fill: none;
  stroke-width: 4px;
  stroke-linecap: round;
}

.sf-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
  cursor: default;
  
  --node-color-alpha-3: color-mix(in srgb, var(--node-color) 30%, transparent);
  --node-color-alpha-2: color-mix(in srgb, var(--node-color) 20%, transparent);
  --node-color-alpha-1: color-mix(in srgb, var(--node-color) 10%, transparent);
}

.sf-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.sf-icon svg {
  width: 28px;
  height: 28px;
}

.sf-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: color 0.3s ease;
  background: rgba(0,0,0,0.4);
  padding: 6px 12px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* Base glow animations */
@keyframes sf-node-glow-anim {
  0%, 30% { 
    border-color: var(--node-color);
    color: var(--node-color);
    box-shadow: 0 0 30px var(--node-color-alpha-3), inset 0 0 15px var(--node-color-alpha-2);
    transform: translateY(-5px) scale(1.05);
  }
  40%, 100% { 
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transform: translateY(0) scale(1);
  }
}

@keyframes sf-label-glow-anim {
  0%, 30% { color: var(--node-color); background: var(--node-color-alpha-1); }
  40%, 100% { color: rgba(255, 255, 255, 0.5); background: rgba(0,0,0,0.4); }
}

/* Assign timing */
.sf-node-1 .sf-icon { animation: sf-node-glow-anim 4s infinite 0s; }
.sf-node-1 .sf-label { animation: sf-label-glow-anim 4s infinite 0s; }

.sf-node-2 .sf-icon { animation: sf-node-glow-anim 4s infinite 0.8s; }
.sf-node-2 .sf-label { animation: sf-label-glow-anim 4s infinite 0.8s; }

.sf-node-3 .sf-icon { animation: sf-node-glow-anim 4s infinite 2.0s; }
.sf-node-3 .sf-label { animation: sf-label-glow-anim 4s infinite 2.0s; }

.sf-node-4 .sf-icon { animation: sf-node-glow-anim 4s infinite 3.2s; }
.sf-node-4 .sf-label { animation: sf-label-glow-anim 4s infinite 3.2s; }

/* Keep hover states for manual interaction */
.sf-node:hover .sf-icon {
  border-color: var(--node-color) !important;
  color: var(--node-color) !important;
  box-shadow: 0 0 30px var(--node-color-alpha-3), inset 0 0 15px var(--node-color-alpha-2) !important;
  transform: translateY(-5px) scale(1.05) !important;
  animation: none;
}

.sf-node:hover .sf-label {
  color: var(--node-color) !important;
  background: var(--node-color-alpha-1) !important;
  animation: none;
}

/* Water Droplet Ripple */
.sf-ripple {
  position: absolute;
  top: 50%; left: 50%;
  width: 60px; height: 60px;
  border-radius: 16px;
  border: 2px solid var(--node-color);
  opacity: 0;
  pointer-events: none;
}

@keyframes sf-ripple-anim {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
  1% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  30% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

.sf-node-1 .sf-ripple { animation: sf-ripple-anim 4s infinite 0s; }
.sf-node-2 .sf-ripple { animation: sf-ripple-anim 4s infinite 0.8s; }
.sf-node-3 .sf-ripple { animation: sf-ripple-anim 4s infinite 2.0s; }
.sf-node-4 .sf-ripple { animation: sf-ripple-anim 4s infinite 3.2s; }

@media (max-width: 600px) {
  .sys-flow-cp { min-height: 280px; }
  .sf-icon { width: 44px; height: 44px; border-radius: 12px; }
  .sf-icon svg { width: 22px; height: 22px; }
  .sf-label { font-size: 11px; padding: 4px 8px; }
  .sf-ripple { width: 44px; height: 44px; border-radius: 12px; }
}
