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

:root {
  --clr-bg: #0d0d0d;
  --clr-bg-2: #141414;
  --clr-surface: #1a1a1a;
  --clr-border: #ffffff;
  --clr-accent: #FFE500;
  --clr-accent-2: #950606;
  --clr-accent-3: #00FFAB;
  --clr-text: #f0f0f0;
  --clr-text-dim: #888888;
  --shadow-brutal: 5px 5px 0px #ffffff;
  --shadow-brutal-accent: 5px 5px 0px var(--clr-accent);
  --shadow-brutal-red: 5px 5px 0px var(--clr-accent-2);
  --border-thick: 3px solid #ffffff;
  --border-thin: 1px solid #333333;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Darker Grotesque', sans-serif;
  --font-mono: 'Courier Prime', monospace;
  --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-accent) var(--clr-bg);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-accent);
}

::selection {
  background: var(--clr-accent);
  color: #000000;
}

body {
  background-color: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Noise Texture Overlay ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ─── Typography ─────────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  width: fit-content;
}

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

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

/* ─── Utility: Brutal Tag ─────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border: 2px solid var(--clr-border);
  color: var(--clr-border);
  background: transparent;
}

.tag--accent {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.tag--filled {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
}

/* ─── Btn ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border: var(--border-thick);
  background: transparent;
  color: var(--clr-text);
  cursor: pointer;
  box-shadow: var(--shadow-brutal);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  white-space: nowrap;
}

.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px #ffffff;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #ffffff;
}

.btn--primary {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
  box-shadow: var(--shadow-brutal-accent);
}

.btn--primary:hover {
  box-shadow: 8px 8px 0px var(--clr-accent);
}

.btn--primary:active {
  box-shadow: 2px 2px 0px var(--clr-accent);
}

/* ─── Section Label ─────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: var(--clr-accent);
}

/* ─── NAV ─────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.4rem;
  height: 52px;
  border: var(--border-thick);
  background: var(--clr-bg);
  box-shadow: 4px 4px 0px var(--clr-accent);
  transition: box-shadow 0.3s;
}

#navbar:hover {
  box-shadow: 6px 6px 0px var(--clr-accent);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--clr-text);
  transition: color var(--transition);
}

.nav-logo span {
  color: var(--clr-accent);
}

.nav-logo:hover {
  color: var(--clr-accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: stretch;
  height: 100%;
}

.nav-links li {
  display: flex;
  align-items: center;
  border-left: 2px solid #222;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-text-dim);
  transition: background var(--transition), color var(--transition);
  padding: 0 1.4rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-links a:hover {
  background: #1a1a1a;
  color: var(--clr-text);
}

.nav-links a.active {
  background: var(--clr-accent);
  color: #000;
}

/* Remove old underline pseudo-element */
.nav-links a::after {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  border-left: 2px solid #222;
}

.nav-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--clr-text-dim);
  letter-spacing: 0.1em;
  padding: 0 1rem;
  border-right: 2px solid #222;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-available {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--clr-accent);
  color: #000;
  padding: 0 1.2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: filter var(--transition);
}

.nav-available:hover {
  filter: brightness(1.1);
}

.nav-available .nav-avail-dot {
  width: 7px;
  height: 7px;
  background: #000;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--clr-text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Drawer */
.nav-mobile {
  display: none;
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  background: var(--clr-bg);
  border: var(--border-thick);
  box-shadow: 6px 6px 0px var(--clr-accent);
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 99;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--clr-text);
  transition: color var(--transition);
}

.nav-mobile a:hover {
  color: var(--clr-accent);
}

/* ─── HERO ────────────────────────────────────────────────────────── */
#hero {
  height: 100dvh;
  /* lock to viewport — marquee stays below fold */
  padding: 80px max(2rem, 5vw) 0;
  display: grid;
  grid-template-rows: 1fr auto;
  position: relative;
  overflow: hidden;
}

/* ── Scribble decorations ── */
.hero-scribbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.scribble {
  position: absolute;
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  will-change: transform;
}

/* Bottom-left 5-pt star outline — yellow */
.scribble--star-l {
  bottom: 22%;
  left: 2.5%;
  width: 38px;
  height: 38px;
  color: var(--clr-accent);
  opacity: 0.45;
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(-12deg);
}

/* Mid-right circle — dim */
.scribble--circle {
  top: 42%;
  right: 4%;
  width: 32px;
  height: 32px;
  color: var(--clr-text-dim);
  opacity: 0.3;
}

/* Left-side diagonal slash — red accent */
.scribble--slash {
  top: 36%;
  left: 1%;
  width: 36px;
  height: 12px;
  color: var(--clr-accent-2);
  opacity: 0.55;
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(-5deg);
}

