/* ═══════════════════════════════════════════════
   CJ PORTFOLIO — style.css
   Dark by default. Three themes. One xenomorph.
   ═══════════════════════════════════════════════ */

/* ─── THEME TOKENS ─── */
:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #1a1a1a;
  --border: rgba(255, 255, 255, 0.07);
  --border-mid: rgba(255, 255, 255, 0.13);
  --border-glow: rgba(10, 245, 231, 0.5);
  --text-1: #f0ede8;
  --text-2: #9a9590;
  --text-3: #5a5550;
  --accent: #0af5e7;
  --accent-dim: rgba(10, 245, 231, 0.1);
  --accent-2: #c8ff57;
  --glow: rgba(10, 245, 231, 0.12);
  --glow-strong: rgba(10, 245, 231, 0.25);
  --card-bg: #111111;
  --nav-bg: rgba(10, 10, 10, 0.88);
}

:root[data-theme="light"] {
  --bg: #f7f4ec;
  --bg-2: #ede9da;
  --bg-3: #e4dfc8;
  --border: rgba(0, 0, 0, 0.07);
  --border-mid: rgba(0, 0, 0, 0.13);
  --border-glow: rgba(90, 62, 26, 0.45);
  --text-1: #1a1410;
  --text-2: #5a5248;
  --text-3: #a09880;
  --accent: #5a3e1a;
  --accent-dim: rgba(90, 62, 26, 0.1);
  --accent-2: #3a5200;
  --glow: rgba(90, 62, 26, 0.08);
  --glow-strong: rgba(90, 62, 26, 0.18);
  --card-bg: #ede9da;
  --nav-bg: rgba(247, 244, 236, 0.9);
}

:root[data-theme="alien"] {
  --bg: #020d08;
  --bg-2: #041208;
  --bg-3: #071a0e;
  --border: rgba(10, 245, 150, 0.1);
  --border-mid: rgba(10, 245, 150, 0.2);
  --border-glow: rgba(10, 245, 150, 0.6);
  --text-1: #c8ffe8;
  --text-2: #5aaf80;
  --text-3: #2a5040;
  --accent: #0af596;
  --accent-dim: rgba(10, 245, 150, 0.1);
  --accent-2: #ffee00;
  --glow: rgba(10, 245, 150, 0.15);
  --glow-strong: rgba(10, 245, 150, 0.3);
  --card-bg: #041208;
  --nav-bg: rgba(2, 13, 8, 0.92);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  transition:
    background 0.4s ease,
    color 0.3s ease;
}

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

/* ─── TYPOGRAPHY ─── */
h1,
h2,
h3,
h4 {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

code,
.mono {
  font-family: "DM Mono", monospace;
}

/* ─── CUSTOM CURSOR ─── */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s ease,
    height 0.2s ease,
    opacity 0.2s;
  mix-blend-mode: difference;
}



/* ─── NAV ─── */
body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease;
}

.nav-logo {
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  color: var(--text-1);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.nav-logo span {
  color: var(--accent);
}
.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  position: relative;
  cursor: none;
}

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

.nav-links a:hover {
  color: var(--text-1);
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-contact {
  font-size: 12px;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent) !important;
  letter-spacing: 0.06em;
  transition: background 0.2s !important;
}
.nav-contact::after {
  display: none !important;
}
.nav-contact:hover {
  background: var(--accent-dim) !important;
}

/* ─── NAV RIGHT GROUP (theme picker + burger) ─── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ─── HAMBURGER BUTTON ─── */
.nav-burger {
  display: none;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: none;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-1);
  border-radius: 1px;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease,
    background 0.3s ease;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  background: var(--accent);
}
.nav-burger.open span:nth-child(2) {
  opacity: 0;
}
.nav-burger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  background: var(--accent);
}

/* ─── NAV OVERLAY (top-down full screen) ─── */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--bg);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: translateY(-100%);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}
.nav-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.nav-overlay::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.nav-overlay-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.nav-overlay-links a {
  font-family: "DM Serif Display", serif;
  font-size: 36px;
  color: var(--text-1);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
  cursor: none;
}
.nav-overlay-links a:hover {
  color: var(--accent);
}
.nav-overlay-contact {
  font-family: "DM Sans", sans-serif !important;
  font-size: 13px !important;
  padding: 10px 24px;
  border: 1px solid var(--accent);
  border-radius: 22px;
  color: var(--accent) !important;
  letter-spacing: 0.08em !important;
  display: inline-block;
  margin-top: 12px;
}

