/* ═══════════════════════════════════════════════════════
   PORTFOLIO v2 — "The Typing Canvas"
   Inspired by MonkeyType's experiential feel, not just its colors.
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:           #323437;
  --bg-deep:      #2c2e31;
  --bg-surface:   #393b3f;
  --text:         #d1d0c5;
  --text-dim:     #646669;
  --text-xdim:    #4a4c4f;
  --accent:       #e2b714;
  --accent-h:     #ca9d12;
  --correct:      #7ec486;
  --error:        #ca4754;

  --mono: "Roboto Mono", "JetBrains Mono", monospace;
  --display: "Lexend", sans-serif;

  --max-w: 980px;
  --r: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--text-xdim) var(--bg-deep);
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--text-xdim); border-radius: 3px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent-h); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }

/* ═══════════════════════════════════
   FLOATING CHARACTERS BACKGROUND
   ═══════════════════════════════════ */

.char-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.char-bg span {
  position: absolute;
  font-family: var(--mono);
  font-weight: 300;
  opacity: 0;
  animation: charFloat linear infinite;
  user-select: none;
}

/* Color classes assigned by JS */
.char-bg span.c-gold   { color: rgba(226, 183, 20, 0.35); }
.char-bg span.c-green  { color: rgba(126, 196, 134, 0.3); }
.char-bg span.c-blue   { color: rgba(74, 144, 217, 0.25); }
.char-bg span.c-dim    { color: rgba(100, 102, 105, 0.25); }

@keyframes charFloat {
  0%   { opacity: 0; transform: translateY(100vh) rotate(0deg) scale(1); }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-60px) rotate(15deg) scale(0.8); }
}

/* ═══════════════════════════════════
   GRADIENT ORBS — Ambient background
   ═══════════════════════════════════ */

.gradient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.06;
}

.orb-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -10%; left: -10%;
  animation: orbDrift1 25s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: #4a90d9;
  bottom: 10%; right: -5%;
  animation: orbDrift2 30s ease-in-out infinite;
}
.orb-3 {
  width: 350px; height: 350px;
  background: var(--correct);
  top: 50%; left: 40%;
  animation: orbDrift3 20s ease-in-out infinite;
}

@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(60px, 80px); }
  66% { transform: translate(-30px, 40px); }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-50px, -60px); }
  66% { transform: translate(40px, -20px); }
}
@keyframes orbDrift3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-70px, 50px); }
}

/* ═══════════════════════════════════
   HEADER
   ═══════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(50, 52, 55, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

main, footer { position: relative; z-index: 1; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo-accent { color: var(--accent); }

nav { display: flex; gap: 28px; align-items: center; }
nav a {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  position: relative;
  padding: 4px 0;
}
nav a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: all 0.3s var(--ease);
  transform: translateX(-50%);
}
nav a:hover { color: var(--text); }
nav a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}
.menu-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text); margin: 4px 0;
  transition: all 0.3s ease; border-radius: 1px;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ═══════════════════════════════════
   HERO — The Typing Experience
   ═══════════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
  position: relative;
}

/* Monkeytype-style typing simulation */
.typing-sim {
  margin-bottom: 48px;
  position: relative;
}

.typing-sim-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.typing-sim-text {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  position: relative;
  max-width: 700px;
}

.typing-sim-text .char {
  color: var(--text-xdim);
  transition: color 0.05s;
}

.typing-sim-text .char.typed {
  color: var(--text);
}

.typing-sim-text .char.current {
  position: relative;
}

.typing-sim-text .char.current::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 2px;
  bottom: 2px;
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
  animation: caretPulse 1s step-end infinite;
}

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

.typing-sim-wpm {
  position: absolute;
  top: -8px;
  right: 0;
  font-size: 2.5rem;
  font-family: var(--display);
  font-weight: 700;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
}

.typing-sim-wpm span {
  font-size: 0.8rem;
  font-family: var(--mono);
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 4px;
}

/* Result card — appears after typing sim */
.hero-result {
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface);
  border-radius: var(--r);
  padding: 36px 40px;
  max-width: 620px;
  position: relative;
  overflow: hidden;
}

.hero-result::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-h) 50%, transparent 100%);
}

.hero-result-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-name::after {
  content: "|";
  color: var(--accent);
  margin-left: 6px;
  font-weight: 300;
  animation: caretPulse 1s step-end infinite;
}

.hero-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-link {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid var(--bg-surface);
  color: var(--text-dim);
  transition: all 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.hero-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.hero-link.primary:hover {
  background: var(--accent-h);
  box-shadow: 0 4px 20px rgba(226, 183, 20, 0.3);
}

/* ═══════════════════════════════════
   SECTIONS — No numbers, clean breaks
   ═══════════════════════════════════ */

.section {
  padding: 80px 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--bg-surface);
}

.section-label {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: "";
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(90deg, var(--bg-surface), transparent);
  max-width: 200px;
}