/* Top-right 4-pointed sparkle — green */
.scribble--sparkle {
  top: 8%;
  right: 28%;
  width: 18px;
  height: 18px;
  color: var(--clr-accent-3);
  opacity: 0.5;
}

/* Small square dot — white-dim */
.scribble--square {
  top: 18%;
  left: 48%;
  width: 10px;
  height: 10px;
  color: var(--clr-text-dim);
  opacity: 0.25;
}

/* Lower-right ring — yellow */
.scribble--ring {
  bottom: 15%;
  right: 2.5%;
  width: 26px;
  height: 26px;
  color: var(--clr-accent);
  opacity: 0.3;
}

/* Squiggle wave — right column area */
.scribble--wave {
  top: 62%;
  right: 6%;
  width: 60px;
  height: 12px;
  color: var(--clr-text-dim);
  opacity: 0.2;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  /* 1fr = columns, auto = stats row */
  align-items: stretch;
  overflow: hidden;
}

/* Left column: vertically centered */
.hero-col--left {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem max(1rem, 2vw) 1.5rem 0;
}

/* Right column: 3D model area (empty), socials pinned to bottom */
.hero-col--right {
  grid-row: 1;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 0px solid #222;
  padding: 2rem 0 1.5rem 3rem;
  overflow: hidden;
}

#hero-3d-model {
  width: 100%;
  max-width: 100%;
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

#hero-3d-model canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  display: block;
  outline: none;
}

/* ── Snail Greeting Popup ── */
.snail-greeting-popup {
  position: absolute;
  top: 18%;
  left: 8%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--clr-bg);
  border: 2px solid var(--clr-accent);
  box-shadow: 4px 4px 0px var(--clr-accent-2);
  padding: 8px 14px 8px 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.snail-greeting-popup.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* tail triangle — red to match shadow */
.snail-greeting-popup::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 22px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 9px solid var(--clr-accent);
}

/* Waving emoji icon */
.greeting-wave {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.greeting-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.greeting-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  white-space: nowrap;
}

/* Tired state overrides */
.snail-greeting-popup.is-tired .greeting-label {
  color: var(--clr-accent);
  font-size: 0.6rem;
}

.greeting-count {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--clr-accent);
}

/* Simple flash on increment */
@keyframes countFlash {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.greeting-count.bump {
  animation: countFlash 0.25s ease forwards;
}

/* Tired message — show in label, hide numeric count */
.snail-greeting-popup.is-tired .greeting-count {
  display: none;
}

/* ── Snail XP Floater ── */
.snail-xp-floater {
  position: absolute;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--clr-accent);
  font-weight: 700;
  z-index: 5;
  /* Add a thick outline so it's readable over the 3D model */
  text-shadow:
    -2px -2px 0 var(--clr-bg),
    2px -2px 0 var(--clr-bg),
    -2px 2px 0 var(--clr-bg),
    2px 2px 0 var(--clr-bg),
    0px 3px 0 var(--clr-bg);
  animation: floatUpXp 1.5s ease-out forwards;
}

@keyframes floatUpXp {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }

  15% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 20px)) scale(1.1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 80px)) scale(1);
  }
}

/* ─── Projects Stack ─────────────────────────────────────────────── */

.projects-section {
  padding: 6rem 0 0;
  position: relative;
}

.projects-section-header {
  padding: 0 clamp(1.5rem, 5vw, 5rem);
  margin-bottom: 3rem;
}

/* Sticky floating progress counter */
.projects-progress {
  position: sticky;
  top: 90px;
  z-index: 40;
  float: right;
  margin-right: clamp(1.5rem, 5vw, 5rem);
  margin-bottom: -3rem;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--clr-bg);
  border: 2px solid var(--clr-border);
  padding: 4px 12px;
  box-shadow: 3px 3px 0 var(--clr-border);
  pointer-events: none;
  user-select: none;
}

.progress-current {
  color: var(--clr-accent);
  font-size: 1rem;
  font-family: var(--font-display);
}

.progress-sep {
  color: var(--clr-text-dim);
  margin: 0 1px;
}

.progress-total {
  color: var(--clr-text-dim);
}

/* Stack container */
.projects-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  clear: both;
}

/* Individual project card */
.pcard {
  position: sticky;
  top: 80px;
  border: var(--border-thick);
  background: var(--clr-bg-2);
  box-shadow: 6px 6px 0px var(--card-accent, var(--clr-border));
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  overflow: hidden;
  margin-bottom: 0;
}

/* Each card gets progressively more z-index so lower ones sit on top */
.pcard:nth-child(1) {
  z-index: 10;
  top: 160px;
  margin-bottom: 80px;
}

