/* ═══════════════════════════════════════════════════════════
   PORTFOLIO — Design System & Styles
   Senior Frontend Engineer Portfolio
   Zero dependencies. Pure CSS. Maximum performance.
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties (Design Tokens) ─────────────── */
:root {
  /* Color System */
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f17;
  --bg-tertiary: #141420;
  --bg-elevated: #1a1a2e;
  --bg-card: #12121e;
  --bg-card-hover: #181830;

  --text-primary: #e4e4ef;
  --text-secondary: #8888a0;
  --text-tertiary: #55556a;
  --text-muted: #3d3d50;

  --accent-primary: #64ffda;
  --accent-secondary: #7c83ff;
  --accent-tertiary: #ff6b9d;
  --accent-warm: #ffd93d;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(100, 255, 218, 0.2);

  /* Syntax Highlighting (Code blocks) */
  --code-keyword: #c792ea;
  --code-string: #c3e88d;
  --code-type: #ffcb6b;
  --code-prop: #82aaff;
  --code-var: #89ddff;
  --code-comment: #546e7a;

  /* Typography Scale */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-xl: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  --text-2xl: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  --text-3xl: clamp(1.8rem, 1.4rem + 2vw, 3rem);
  --text-4xl: clamp(2.2rem, 1.6rem + 3vw, 4.5rem);
  --text-5xl: clamp(2.8rem, 2rem + 4vw, 6rem);

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --container-max: 1200px;
  --container-padding: clamp(1.5rem, 4vw, 4rem);
  --section-gap: clamp(6rem, 10vw, 12rem);

  /* Effects */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(100, 255, 218, 0.08);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Nav */
  --nav-height: 64px;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background-color: rgba(100, 255, 218, 0.2);
  color: var(--accent-primary);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

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

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

ul, ol {
  list-style: none;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

em {
  color: var(--accent-primary);
  font-style: normal;
}

/* ─── Utility / Shared ──────────────────────────────────── */
.code-keyword { color: var(--code-keyword); }
.code-string { color: var(--code-string); }
.code-type { color: var(--code-type); }
.code-prop { color: var(--code-prop); }
.code-var { color: var(--code-var); }
.code-comment {
  color: var(--code-comment);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.08);
  border: 1px solid rgba(100, 255, 218, 0.15);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ─── Reveal Animation ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }
.reveal:nth-child(7) { transition-delay: 480ms; }
.reveal:nth-child(8) { transition-delay: 560ms; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75em 1.5em;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn--primary {
  color: var(--bg-primary);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.btn--primary:hover {
  background: #7affea;
  border-color: #7affea;
  box-shadow: 0 0 24px rgba(100, 255, 218, 0.25);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--accent-primary);
  background: transparent;
  border-color: var(--accent-primary);
}

.btn--ghost:hover {
  background: rgba(100, 255, 218, 0.08);
  box-shadow: 0 0 24px rgba(100, 255, 218, 0.1);
  transform: translateY(-2px);
}

.btn--large {
  padding: 1em 2em;
  font-size: var(--text-base);
}

.btn__icon {
  transition: transform var(--transition-base);
}

.btn:hover .btn__icon {
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.nav--scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: var(--shadow-md);
}

.nav__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__logo-bracket {
  color: var(--accent-primary);
  transition: transform var(--transition-spring);
}

.nav__logo:hover .nav__logo-bracket:first-child {
  transform: translateX(-3px);
}

.nav__logo:hover .nav__logo-bracket:last-child {
  transform: translateX(3px);
}

.nav__logo-text {
  color: var(--text-primary);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--accent-primary);
}

.nav__link-index {
  color: var(--accent-primary);
  font-size: 0.7em;
  margin-right: 0.3em;
}

.nav__link--cta {
  padding: 0.4em 0.8em;
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
}

.nav__link--cta:hover {
  background: rgba(100, 255, 218, 0.08);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav__toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav__sound-toggle {
  margin-left: var(--space-sm);
}

/* Language Toggle */
.nav__actions-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-left: var(--space-md);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0.3em 0.6em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  line-height: 1;
}

.lang-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent-primary);
}