.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-dim);
  max-width: 560px;
  font-size: 0.88rem;
  margin-bottom: 36px;
}

/* ═══════════════════════════════════
   ABOUT — Conversational, not template
   ═══════════════════════════════════ */

.about-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.about-text em {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
}

/* Skills — typed out, not tag cloud */
.skills-typed {
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface);
  border-radius: var(--r);
  padding: 24px;
}

.skills-typed-header {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skills-typed-header .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: caretPulse 1.5s step-end infinite;
}

.skill-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.4s var(--ease);
}

.skills-typed.is-visible .skill-line {
  opacity: 1;
  transform: translateX(0);
}

.skill-line .prompt {
  color: var(--accent);
  flex-shrink: 0;
}

.skill-line .skill-name {
  color: var(--text);
}

.skill-line .skill-level {
  color: var(--text-xdim);
  font-size: 0.72rem;
  margin-left: auto;
}

/* ═══════════════════════════════════
   PROJECTS — Grid cards with previews
   ═══════════════════════════════════ */

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

.project-card-v2 {
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface);
  border-radius: var(--r);
  overflow: hidden;
  transition: all 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

.project-card-v2:hover {
  border-color: rgba(226, 183, 20, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.project-card-wide {
  grid-column: 1 / -1;
}

/* Placeholder image area */
.project-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-surface);
}

.project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.project-card-v2:hover .project-img-wrap img {
  transform: scale(1.05);
}

.project-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
}

.project-placeholder svg {
  color: var(--text-xdim);
  transition: color 0.3s var(--ease);
}

.project-placeholder span {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-xdim);
  letter-spacing: 0.08em;
  transition: color 0.3s var(--ease);
}

.project-card-v2:hover .project-placeholder svg {
  color: var(--accent);
}

.project-card-v2:hover .project-placeholder span {
  color: var(--text-dim);
}

/* Card body */
.project-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-body h3 {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.project-card-body p {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
}

.project-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.project-tech-row span {
  font-size: 0.68rem;
  color: var(--text-xdim);
  background: var(--bg-surface);
  padding: 3px 10px;
  border-radius: 4px;
}

.project-card-v2:hover .project-tech-row span {
  background: var(--bg);
}

/* Project links */
.project-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--bg-surface);
  color: var(--text-dim);
  transition: all 0.25s var(--ease);
}

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

.project-link svg {
  flex-shrink: 0;
}

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

.project-link-primary:hover {
  background: var(--accent-h);
  color: var(--bg);
  box-shadow: 0 4px 16px rgba(226, 183, 20, 0.3);
}

/* ═══════════════════════════════════
   CREDENTIALS — Education + Certs + Workshops
   ═══════════════════════════════════ */

.cred-block {
  margin-bottom: 32px;
}

.cred-block:last-child {
  margin-bottom: 0;
}

.cred-block-title {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-surface);
}

.cred-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(57, 59, 63, 0.5);
}
.cred-item:last-child { border-bottom: none; }

.cred-item h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 4px;
}

.cred-item .cred-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.cred-item .cred-date {
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 4px;
}

/* Certificate gallery grid */
.cert-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface);
  border-radius: var(--r);
  overflow: hidden;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}

.cert-card:hover {
  border-color: rgba(226, 183, 20, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Certificate image area */
.cert-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #fff;
}

.cert-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.4s var(--ease);
}

.cert-card:hover .cert-img-wrap img {
  transform: scale(1.03);
}

.cert-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(50, 52, 55, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.cert-card:hover .cert-img-overlay {
  opacity: 1;
}

.cert-img-overlay span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(44, 46, 49, 0.85);
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid var(--bg-surface);
}

/* Badge-specific wrap (square, gradient bg) */
.cert-badge-wrap {
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #f0f4f0 0%, #e8ede8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-badge-wrap img {
  object-fit: contain;
  padding: 16px;
}

/* Certificate info */
.cert-info {
  padding: 16px 18px;
}

.cert-info h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 4px;
}

.cert-info .cred-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.cert-info .cred-date {
  font-size: 0.68rem;
  color: var(--accent);
  margin-top: 4px;
}

.cert-verify-link {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 6px;
  transition: color 0.2s var(--ease);
}

.cert-verify-link:hover {
  color: var(--accent-h);
}

/* Placeholder/highlight cert cards (no image) */
.cert-card-highlight {
  display: flex;
  flex-direction: row;
  align-items: center;
  cursor: default;
}

.cert-card-highlight:hover {
  transform: translateY(-3px);
}

.cert-placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 80px;
  padding: 20px;
  color: var(--accent);
}

/* Credly link */
.cred-credly-link {
  font-size: 0.78rem;
  margin-top: 16px;
  display: inline-block;
}

/* ═══════════════════════════════════
   LIGHTBOX — Full-screen cert viewer
   ═══════════════════════════════════ */

.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.cert-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.cert-lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.35s var(--ease);
}

.cert-lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: rgba(50, 52, 55, 0.8);
  border: 1px solid var(--bg-surface);
  color: var(--text);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}