.pcard:nth-child(2) {
  z-index: 11;
  top: 170px;
  margin-bottom: 80px;
}

.pcard:nth-child(3) {
  z-index: 12;
  top: 180px;
  margin-bottom: 80px;
}

.pcard:nth-child(4) {
  z-index: 13;
  top: 190px;
  margin-bottom: 80px;
}

.pcard:hover {
  box-shadow: 10px 10px 0px var(--card-accent, var(--clr-border));
}

/* Card header bar */
.pcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: var(--border-thin);
  background: var(--clr-surface);
  gap: 1rem;
}

.pcard-num {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pcard-num-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  background: var(--clr-accent);
  border: 2px solid var(--clr-accent);
  color: #000;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding: 0 8px;
  flex-shrink: 0;
}

.pcard-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.04em;
  color: var(--clr-text);
  line-height: 1;
  width: auto;
}

.pcard-tagline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Card body: left desc + right frame */
.pcard-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
}

.pcard-left {
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.4rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  border-right: var(--border-thin);
}

.pcard-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--clr-text-dim);
  line-height: 1.7;
}

/* Tech tag pills inside the card */
.pcard-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ptag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 2px solid var(--clr-border);
  color: var(--clr-text-dim);
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}

.ptag--hl {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.pcard:hover .ptag--hl {
  background: rgba(255, 229, 0, 0.08);
}

/* Action buttons */
.pcard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.pcard-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 20px;
  border: 2px solid var(--clr-border);
  color: var(--clr-text);
  background: transparent;
  box-shadow: 3px 3px 0px var(--clr-border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.pcard-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--clr-border);
}

.pcard-btn--primary {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
  box-shadow: var(--shadow-brutal-accent);
}

.pcard-btn--primary:hover {
  box-shadow: 8px 8px 0px var(--clr-accent);
}

/* Right side: browser-frame mockup */
.pcard-right {
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard-frame {
  width: 100%;
  max-width: 480px;
  border: 2px solid #2a2a2a;
  overflow: hidden;
  box-shadow: 4px 4px 0px var(--clr-accent);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pcard:hover .pcard-frame {
  box-shadow: 8px 8px 0px var(--clr-accent);
  transform: translate(-2px, -2px);
}

/* Browser chrome row */
.pcard-frame-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #1a1a1a;
  border-bottom: 1.5px solid #2a2a2a;
}

.pframe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pframe-url {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #555;
  letter-spacing: 0.05em;
  margin-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The project image/illustration area */
.pcard-frame-content {
  background: #111;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard-frame-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.pcard:hover .pcard-frame-content img {
  transform: scale(1.03);
}

.pcard-frame-content--svg {
  aspect-ratio: 480 / 280;
}

/* ── Card 04: Angled Neo-Brutalist Construction Tape Strip (No Words) ── */
#pcard-4 .pcard-left {
  position: relative;
  overflow: hidden;
}

.brutal-tape-overlay-strip {
  position: relative;
  width: calc(100% + 3.5rem);
  margin-left: -1.75rem;
  height: 38px;
  background: repeating-linear-gradient(-45deg,
      var(--clr-accent) 0,
      var(--clr-accent) 18px,
      #000000 18px,
      #000000 36px);
  border-top: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  box-shadow: 0 6px 0px rgba(0, 0, 0, 0.9), 4px 4px 0px var(--clr-accent);
  transform: rotate(-3deg) scale(1.04);
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#pcard-4:hover .brutal-tape-overlay-strip {
  transform: rotate(-1.5deg) scale(1.06);
}

/* Frame Canvas Neo-Brutalist adjustments */
.brutal-pcard-frame {
  box-shadow: 6px 6px 0px var(--clr-accent) !important;
  border: 2.5px solid #ffffff !important;
}

.brutal-frame-canvas {
  background: #111111;
  overflow: hidden;
  position: relative;
}

.brutal-crane-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mechanical Swing Animation for the Crane Suspended Block */
.crane-cable-rig {
  transform-origin: 240px 0px;
  animation: craneCableSway 4s ease-in-out infinite alternate;
}

@keyframes craneCableSway {
  0% {
    transform: rotate(-3.5deg);
  }

  100% {
    transform: rotate(3.5deg);
  }
}

.brutal-swing-module {
  transform-origin: 240px 135px;
  animation: brutalModuleCounterSway 4s ease-in-out infinite alternate;
}

@keyframes brutalModuleCounterSway {
  0% {
    transform: rotate(1.5deg);
  }

  100% {
    transform: rotate(-1.5deg);
  }
}

/* Interactive hover on the card tilts the crane slightly */
.pcard:hover .crane-cable-rig {
  animation-duration: 2.2s;
}

/* ── Responsive: collapse 2-col to 1-col on small screens ── */
@media (max-width: 768px) {
  .pcard-body {
    grid-template-columns: 1fr;
  }

  .snail-greeting-popup {
    position: absolute;
    top: 2%;
    left: 3%;
  }

  .pcard-left {
    border-right: none;
    border-bottom: 2px solid #222;
  }

  .pcard-header {
    flex-wrap: wrap;
  }

  .pcard-tagline {
    display: none;
  }

  .pcard:nth-child(1),
  .pcard:nth-child(2),
  .pcard:nth-child(3),
  .pcard:nth-child(4) {
    position: relative;
    top: 0;
    margin-bottom: 2rem;
  }

  .projects-progress {
    display: none;
  }
}

/* ── Status pill (replaces eyebrow) ── */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--clr-text);
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-text);
  margin-bottom: 1.8rem;
  width: fit-content;
  box-shadow: 3px 3px 0px var(--clr-text);
}