:root[data-theme="alien"] .nav-overlay-links a {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ─── THEME PICKER ─── */
.theme-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-label {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text-3);
  margin-right: 4px;
  letter-spacing: 0.08em;
}

.theme-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: none;
  transition:
    transform 0.2s,
    border-color 0.2s;
  background: none;
  padding: 0;
}
.theme-btn:hover {
  transform: scale(1.25);
}
.theme-btn.active {
  border-color: var(--text-1);
}
.theme-btn[data-t="dark"] {
  background: #1a1a1a;
  box-shadow: inset 0 0 0 3px #0af5e7;
}
.theme-btn[data-t="light"] {
  background: #f5f2ed;
  box-shadow: inset 0 0 0 3px #007a72;
}
.theme-btn[data-t="alien"] {
  background: #041208;
  box-shadow: inset 0 0 0 3px #0af596;
}

/* ─── SECTION BASE ─── */
section {
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 60px 80px 40px;
}

.section-num {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-family: "DM Serif Display", serif;
  font-size: clamp(32px, 4vw, 48px);
  color: var(--text-1);
  letter-spacing: -0.02em;
}
.section-title em {
  color: var(--accent);
  font-style: italic;
}

.section-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
  cursor: none;
}
.section-link:hover {
  gap: 10px;
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 100px 80px 60px;
  position: relative;
  border-bottom: 1px solid var(--border);
  gap: 60px;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-bg-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  pointer-events: none;
  transform: translateX(-20%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: "DM Serif Display", serif;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1;
  color: var(--text-1);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 460px;
  margin-bottom: 32px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.tag {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  padding: 4px 12px;
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  color: var(--text-2);
  letter-spacing: 0.06em;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tag.accent {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-cta {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* ─── BUTTONS ─── */
.btn-primary {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 28px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition:
    opacity 0.2s,
    transform 0.2s;
  cursor: none;
  display: inline-block;
}
.btn-primary:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

:root[data-theme="light"] .btn-primary {
  color: #f7f4ec;
}
:root[data-theme="light"] .filter-btn.active {
  color: #f7f4ec;
}

.btn-ghost {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    color 0.2s,
    gap 0.2s;
  cursor: none;
}
.btn-ghost:hover {
  color: var(--text-1);
  gap: 10px;
}

/* ─── HERO AVATAR ─── */
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-mid);
  align-self: stretch; /* stretch to match text block height */
  max-height: 100%;
}

/* Corner sweep animation instead of full rotation */
.avatar-frame::before,
.avatar-frame::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: var(--accent);
  border-style: solid;
  z-index: 3;
  pointer-events: none;
}
.avatar-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
  animation: corner-sweep 3s ease-in-out infinite alternate;
}
.avatar-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
  animation: corner-sweep 3s ease-in-out infinite alternate-reverse;
}
@keyframes corner-sweep {
  0% {
    opacity: 0.3;
    width: 24px;
    height: 24px;
  }
  50% {
    opacity: 1;
    width: 48px;
    height: 48px;
  }
  100% {
    opacity: 0.3;
    width: 24px;
    height: 24px;
  }
}

.avatar-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.5s ease;
  border-radius: 3px;
}

.avatar-frame .avatar-default {
  opacity: 1;
}
.avatar-frame .avatar-surprised {
  opacity: 0;
}
.avatar-frame.surprised .avatar-default {
  opacity: 0;
}
.avatar-frame.surprised .avatar-surprised {
  opacity: 1;
}

/* Glow on surprised state */
.avatar-frame.surprised {
  box-shadow: 0 0 32px var(--glow-strong);
  border-color: var(--accent);
}

.avatar-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  bottom: 16px;
  right: 16px;
  box-shadow: 0 0 12px var(--accent);
  z-index: 4;
  animation: pip-pulse 2s ease-in-out infinite;
}