.lightbox-close:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ═══════════════════════════════════
   TYPING TEST — Interactive!
   ═══════════════════════════════════ */

.typing-test-area {
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface);
  border-radius: var(--r);
  padding: 40px;
  text-align: center;
  position: relative;
  margin-bottom: 32px;
  cursor: text;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.3s;
}

.typing-test-area:focus-within {
  border-color: rgba(226, 183, 20, 0.3);
}

.typing-test-area .test-prompt {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.typing-test-area .test-char {
  transition: color 0.05s;
}
.typing-test-area .test-char.untyped { color: var(--text-xdim); }
.typing-test-area .test-char.correct { color: var(--text); }
.typing-test-area .test-char.wrong   { color: var(--error); }
.typing-test-area .test-char.active {
  position: relative;
}
.typing-test-area .test-char.active::before {
  content: "";
  position: absolute;
  left: -1px; top: 2px; bottom: 2px;
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
  animation: caretPulse 1s step-end infinite;
}

.typing-mobile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 21, 23, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 10;
  text-align: center;
}

.typing-mobile-overlay.active {
  display: flex;
}

.mobile-overlay-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.mobile-overlay-title {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.mobile-overlay-desc {
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 260px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.mobile-overlay-btn {
  background: var(--accent);
  color: var(--bg-deep);
  border: none;
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.mobile-overlay-btn:hover {
  filter: brightness(1.1);
}

.mobile-overlay-btn:active {
  transform: scale(0.95);
}

.typing-test-input {
  position: absolute;
  opacity: 0;
  left: -9999px;
}

.test-stats-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-surface);
}

.test-stat {
  text-align: center;
}

.test-stat-value {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent);
  display: block;
  line-height: 1.2;
}

.test-stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.test-hint {
  font-size: 0.75rem;
  color: var(--text-xdim);
  margin-top: 16px;
}

.test-hint kbd {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--text-xdim);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-family: var(--mono);
}

/* My stats comparison */
.my-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.my-stat {
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.25s var(--ease);
}

.my-stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.my-stat-mode {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.my-stat-wpm {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  display: block;
}

.my-stat-acc {
  font-size: 0.72rem;
  color: var(--correct);
  margin-top: 4px;
}

.typing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ═══════════════════════════════════
   CONTACT — Minimal strip
   ═══════════════════════════════════ */

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text);
  transition: all 0.25s var(--ease);
}

.contact-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.contact-pill .c-label {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--bg-surface);
  padding: 24px 28px;
  font-size: 0.72rem;
  color: var(--text-xdim);
  text-align: center;
}

/* ═══════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero entrance */
.hero-enter-1 { opacity:0; transform:translateY(20px); animation: enterUp 0.7s ease 0.2s forwards; }
.hero-enter-2 { opacity:0; transform:translateY(20px); animation: enterUp 0.7s ease 0.5s forwards; }
.hero-enter-3 { opacity:0; transform:translateY(20px); animation: enterUp 0.7s ease 0.8s forwards; }

@keyframes enterUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Keypress ripple */
@keyframes keypressRipple {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(226, 183, 20, 0.4); }
  100% { transform: scale(1); box-shadow: 0 0 0 20px rgba(226, 183, 20, 0); }
}

.keypress-flash {
  animation: keypressRipple 0.4s ease-out;
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */

@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
  .menu-toggle { display: flex; flex-direction: column; }
  nav {
    position: fixed; top: 0; right: -100%;
    width: 75%; max-width: 300px; height: 100vh;
    background: var(--bg-deep);
    flex-direction: column;
    padding: 80px 28px 28px;
    gap: 18px;
    border-left: 1px solid var(--bg-surface);
    transition: right 0.35s ease;
    z-index: 105;
  }
  nav.is-open { right: 0; }
  nav a { font-size: 0.95rem; }
  nav a::after { display: none; }

  .mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden;
    transition: all 0.35s; z-index: 100;
  }
  .mobile-overlay.is-open { opacity: 1; visibility: visible; }

  .hero { min-height: auto; padding: 48px 0 60px; }
  .typing-sim-wpm { display: none; }
  .hero-result { padding: 28px 24px; }

  .about-content { grid-template-columns: 1fr; gap: 28px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card-wide { grid-column: auto; }
  .cert-gallery { grid-template-columns: 1fr; }
  .my-stats { grid-template-columns: repeat(2, 1fr); }
  .contact-row { flex-direction: column; }

  .test-stats-bar { gap: 20px; flex-wrap: wrap; }

  .cert-lightbox { padding: 16px; }
  .lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 1rem; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 1.8rem; }
  .typing-sim-text { font-size: 1.1rem; }
  .typing-test-area { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-enter-1, .hero-enter-2, .hero-enter-3 {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
  .char-bg span { animation: none !important; opacity: 0 !important; }
  .typing-sim-text .char.current::before { animation: none !important; }
}