.hero-dot {
  width: 8px;
  height: 8px;
  background: var(--clr-accent-3);
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }
}

/* ── Name ── */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9.5vw, 11rem);
  /* scaled to fit left col + 100dvh constraint */
  line-height: 0.85;
  color: var(--clr-text);
  position: relative;
  margin-bottom: 0.45em;
  letter-spacing: -0.01em;
  /* 3D extrusion: red neo-brutalist shadow layers cascade bottom-right */
  text-shadow:
    2px 2px 0 var(--clr-accent-2),
    4px 4px 0 var(--clr-accent-2),
    6px 6px 0 var(--clr-accent-2);
}

/* Second line: yellow solid fill + thick dark stroke + red 3D shadow */
.hero-name .stroke-text {
  -webkit-text-stroke: 5px #000;
  color: var(--clr-accent);
  display: block;
  paint-order: stroke fill;
  text-shadow:
    2px 2px 0 var(--clr-accent-2),
    4px 4px 0 var(--clr-accent-2),
    6px 6px 0 var(--clr-accent-2);
}

/* ── Desc with inline keyword marks ── */
.hero-desc {
  max-width: 52ch;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.5;
  margin-bottom: 0;
  /* no bottom margin — we're in left col with no socials below */
}

.hero-mark {
  display: inline;
  background: var(--clr-accent);
  color: #000;
  font-weight: 800;
  padding: 1px 7px;
  /* keep on one line */
  white-space: nowrap;
}

.hero-mark--outline {
  display: inline;
  background: transparent;
  color: var(--clr-text);
  font-weight: 800;
  border: 2px solid var(--clr-text);
  padding: 1px 7px;
  white-space: nowrap;
}

/* ── Social buttons (right column of hero) ── */
.hero-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  /* no bottom margin — right col pushes these to bottom via flex-end */
}

.hero-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text);
  border: 2px solid var(--clr-text);
  padding: 9px 18px;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 3px 3px 0px var(--clr-text);
}

.hero-social-btn:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
  box-shadow: 3px 3px 0px #000;
  transform: translate(-2px, -2px);
}

.hero-social-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--clr-text);
}

/* Stats row — spans full width as bottom row in the 2-col grid */
.hero-stats {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--border-thick);
  box-shadow: 5px 5px 0px var(--clr-text);
}

.hero-stat-card {
  padding: 1rem 1.4rem;
  border-right: var(--border-thick);
  transition: background var(--transition);
}

.hero-stat-card:last-child {
  border-right: none;
}

.hero-stat-card:hover {
  background: var(--clr-surface);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--clr-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--clr-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Floating "HIRE ME" pill ── */
.hero-hire-pill {
  position: absolute;
  top: 100px;
  right: max(2rem, 5vw);
  background: var(--clr-accent);
  color: #000;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  padding: 12px 22px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  animation: floatCard 5s ease-in-out infinite;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-hire-pill:hover {
  transform: translateY(-4px) !important;
  box-shadow: 6px 6px 0px #000;
}

@keyframes floatCard {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Decorative grid lines */
.hero-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.hero-grid-lines::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: repeating-linear-gradient(90deg,
      transparent,
      transparent 39px,
      rgba(255, 229, 0, 0.04) 39px,
      rgba(255, 229, 0, 0.04) 40px);
}

.hero-scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.5rem 0;
  color: var(--clr-text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 60px;
  height: 1px;
  background: var(--clr-text-dim);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--clr-accent);
  will-change: transform;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ─── MARQUEE STRIP ──────────────────────────────────────────────── */
.marquee-strip {
  background: var(--clr-accent);
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  overflow: hidden;
  padding: 12px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.marquee-item {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #000;
  padding: 0 2rem;
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
}

.marquee-sep {
  font-size: 1.2rem;
  opacity: 0.4;
}

/* ─── SECTION BASE ──────────────────────────────────────────────── */
.section {
  padding: 7rem max(2rem, 5vw);
}

.section+.section {
  border-top: var(--border-thin);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 1;
  color: var(--clr-text);
  margin-bottom: 1rem;
  /* 3D extrusion in red */
  text-shadow:
    2px 2px 0 var(--clr-accent-2),
    4px 4px 0 var(--clr-accent-2);
}

/* ─── PROJECTS ──────────────────────────────────────────────────── */
#projects {
  background: var(--clr-bg-2);
}

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.projects-count {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--clr-accent);
  opacity: 0.18;
  user-select: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.project-card {
  background: var(--clr-bg);
  border: var(--border-thick);
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: default;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--clr-accent);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

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

.project-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-brutal-accent);
}