.lang-btn__current {
  color: var(--accent-primary);
  font-weight: 600;
}

.lang-btn__separator {
  color: var(--text-muted);
  margin: 0 1px;
}

.lang-btn__other {
  color: var(--text-tertiary);
  font-weight: 400;
}

.lang-btn:hover .lang-btn__other {
  color: var(--text-secondary);
}

.sound-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sound-btn:hover {
  color: var(--accent-primary);
  border-color: var(--border-accent);
}

.sound-btn.active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.08);
}

.sound-btn.active .sound-off { display: none; }
.sound-btn.active .sound-on { display: block !important; }
.sound-btn:not(.active) .sound-on { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 75%);
}

.hero__scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(100, 255, 218, 0.01) 2px,
    rgba(100, 255, 218, 0.01) 4px
  );
  animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

.hero__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.hero__terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin-bottom: 0;
  width: fit-content;
}

.hero__terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero__terminal-dot--red { background: #ff5f57; }
.hero__terminal-dot--yellow { background: #febc2e; }
.hero__terminal-dot--green { background: #28c840; }

.hero__terminal-tab {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-left: var(--space-sm);
}

.hero__prefix {
  margin-bottom: var(--space-lg);
}

.hero__comment {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--code-comment);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  display: inline-block;
}

.hero__title {
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xl);
}

.hero__title-line {
  display: block;
}

.hero__title-line--accent {
  color: var(--accent-primary);
  text-shadow: 0 0 40px rgba(100, 255, 218, 0.15);
}

.hero__cursor {
  display: inline-block;
  color: var(--accent-primary);
  animation: cursorBlink 1s step-end infinite;
  font-weight: 300;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: var(--space-2xl);
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.hero__stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--accent-primary);
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-medium);
}

/* Hero Code Block */
.hero__visual {
  position: relative;
}

.hero__code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.hero__code-block:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(100, 255, 218, 0.12);
}

.hero__code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.hero__code-file {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.hero__code-actions {
  display: flex;
  gap: 6px;
}

.hero__code-actions span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-elevated);
}

.hero__code {
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--text-secondary);
  overflow-x: auto;
}

.hero__code code {
  font-family: inherit;
}

/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-primary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; height: 40px; }
  50% { opacity: 0.3; height: 20px; }
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS — Shared
   ═══════════════════════════════════════════════════════════ */
.section {
  padding: var(--section-gap) 0;
}

.section__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}

.section__index {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--bg-elevated);
  line-height: 1;
  user-select: none;
  letter-spacing: -0.05em;
}

.section__title {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.section__title-dot {
  color: var(--accent-primary);
}

.section__line {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
  max-width: 300px;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════ */
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-4xl);
  align-items: start;
}