/* ─── BASEBALL CARD ─── */
.baseball-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.18),
    0 16px 48px rgba(0,0,0,0.22);
}
.baseball-card .avatar-frame {
  max-width: none;
  max-height: none;
  align-self: auto;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border-mid);
}
.card-footer {
  padding: 16px 20px 18px;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.card-name {
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.card-pos {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* ─── HOBBY GRID ─────────────────────────────────
   True grid expansion on hover. The hovered cell
   grows by pushing the dividing line outward —
   achieved by transitioning grid-template-columns
   and grid-template-rows on the parent when a
   child is hovered. Contents scale with the cell.
   Glow shadow reinforces the outward push.
   ─────────────────────────────────────────────── */
.hobby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  transition:
    grid-template-columns 0.4s ease,
    grid-template-rows 0.4s ease;
}

/* Left column hovered — push divider right */
.hobby-grid:has(.hobby-cell:nth-child(odd):hover) {
  grid-template-columns: 1.18fr 0.82fr;
}

/* Right column hovered — push divider left */
.hobby-grid:has(.hobby-cell:nth-child(even):hover) {
  grid-template-columns: 0.82fr 1.18fr;
}

/* Top row hovered — push divider down */
.hobby-grid:has(.hobby-cell:nth-child(-n + 2):hover) {
  grid-template-rows: 1.18fr 0.82fr;
}

/* Bottom row hovered — push divider up */
.hobby-grid:has(.hobby-cell:nth-child(n + 3):hover) {
  grid-template-rows: 0.82fr 1.18fr;
}

.hobby-cell {
  padding: 48px 80px;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease,
    padding 0.4s ease;

  /* Only vertical divider between columns — no horizontal line between rows */
  border-right: 1px solid var(--border);
  border-bottom: none;
}

/* Remove right border from right-column cells */
.hobby-cell:nth-child(even) {
  border-right: none;
}

/* Hovered cell: background lifts, glow pushes
   outward from the dividing lines, padding grows
   to breathe with the expanding cell */
.hobby-cell:hover {
  background: var(--bg-2);
  box-shadow:
    0 0 0 1px var(--border-glow),
    0 0 40px 8px var(--glow-strong);
  padding: 56px 92px;
  z-index: 1;
}

/* Arrow reveal */
.hobby-cell::after {
  content: "↗";
  position: absolute;
  top: 40px;
  right: 40px;
  font-size: 18px;
  color: var(--accent);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.hobby-cell:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.hobby-icon {
  color: var(--text-3);
  margin-bottom: 20px;
  transition: color 0.3s ease, transform 0.3s ease;
}
.hobby-cell:hover .hobby-icon {
  color: var(--accent);
  transform: scale(1.08);
}

.hobby-label {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
  transition:
    font-size 0.4s ease,
    letter-spacing 0.4s ease;
}

.hobby-title {
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  transition:
    color 0.4s ease,
    font-size 0.4s ease;
}
.hobby-cell:hover .hobby-title {
  color: var(--accent);
  font-size: 34px;
}

.hobby-cell:hover .hobby-label {
  font-size: 11px;
  letter-spacing: 0.18em;
}

.hobby-cell:hover .hobby-desc {
  font-size: 14px;
}

.hobby-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 300px;
  transition: font-size 0.4s ease;
}

.hobby-preview {
  margin-top: 28px;
  height: 80px;
  background: var(--bg-3);
  border-radius: 4px;
  border: 1px dashed var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  transition: border-color 0.3s;
}
.hobby-cell:hover .hobby-preview {
  border-color: var(--accent);
  border-style: solid;
}

/* ─── HOBBY PREVIEW CONTENT ─── */
.hp-strip {
  display: flex;
  gap: 3px;
  width: 100%;
  align-self: stretch;
}
.hp-strip img {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.5) brightness(0.85);
  transition: filter 0.4s ease;
}
.hobby-cell:hover .hp-strip img {
  filter: grayscale(0) brightness(1);
}
.hp-ticker {
  width: 100%;
  overflow: hidden;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.hp-ticker-inner {
  display: flex;
  white-space: nowrap;
  animation: hp-scroll 16s linear infinite;
}
.hp-ticker-inner span {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  padding-right: 48px;
  transition: color 0.3s;
}
.hobby-cell:hover .hp-ticker-inner span {
  color: var(--text-2);
}
@keyframes hp-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.hp-stats {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 12px;
  overflow: hidden;
}
.hp-stats span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  padding: 4px 10px;
  white-space: nowrap;
  transition: border-color 0.3s, color 0.3s;
}
.hobby-cell:hover .hp-stats span {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── PROJECTS ─── */
.projects-list {
  padding: 0 80px 60px;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition:
    padding-left 0.3s ease,
    border-color 0.3s;
  cursor: none;
}
.project-row:last-child {
  border-bottom: none;
}
.project-row:hover {
  padding-left: 14px;
  border-bottom-color: var(--border-mid);
}

.project-row.featured {
  background: linear-gradient(180deg, rgba(10,245,231,0.08) 0%, transparent 100%);
  box-shadow: 0 20px 50px rgba(0,0,0,0.14);
  border-color: rgba(10,245,231,0.16);
  padding: 28px 0 !important;
}
.project-row.featured:hover {
  background: linear-gradient(180deg, rgba(10,245,231,0.14) 0%, rgba(10,245,231,0.04) 100%);
  box-shadow: 0 20px 60px rgba(10,245,231,0.18), inset 0 1px 0 rgba(10,245,231,0.1);
}
.project-row.featured .project-title {
  color: var(--accent);
}
.project-row.featured .project-tag {
  border-color: rgba(10,245,231,0.18);
}
.project-row.featured .project-arrow {
  color: var(--accent);
}
.featured-preview {
  margin-top: 18px;
  width: min(320px, 100%);
  border: 1px solid rgba(10,245,231,0.12);
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(10,245,231,0.12), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  transition: all 0.4s ease;
}
.project-row.featured:hover .featured-preview {
  border-color: rgba(10,245,231,0.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 32px rgba(10,245,231,0.18);
}
.preview-screen {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}
.preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.preview-top span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.preview-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10,245,231,0.08);
  color: var(--accent);
  transition: background 0.3s ease;
}
.project-row.featured:hover .preview-badge {
  background: rgba(10,245,231,0.16);
}
.preview-body {
  position: relative;
  min-height: 72px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 14px;
  overflow: hidden;
  transition: background 0.3s ease;
}
.project-row.featured:hover .preview-body {
  background: rgba(10,245,231,0.06);
}
.preview-line {
  position: absolute;
  inset: 18px 16px auto 16px;
  height: 2px;
  background: rgba(10,245,231,0.3);
  animation: slide-light 3s linear infinite;
}
.project-row.featured:hover .preview-line {
  animation: slide-light 1.4s linear infinite;
  background: rgba(10,245,231,0.6);
}
.preview-status {
  position: absolute;
  bottom: 14px;
  left: 16px;
  display: flex;
  gap: 10px;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 12px rgba(10,245,231,0.06);
  transition: all 0.3s ease;
}
.project-row.featured:hover .status-dot {
  background: rgba(10,245,231,0.24);
}
.status-dot.active {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(10,245,231,0.6);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.project-row.featured:hover .status-dot.active {
  box-shadow: 0 0 24px rgba(10,245,231,0.8);
  animation: pulse-dot 0.9s ease-in-out infinite;
}
@keyframes slide-light {
  0% { transform: translateX(-100%); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.project-left {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.project-num {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  color: var(--text-3);
  min-width: 24px;
}

.project-title {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  color: var(--text-1);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.project-row:hover .project-title {
  color: var(--accent);
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tag {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  padding: 3px 10px;
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.project-arrow {
  font-size: 20px;
  color: var(--text-3);
  transition:
    color 0.2s,
    transform 0.2s;
  flex-shrink: 0;
}
.project-row:hover .project-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* ─── ABOUT ─── */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.about-text {
  padding: 80px;
  border-right: 1px solid var(--border);
}

.about-text p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 20px;
  max-width: 480px;
}
.about-text p strong {
  color: var(--text-1);
  font-weight: 500;
}

.about-visual {
  padding: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.stat-row:last-child {
  border-bottom: none;
}

.stat-num {
  font-family: "DM Serif Display", serif;
  font-size: 40px;
  color: var(--accent);
  letter-spacing: -0.02em;
  min-width: 90px;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ─── GLITCH EFFECT ─── */
.glitch {
  position: relative;
}
.glitch:hover::before,
.glitch:hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.glitch:hover::before {
  color: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translateX(-3px);
  animation: glitch-1 0.28s steps(1) infinite;
}
.glitch:hover::after {
  color: var(--accent-2);
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translateX(3px);
  animation: glitch-2 0.28s steps(1) infinite;
}
@keyframes glitch-1 {
  0% {
    transform: translateX(-3px) skewX(-1deg);
  }
  33% {
    transform: translateX(2px) skewX(1deg);
  }
  66% {
    transform: translateX(-1px) skewX(0deg);
  }
  100% {
    transform: translateX(-3px) skewX(-1deg);
  }
}
@keyframes glitch-2 {
  0% {
    transform: translateX(3px) skewX(1deg);
  }
  33% {
    transform: translateX(-2px) skewX(-1deg);
  }
  66% {
    transform: translateX(1px) skewX(0deg);
  }
  100% {
    transform: translateX(3px) skewX(1deg);
  }
}

/* ─── SCROLL FADE ─── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── XENOMORPH ─── */
#xenomorph {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 150px;
  height: 67px;
  background: url("../images/Xenomorph/xeno_sprite_sheet.png") no-repeat;
  background-size: 1500px 67px;
  background-position: 0 0;
  pointer-events: none;
  z-index: 50;
  transition: left 0.08s linear;
  filter: drop-shadow(0 0 8px var(--accent));
}

@keyframes xeno-run {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -1500px 0;
  }
}
#xenomorph.running {
  animation: xeno-run 0.8s steps(10) infinite;
}

/* ─── CANTO WORKFLOW BUDDY PAGE ─── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  position: relative;
  z-index: 10;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-top: 12px;
  position: relative;
  z-index: 11;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, gap 0.2s ease;
  white-space: nowrap;
}
.back-link:hover {
  color: var(--accent);
  gap: 14px;
}
.back-link img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.back-link:hover img {
  opacity: 1;
}
.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.page-links a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.page-links a:hover {
  color: var(--accent);
}
.canto-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
  padding: 40px 0;
}
.canto-copy h1 {
  font-size: clamp(42px, 5vw, 64px);
  margin-bottom: 18px;
  line-height: 1.02;
}
.canto-copy h1 span {
  display: inline-block;
  margin-left: 10px;
  font-size: 0.8em;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 700;
}
.canto-copy p {
  max-width: 680px;
  margin-bottom: 24px;
  color: var(--text-2);
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-tags .tag {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--bg-2);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.status-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.14);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.panel-header strong {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.status-badge {
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 245, 231, 0.08);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-badge.status-running {
  background: rgba(0, 120, 230, 0.14);
  color: #7fd6ff;
}
.status-badge.status-success {
  background: rgba(102, 255, 150, 0.16);
  color: #b7ffce;
}
.status-badge.status-failure {
  background: rgba(255, 83, 92, 0.14);
  color: #ff8f9e;
}
.panel-body {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.status-state {
  font-size: clamp(36px, 4vw, 46px);
  font-weight: 700;
  color: var(--text-1);
}
.status-hint {
  color: var(--text-2);
  line-height: 1.8;
}
.status-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.btn-outline {
  color: var(--text-1);
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover,
.btn-outline.active {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--accent);
}
.presentation-section {
  padding-top: 40px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.presentation-section .section-header {
  margin-bottom: 20px;
}
.presentation-section h2 {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 8px;
}
.presentation-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.presentation-tab {
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.presentation-tab.active,
.presentation-tab:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.presentation-panels {
  display: grid;
  gap: 20px;
}
.presentation-panel {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
}
.presentation-panel.active {
  display: block;
}
.presentation-panel h3 {
  margin-bottom: 16px;
  font-size: 20px;
  color: var(--text-1);
}
.presentation-panel p,
.presentation-panel ul {
  color: var(--text-2);
}
.presentation-panel ul {
  margin-top: 16px;
  padding-left: 20px;
}
.presentation-panel ul li {
  margin-bottom: 10px;
}
@media (max-width: 980px) {
  .canto-hero {
    grid-template-columns: 1fr;
  }
  .status-controls {
    grid-template-columns: 1fr;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── BUDDY SHOWCASE ─── */
.buddy-showcase {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.showcase-header {
  margin-bottom: 28px;
}
.showcase-header p {
  color: var(--text-2);
  font-size: 15px;
  margin-top: 6px;
}
.showcase-canvas-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
#biggie-frame {
  display: block;
  width: 100%;
  height: 480px;
  border: none;
}
.mini-biggie-wrap {
  width: 110px;
  height: 110px;
  overflow: hidden;
  margin: 0 auto 16px;
  border-radius: 8px;
}
#biggie-frame-mini {
  width: 330px;
  height: 330px;
  border: none;
  transform: scale(0.333);
  transform-origin: top left;
  pointer-events: none;
}
.showcase-state-strip {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 16px;
}
.showcase-dot {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 0.3s ease;
  cursor: default;
  font-weight: 500;
}
.showcase-dot.active {
  color: var(--accent);
}

/* ─── FOOTER ─── */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 80px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.footer-left {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.xeno-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pip-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pip-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 6px var(--accent);
  }
  50% {
    opacity: 0.2;
    box-shadow: none;
  }
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  cursor: none;
}
.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}


/* ─── ALIEN THEME TYPOGRAPHY ─── */
:root[data-theme="alien"] body,
:root[data-theme="alien"] p,
:root[data-theme="alien"] a,
:root[data-theme="alien"] span,
:root[data-theme="alien"] button {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:root[data-theme="alien"] h1,
:root[data-theme="alien"] h2,
:root[data-theme="alien"] h3,
:root[data-theme="alien"] h4 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-style: normal;
}

:root[data-theme="alien"] .section-num,
:root[data-theme="alien"] .hobby-label,
:root[data-theme="alien"] .project-num,
:root[data-theme="alien"] .project-tag,
:root[data-theme="alien"] .tag,
:root[data-theme="alien"] .nav-links a,
:root[data-theme="alien"] .theme-label,
:root[data-theme="alien"] .footer-copy,
:root[data-theme="alien"] .footer-left {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ─── MOBILE ─── */
@media (max-width: 900px) {
  nav {
    padding: 0 20px;
  }
  .nav-links {
  display: none;
}
.nav-burger {
  display: flex;
}
.theme-picker .theme-label {
  display: none;
}
  .hero {
    grid-template-columns: 1fr;
    padding: 80px 24px 56px;
    gap: 40px;
    align-items: start;
    min-height: unset;
  }
  .hero-visual {
    display: flex;
    justify-content: center;
  }
  .baseball-card {
    max-width: 260px;
  }

  .section-header {
    padding: 40px 24px 24px;
    flex-direction: column;
    gap: 12px;
  }

  .hobby-grid {
    grid-template-columns: 1fr;
  }
  .hobby-cell {
    padding: 36px 24px;
    border-right: none;
  }
  .hobby-cell:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
  .hobby-cell:last-child {
    border-bottom: none;
  }
  .hobby-grid:has(.hobby-cell:hover) {
    grid-template-columns: 1fr;
    grid-template-rows: unset;
  }
  .hobby-cell:hover {
    padding: 36px 24px;
    box-shadow: none;
  }

  .projects-list {
    padding: 0 24px 40px;
  }
  .project-title {
    font-size: 18px;
  }

  .about-strip {
    grid-template-columns: 1fr;
  }
  .about-text {
    padding: 40px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .about-visual {
    padding: 40px 24px;
  }

  footer {
    padding: 24px;
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 40px;
  }
  .section-title {
    font-size: 28px;
  }
  .hobby-title {
    font-size: 22px;
  }
  .stat-num {
    font-size: 32px;
  }
}

/* ─── LARGE SCREEN (1440px+) ─── */
@media (min-width: 1440px) {
  nav {
    padding: 0 80px;
  }

  .hero {
    padding: 120px 120px 80px;
    gap: 80px;
    max-width: 1800px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: clamp(80px, 6vw, 110px);
    line-height: 0.95;
  }

  .hero-subtitle {
    font-size: 18px;
    max-width: 560px;
  }

  .avatar-frame {
    max-width: 480px;
  }

  .hero-visual {
    align-items: center;
  }

  .section-header {
    padding: 80px 120px 56px;
  }
  .section-title {
    font-size: clamp(48px, 4vw, 64px);
  }

  .hobby-cell {
    padding: 56px 120px;
  }
  .hobby-title {
    font-size: 34px;
  }
  .hobby-desc {
    font-size: 15px;
    max-width: 360px;
  }

  .projects-list {
    padding: 0 120px 80px;
  }
  .project-title {
    font-size: 28px;
  }

  .about-text {
    padding: 100px 120px;
  }
  .about-visual {
    padding: 100px 120px;
  }
  .stat-num {
    font-size: 52px;
  }
  .stat-label {
    font-size: 15px;
  }

  footer {
    padding: 40px 120px;
  }
}

/* ─── EXTRA LARGE (1920px+) ─── */
@media (min-width: 1920px) {
  .hero {
    padding: 140px 160px 100px;
  }
  .hero-title {
    font-size: clamp(100px, 6vw, 130px);
  }
  .section-header {
    padding: 100px 160px 64px;
  }
  .hobby-cell {
    padding: 64px 160px;
  }
  .projects-list {
    padding: 0 160px 100px;
  }
  .about-text {
    padding: 120px 160px;
  }
  .about-visual {
    padding: 120px 160px;
  }
  footer {
    padding: 48px 160px;
  }
}