.project-card:nth-child(2):hover {
  box-shadow: var(--shadow-brutal-red);
}

.project-card:nth-child(2)::after {
  border-color: var(--clr-accent-2);
}

.project-card:nth-child(3):hover {
  box-shadow: 5px 5px 0px var(--clr-accent-3);
}

.project-card:nth-child(3)::after {
  border-color: var(--clr-accent-3);
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--clr-text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}

.project-type {
  margin-bottom: 1rem;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
  color: var(--clr-text);
  margin-bottom: 1rem;
}

.project-desc {
  font-size: 1rem;
  color: var(--clr-text-dim);
  line-height: 1.65;
  margin-bottom: 1.8rem;
  max-width: 55ch;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.8rem;
}

.project-tech .tag {
  font-size: 0.75rem;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid #2a2a2a;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  transition: color var(--transition);
}

.project-link svg {
  transition: transform var(--transition);
}

.project-link:hover {
  color: var(--clr-accent);
}

.project-link:hover svg {
  transform: translate(3px, -3px);
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.project-card.featured .project-badge {
  position: absolute;
  top: 2.2rem;
  right: 2.2rem;
}

/* ─── SKILLS ────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: var(--border-thick);
}

.skill-group {
  padding: 2.2rem;
  border-right: var(--border-thick);
  position: relative;
  transition: background var(--transition);
}

.skill-group:last-child {
  border-right: none;
}

.skill-group:hover {
  background: var(--clr-surface);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.8rem;
}

.skill-group-icon {
  width: 40px;
  height: 40px;
  border: 2px solid var(--clr-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-group-icon svg {
  color: var(--clr-accent);
}

.skill-group-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--clr-text);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  transition: color 0.2s ease;
}

.skill-item:hover .skill-name {
  color: var(--clr-text);
}

.skill-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--clr-text-dim);
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.skill-bar-wrap {
  width: 80px;
  height: 6px;
  background: #1e1e1e;
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.skill-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--clr-accent);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
  transition-delay: calc(var(--bar-i, 0) * 0.04s);
}

/* Bulletproof multi-trigger:
   1. Individual bar marked .in-view
   2. Parent .skills-grid marked .visible (from scroll reveal)
   3. Parent #skills marked .is-visible
   4. Direct URL anchor navigation (#skills:target) */
.skill-bar.in-view,
.skills-grid.visible .skill-bar,
#skills.is-visible .skill-bar,
#skills:target .skill-bar {
  transform: scaleX(var(--skill-scale, 1));
}

.skill-item:hover .skill-bar {
  filter: brightness(1.2);
  box-shadow: 0 0 6px rgba(255, 229, 0, 0.5);
}

/* ─── ABOUT ─────────────────────────────────────────────────────── */
#about {
  background: var(--clr-bg-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 420px;
}

.about-image-container {
  width: 100%;
  height: 100%;
  background: #0d0d0d;
  border: var(--border-thick);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 0px var(--clr-accent);
}

.about-contract-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Static TV scanline / CRT phosphor line effect in full color */
.about-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── Scribble Hand-Drawn Annotations ── */
.scribble-annotation {
  position: absolute;
  z-index: 25;
  pointer-events: none;
  user-select: none;
}

.scribble-text {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #ff2222;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  display: block;
  text-shadow: 0 0 1px rgba(255, 34, 34, 0.4);
}

.scribble-arrow {
  display: block;
}

/* ── Snail "Greet me" Scribble Callout ── */
.snail-greet-scribble {
  position: absolute;
  bottom: 24px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  user-select: none;
  z-index: 10;
  transform: rotate(-3deg);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.snail-scribble-text {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #ff2222;
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1;
  text-shadow: 0 0 1px rgba(255, 34, 34, 0.4);
}

.snail-scribble-arrow {
  width: 38px;
  height: 32px;
  display: block;
  flex-shrink: 0;
  transform: rotate(-5deg);
}

#hero-3d-model:hover .snail-greet-scribble {
  transform: rotate(0deg) scale(1.05);
}