.about__lead {
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.about__content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

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

.about__sidebar-title {
  margin-bottom: var(--space-lg);
}

.about__principle-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about__principle {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.about__principle-icon {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Keycap Easter Egg */
.about__keycap {
  margin-top: var(--space-2xl);
  display: flex;
  justify-content: center;
}

.keycap {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow:
    0 4px 0 0 #111120,
    0 6px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.keycap:hover {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 0 #111120,
    0 3px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.keycap:active {
  transform: translateY(4px);
  box-shadow:
    0 0 0 0 #111120,
    0 1px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.keycap__label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.keycap__sub {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════════
   STACK SECTION
   ═══════════════════════════════════════════════════════════ */
.stack__intro {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: var(--space-3xl);
}

.stack__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.stack__card {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stack__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stack__card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.stack__card:hover::before {
  opacity: 1;
}

.stack__card--featured {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(100, 255, 218, 0.03) 100%);
  border-color: rgba(100, 255, 218, 0.1);
}

.stack__card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.stack__card-icon {
  color: var(--accent-primary);
}

.stack__card-emoji {
  font-size: 1.5rem;
}

.stack__card-level {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-primary);
  padding: 0.15em 0.5em;
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: var(--radius-sm);
}

.stack__card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.stack__card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.stack__card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS SECTION
   ═══════════════════════════════════════════════════════════ */
.projects__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.project {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.project:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.project__header {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-2xl);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.project__number {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--bg-elevated);
  line-height: 1;
}

.project__title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.project__role {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-primary);
}

.project__body {
  padding: var(--space-2xl);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.project__detail-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: var(--space-sm);
}

.project__detail p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.project__footer {
  padding: var(--space-lg) var(--space-2xl);
  border-top: 1px solid var(--border-subtle);
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ═══════════════════════════════════════════════════════════
   OPEN SOURCE SECTION
   ═══════════════════════════════════════════════════════════ */
.opensource__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: start;
}

.opensource__quote {
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.5;
  padding-left: var(--space-lg);
  border-left: 3px solid var(--accent-primary);
  margin-bottom: var(--space-xl);
  font-style: italic;
}

.opensource__quote p {
  color: var(--text-primary);
}

.opensource__philosophy p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.opensource__subtitle {
  margin-bottom: var(--space-xl);
}

.opensource__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.opensource__item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.opensource__item-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.opensource__item strong {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--text-base);
}

.opensource__item p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.opensource__cta {
  margin-top: var(--space-3xl);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   PHILOSOPHY SECTION
   ═══════════════════════════════════════════════════════════ */
.philosophy__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.philosophy__card {
  padding: var(--space-2xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
}

.philosophy__card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.philosophy__card-number {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--bg-elevated);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.philosophy__card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.philosophy__card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════════════ */
.contact__content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact__lead {
  font-size: var(--text-2xl);
  line-height: 1.4;
  margin-bottom: var(--space-lg);
}

.contact__sub {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-3xl);
}

.contact__terminal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
  text-align: left;
}

.contact__terminal-header {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.contact__terminal-body {
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 2;
  color: var(--text-secondary);
}

.contact__terminal-output {
  color: var(--accent-primary);
  padding-left: var(--space-lg);
}

.contact__actions {
  margin-bottom: var(--space-2xl);
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
}

.contact__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.contact__link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(100, 255, 218, 0.05);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  padding: var(--space-3xl) 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.footer__text {
  margin-bottom: var(--space-sm);
}

.footer__meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.footer__divider {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero__container {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }

  .hero__visual {
    max-width: 500px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .stack__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .opensource__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-3xl);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 1000;
  }

  .nav__menu.open {
    transform: translateX(0);
  }

  .nav__menu .nav__link {
    font-size: var(--text-base);
  }

  .nav__sound-toggle {
    display: none;
  }

  .nav__actions-group {
    margin-left: auto;
  }

  .lang-btn {
    font-size: var(--text-xs);
    padding: 0.25em 0.5em;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-3xl));
    padding-bottom: var(--space-4xl);
  }

  .hero__visual {
    display: none;
  }

  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .hero__stat-divider {
    width: 40px;
    height: 1px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    text-align: center;
    justify-content: center;
  }

  .hero__scroll-indicator {
    display: none;
  }

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

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

  .project__header {
    padding: var(--space-lg);
  }

  .project__body {
    padding: var(--space-lg);
  }

  .project__footer {
    padding: var(--space-md) var(--space-lg);
  }

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

  .contact__lead {
    font-size: var(--text-xl);
  }

  .section__header {
    gap: var(--space-sm);
  }

  .section__index {
    font-size: var(--text-3xl);
  }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════ */
@media print {
  .nav,
  .hero__bg-grid,
  .hero__scanline,
  .hero__scroll-indicator,
  .about__keycap {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 2rem 0;
    break-inside: avoid;
  }
}