@media (max-width: 768px) {
  .snail-greet-scribble {
    bottom: 8px;
    right: 12px;
  }
}

/* "my swiss knife" scribble placed clearly to the right outside the blades arc */
.scribble-knife {
  bottom: 260px;
  right: -290px;
  transform: rotate(2deg);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.scribble-arrow-knife {
  width: 52px;
  height: 52px;
  margin-top: 4px;
  margin-right: 14px;
}

@media (max-width: 1200px) {
  .scribble-knife {
    right: -190px;
    bottom: 250px;
  }
}

@media (max-width: 900px) {
  .scribble-knife {
    right: -80px;
    bottom: 260px;
  }
}

.about-image-frame {
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 100%;
  height: 100%;
  border: var(--border-thick);
  z-index: -1;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-text {
  font-size: 1.1rem;
  color: var(--clr-text-dim);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.about-text strong {
  color: var(--clr-text);
  font-weight: 700;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: var(--border-thick);
  margin: 2.5rem 0;
}

.about-stat {
  padding: 1.4rem;
  border-right: var(--border-thick);
  text-align: left;
}

.about-stat:last-child {
  border-right: none;
}

.about-stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--clr-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.about-stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--clr-text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── SIDE-SKILLS SWISS KNIFE ───────────────────────────────────── */

/*
  Swiss knife mechanic (Mirrored & De-janked):
  - .side-skills is anchored at the bottom-right corner of .about-image-wrap (the rivet).
  - Each blade is a wide horizontal strip (260px × 52px) with transform-origin: 22px 50%
    (centered around the rivet hole on its left edge).
  - Mirrored geometry: The blades fan OUTSIDE the photo frame into Quadrant I (x > 0, y < 0).
  - Fan resting angles:
      Blade 0 (Video Editing - Red):  -78deg (near vertical along outer right border)
      Blade 1 (Canva - Teal):          -52deg
      Blade 2 (Voice Over - Orange):   -26deg
      Blade 3 (AI 3D - Purple):          0deg (horizontal, pointing right)
  - Zero-jank interaction:
      Hit tracking is handled smoothly via radial sectors in JavaScript, preventing
      the high-frequency hover oscillation bug.
      Active blade pushes outward: translateX(30px) and deepens its shadow.
      Neighboring blades push aside (-10deg / +10deg) to give the active blade full stage.
*/

.side-skills {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 0;
  height: 0;
  z-index: 35;
  overflow: visible;
  transform: scale(1.1);
  transform-origin: 0 0;
}

.side-skills-fan {
  position: relative;
  width: 0;
  height: 0;
}

/* Metallic rivet bolt centered at (0, 0) */
.side-skills-rivet {
  position: absolute;
  width: 22px;
  height: 22px;
  left: -11px;
  top: -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #cbd5e1 50%, #64748b 90%, #334155 100%);
  border: 2.5px solid #000;
  box-shadow: 2px 2px 0 #000;
  z-index: 50;
  pointer-events: none;
}

.side-skills-rivet::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #1e293b;
  border-radius: 50%;
  box-shadow: inset 1px 1px 1px #000;
}

/* Individual Blade */
.sskill-card {
  position: absolute;
  left: -22px;
  top: -26px;
  width: 320px;
  height: 52px;
  border-radius: 26px 8px 8px 26px;
  transform-origin: 22px 50%;
  transform: rotate(var(--rot)) translateX(0);
  background: var(--clr);
  border: 2.5px solid #000;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 16px 0 36px;
  gap: 10px;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease,
    filter 0.2s ease;
  user-select: none;
  touch-action: manipulation;
  overflow: visible;
  outline: none;
}

/* Expanded hit-area buffer to prevent gaps between cards when cursor moves */
.sskill-card::before {
  content: '';
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: -8px;
  right: -8px;
  pointer-events: auto;
  z-index: 1;
}

/* Ensure all child elements do not swallow pointer events so target is always the card */
.sskill-card * {
  pointer-events: none;
}

/* Focus indicator for keyboard users */
.sskill-card:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Pivot hole visual ring */
.sskill-hole {
  position: absolute;
  left: 14px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.3);
}

/* Default z-index stacking: bottom blade highest so handles are accessible */
.sskill-card:nth-child(1) {
  z-index: 1;
}

.sskill-card:nth-child(2) {
  z-index: 2;
}

.sskill-card:nth-child(3) {
  z-index: 3;
}

.sskill-card:nth-child(4) {
  z-index: 4;
}

/* ── Icon ── */
.sskill-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: transform 0.25s ease;
}

.sskill-icon svg {
  width: 20px;
  height: 20px;
}

/* ── Text block ── */
.sskill-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.sskill-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: #000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}

.sskill-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.72);
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

/* ── Active & Pushed States (Zero angular jump = Zero stutter) ── */
.sskill-card.is-active {
  box-shadow: 8px 8px 0 #000 !important;
  z-index: 30 !important;
  filter: brightness(1.05);
}

.sskill-card.is-active .sskill-icon {
  transform: scale(1.18);
}

.sskill-card.is-active .sskill-note {
  color: #000;
  font-weight: 700;
}

/* Card 0 (Video Editing) active: stays at -63deg and slides out 36px, siblings push down */
.side-skills[data-active="0"] .sskill-card:nth-child(1) {
  transform: rotate(-63deg) translateX(36px) scale(1.02) !important;
}

.side-skills[data-active="0"] .sskill-card:nth-child(2) {
  transform: rotate(-34deg) translateX(0);
}

.side-skills[data-active="0"] .sskill-card:nth-child(3) {
  transform: rotate(-14deg) translateX(0);
}

.side-skills[data-active="0"] .sskill-card:nth-child(4) {
  transform: rotate(6deg) translateX(0);
}

/* Card 1 (Canva) active: stays at -42deg and slides out 36px, Card 0 pushes up, Cards 2-3 push down */
.side-skills[data-active="1"] .sskill-card:nth-child(1) {
  transform: rotate(-71deg) translateX(0);
}

.side-skills[data-active="1"] .sskill-card:nth-child(2) {
  transform: rotate(-42deg) translateX(36px) scale(1.02) !important;
}

.side-skills[data-active="1"] .sskill-card:nth-child(3) {
  transform: rotate(-14deg) translateX(0);
}

.side-skills[data-active="1"] .sskill-card:nth-child(4) {
  transform: rotate(6deg) translateX(0);
}

/* Card 2 (Voice Over) active: stays at -21deg and slides out 36px, Cards 0-1 push up, Card 3 pushes down */
.side-skills[data-active="2"] .sskill-card:nth-child(1) {
  transform: rotate(-71deg) translateX(0);
}

.side-skills[data-active="2"] .sskill-card:nth-child(2) {
  transform: rotate(-50deg) translateX(0);
}

.side-skills[data-active="2"] .sskill-card:nth-child(3) {
  transform: rotate(-21deg) translateX(36px) scale(1.02) !important;
}

.side-skills[data-active="2"] .sskill-card:nth-child(4) {
  transform: rotate(7deg) translateX(0);
}

/* Card 3 (AI 3D Modelling) active: stays at 0deg and slides out 36px, Cards 0-2 push up */
.side-skills[data-active="3"] .sskill-card:nth-child(1) {
  transform: rotate(-71deg) translateX(0);
}

.side-skills[data-active="3"] .sskill-card:nth-child(2) {
  transform: rotate(-50deg) translateX(0);
}

.side-skills[data-active="3"] .sskill-card:nth-child(3) {
  transform: rotate(-29deg) translateX(0);
}

.side-skills[data-active="3"] .sskill-card:nth-child(4) {
  transform: rotate(0deg) translateX(36px) scale(1.02) !important;
}

/* If JavaScript is not running, fallback smooth hover */
@media (hover: hover) and (pointer: fine) {
  .side-skills:not([data-js-ready]) .sskill-card:hover {
    transform: rotate(var(--rot)) translateX(26px);
    box-shadow: 6px 6px 0 #000;
    z-index: 25;
  }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sskill-card {
    width: 230px;
    height: 48px;
    padding: 0 14px 0 34px;
  }

  .sskill-name {
    font-size: 0.82rem;
  }

  .sskill-note {
    font-size: 0.66rem;
  }
}

@media (max-width: 768px) {
  .about-image-wrap {
    margin-top: 4.5rem;
  }

  .side-skills {
    top: -8px;
    left: -8px;
    bottom: auto;
    right: auto;
    transform: scale(0.8);
    transform-origin: 0 0;
  }

  .scribble-knife {
    top: -122px;
    right: 182px;
    bottom: auto;
    left: auto;
    transform: rotate(0deg);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .scribble-arrow-knife {
    width: 46px;
    height: 46px;
    margin-top: 0;
    margin-right: 24px;
    transform: rotate(18deg);
  }
}

@media (max-width: 480px) {
  .about-image-wrap {
    margin-top: 4.5rem;
  }

  .side-skills {
    top: -6px;
    left: -6px;
    bottom: auto;
    right: auto;
    transform: scale(0.72);
    transform-origin: 0 0;
  }

  .scribble-knife {
    top: -56px;
    right: 12px;
  }

  .scribble-knife .scribble-text {
    font-size: 1.3rem;
  }

  .scribble-arrow-knife {
    width: 42px;
    height: 42px;
    margin-right: 18px;
    transform: rotate(18deg);
  }
}


/* ─── CONTACT ───────────────────────────────────────────────────── */
#contact {
  position: relative;
  overflow: hidden;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contact-left h2 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
  margin-bottom: 1.2rem;
}

.contact-left p {
  color: var(--clr-text-dim);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 42ch;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  transition: color var(--transition);
  padding: 10px 0;
  border-bottom: 1px solid #2a2a2a;
}

.contact-link-item:last-child {
  border-bottom: none;
}

.contact-link-item:hover {
  color: var(--clr-accent);
}

.contact-link-item svg {
  flex-shrink: 0;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: 2px solid #333;
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: none;
  width: 100%;
  caret-color: var(--clr-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #444;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-accent);
  box-shadow: 4px 4px 0px var(--clr-accent);
}

.form-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
}

.form-note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--clr-text-dim);
  letter-spacing: 0.08em;
}

/* ─── FOOTER ────────────────────────────────────────────────────── */
footer {
  border-top: var(--border-thick);
  padding: 2.5rem max(2rem, 5vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--clr-bg);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--clr-text);
}

.footer-logo span {
  color: var(--clr-accent);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--clr-text-dim);
  letter-spacing: 0.1em;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-dim);
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.footer-socials a:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  box-shadow: 3px 3px 0px var(--clr-accent);
}

/* ─── Reveal Animations ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ─── Cursor ────────────────────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 229, 0, 0.5);
  border-radius: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

body.cursor-hover .cursor-dot {
  opacity: 0.7;
}

body.cursor-hover .cursor-ring {
  opacity: 1;
  border: none;
  background-image:
    linear-gradient(var(--clr-text), var(--clr-text)),
    linear-gradient(var(--clr-text), var(--clr-text)),
    linear-gradient(var(--clr-text), var(--clr-text)),
    linear-gradient(var(--clr-text), var(--clr-text)),
    linear-gradient(var(--clr-text), var(--clr-text)),
    linear-gradient(var(--clr-text), var(--clr-text)),
    linear-gradient(var(--clr-text), var(--clr-text)),
    linear-gradient(var(--clr-text), var(--clr-text));
  background-repeat: no-repeat;
  background-size:
    16px 3px, 3px 16px,
    16px 3px, 3px 16px,
    16px 3px, 3px 16px,
    16px 3px, 3px 16px;
  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .nav-right {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-mobile {
    display: flex;
  }

  .hero-hire-pill {
    display: none;
  }

  /* Collapse hero to single column — restore auto height */
  #hero {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    width: 100%;
    max-width: 100%;
    /* left, right, stats */
  }

  .hero-col--left {
    padding: 2rem 0 1.5rem;
    width: 100%;
    max-width: 100%;
  }

  .hero-col--right {
    grid-row: 2;
    grid-column: 1;
    border-left: none;
    border-top: 2px solid #222;
    padding: 2rem 0 1.5rem;
    width: 100%;
    max-width: 100%;
    align-items: center;
  }

  #hero-3d-model {
    min-height: 280px !important;
    height: 280px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-socials {
    width: 100%;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .hero-social-btn {
    font-size: clamp(0.7rem, 2.8vw, 0.8rem);
    padding: 8px 14px;
  }

  .hero-stats {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stat-card:nth-child(2) {
    border-right: none;
  }

  .hero-stat-card:nth-child(3) {
    border-top: var(--border-thick);
  }

  .hero-stat-card:nth-child(4) {
    border-top: var(--border-thick);
    border-right: none;
  }

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

  .project-card.featured {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

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

  .skill-group {
    border-right: none;
    border-bottom: var(--border-thick);
  }

  .skill-group:last-child {
    border-bottom: none;
  }

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

  .about-image-wrap {
    max-width: 100%;
    aspect-ratio: 3/2;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

@media (max-width: 480px) {
  .hero-name {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .hero-socials {
    gap: 8px;
    justify-content: center;
  }

  .hero-social-btn {
    font-size: 0.72rem;
    padding: 7px 11px;
    letter-spacing: 0.05em;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stat-card:nth-child(even) {
    border-right: none;
  }

  .hero-stat-card:nth-child(n+3) {
    border-top: var(--border-thick);
  }

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

  .about-stat {
    border-right: none;
    border-bottom: var(--border-thick);
  }

  .about-stat:last-child {
    border-bottom: none;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

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

  .marquee-track {
    animation: none;
  }

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

  .hero-hire-pill {
    animation: none;
  }

  .hero-scroll-line::after {
    animation: none;
  }
}