/*
  Portfolio — Full skeuomorphic depth: strong shadows, leather grain surfaces, glossy icon frame.
*/
:root {
  color-scheme: dark;
  --black: #000000;
  --surface: #111111;
  --surface-raised: #1a1a1a;
  --border: #222222;
  --border-visible: #333333;
  --text-disabled: #666666;
  --text-secondary: #999999;
  --text-primary: #e8e8e8;
  --text-display: #ffffff;
  --accent: #d71921;
  --accent-subtle: rgba(215, 25, 33, 0.15);
  /* Warm amber/orange for tappable text — personal preference over skill default blue */
  --interactive: #e8a050;
  --success: #4a9e5c;
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  /* Aliases for existing rules */
  --bg: var(--black);
  --surface2: var(--surface-raised);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --lead: var(--text-primary);
  --body-text: var(--text-secondary);
  --accent-dim: var(--accent-subtle);
  --link-border: rgba(232, 160, 80, 0.45);
  --link-border-hover: rgba(232, 160, 80, 0.8);
  --link-hover: #f5c878;
  --interactive-tint: rgba(232, 160, 80, 0.1);
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", "JetBrains Mono", "Consolas", monospace;
  --font-display: "Doto", "Space Grotesk", sans-serif;
  --font: var(--font-mono);
  --pad: clamp(1rem, 4vw, 1.75rem);
  --max: min(100%, 48rem);
  --radius: 12px;
  --radius-tech: 8px;
  /* Skeuomorphic depth — strong / visible on real displays */
  --sk-raise:
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 12px 40px rgba(0, 0, 0, 0.75),
    0 24px 56px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  --sk-raise-hover:
    0 4px 0 rgba(0, 0, 0, 0.45),
    0 18px 52px rgba(0, 0, 0, 0.82),
    0 32px 64px rgba(0, 0, 0, 0.5);
  --sk-hero:
    0 3px 0 rgba(0, 0, 0, 0.55),
    0 20px 50px rgba(0, 0, 0, 0.85),
    0 40px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 8px rgba(0, 0, 0, 0.45);
  --sk-inset-deep:
    inset 0 3px 10px rgba(0, 0, 0, 0.65),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  --sk-btn:
    0 3px 8px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  --sk-btn-press: inset 0 3px 10px rgba(0, 0, 0, 0.65);
  /* Dark leather grain (layered CSS, no image asset) — stronger grain so it reads on displays */
  --leather-dark:
    repeating-linear-gradient(42deg, rgba(255, 255, 255, 0.04) 0px, transparent 1px, transparent 4px),
    repeating-linear-gradient(-33deg, rgba(0, 0, 0, 0.28) 0px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(90, 70, 52, 0.22) 0px, transparent 1px, transparent 2px),
    linear-gradient(168deg, #2a221c 0%, #1a1512 42%, #0c0a08 100%);
}

html[data-theme="light"] {
  color-scheme: light;
  background-color: #f2ebe4;
  --black: #f5f5f5;
  --surface: #ffffff;
  --surface-raised: #f0f0f0;
  --border: #e8e8e8;
  --border-visible: #cccccc;
  --text-disabled: #999999;
  --text-secondary: #666666;
  --text-primary: #1a1a1a;
  --text-display: #000000;
  --interactive: #b45309;
  --accent-subtle: rgba(215, 25, 33, 0.12);
  --bg: var(--black);
  --surface2: var(--surface-raised);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --lead: var(--text-primary);
  --body-text: var(--text-secondary);
  --accent-dim: var(--accent-subtle);
  --link-border: rgba(180, 83, 9, 0.42);
  --link-border-hover: rgba(180, 83, 9, 0.72);
  --link-hover: #92400e;
  --interactive-tint: rgba(180, 83, 9, 0.08);
  --sk-raise:
    0 2px 0 rgba(0, 0, 0, 0.06),
    0 10px 32px rgba(0, 0, 0, 0.14),
    0 20px 48px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  --sk-raise-hover:
    0 14px 40px rgba(0, 0, 0, 0.18),
    0 24px 56px rgba(0, 0, 0, 0.1);
  --sk-hero:
    0 3px 0 rgba(0, 0, 0, 0.08),
    0 16px 44px rgba(0, 0, 0, 0.16),
    0 28px 60px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 6px rgba(0, 0, 0, 0.05);
  --sk-inset-deep: inset 0 3px 8px rgba(0, 0, 0, 0.12);
  --sk-btn:
    0 3px 8px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  --sk-btn-press: inset 0 3px 8px rgba(0, 0, 0, 0.15);
  --leather-light:
    repeating-linear-gradient(40deg, rgba(0, 0, 0, 0.035) 0px, transparent 1px, transparent 4px),
    repeating-linear-gradient(-38deg, rgba(120, 100, 85, 0.06) 0px, transparent 1px, transparent 5px),
    linear-gradient(168deg, #faf6f1 0%, #ebe4dc 45%, #d4cbc0 100%);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Match body base so overscroll / edges never flash flat */
  background-color: #0a0806;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  /* Full-page leather “desk” — same language as panels, behind grid layers */
  background-color: #0c0a08;
  background-image: var(--leather-dark);
  background-size: auto, auto, auto, 100% 100%;
  font-feature-settings: "kern" 1;
  font-optical-sizing: auto;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Skeuomorphic depth on the page itself: recessed tray + edge vignette + top rim light */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055) 0%,
    transparent 22%,
    transparent 78%,
    rgba(0, 0, 0, 0.42) 100%
  );
  box-shadow:
    inset 0 0 min(120px, 18vw) rgba(0, 0, 0, 0.65),
    inset 0 3px 5px rgba(255, 255, 255, 0.06),
    inset 0 -2px 8px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] body {
  background-color: #f2ebe4;
  background-image: var(--leather-light);
  background-size: auto, auto, auto, 100% 100%;
}

html[data-theme="light"] body::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    transparent 28%,
    transparent 72%,
    rgba(0, 0, 0, 0.06) 100%
  );
  box-shadow:
    inset 0 0 min(100px, 14vw) rgba(0, 0, 0, 0.07),
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 6px rgba(0, 0, 0, 0.05);
}

a {
  color: var(--interactive);
  text-decoration: none;
  border-bottom: 1px solid var(--link-border);
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-border-hover);
}

a:focus-visible {
  outline: 2px solid var(--border-visible);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  position: fixed;
  left: var(--pad);
  top: var(--pad);
  z-index: 100;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Square grid — full viewport (no radial mask; was hiding the lower page) */
.grid-lines--bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.042) 1px, transparent 1px);
  background-size: 40px 40px;
}

html[data-theme="light"] .grid-lines--bg {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.055) 1px, transparent 1px);
}

/* Dot-matrix motif (Nothing design system) — layered on top of grid */
.dot-grid {
  background-image: radial-gradient(circle, var(--border-visible) 1px, transparent 1px);
  background-size: 16px 16px;
}

.dot-grid--bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.11;
}

html[data-theme="light"] .dot-grid--bg {
  opacity: 0.15;
  background-image: radial-gradient(circle, var(--border-visible) 1px, transparent 1px);
}

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.theme-toggle {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  min-height: 44px;
  border: 1px solid rgba(100, 100, 100, 0.6);
  border-radius: 999px;
  background: linear-gradient(180deg, #353535 0%, #1c1c1c 55%, #121212 100%);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow:
    var(--sk-btn),
    0 6px 16px rgba(0, 0, 0, 0.45);
  transition:
    color 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    box-shadow 0.15s var(--ease-out),
    transform 0.1s var(--ease-out);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: rgba(180, 180, 180, 0.5);
  box-shadow:
    var(--sk-btn),
    0 8px 22px rgba(0, 0, 0, 0.55);
}

.theme-toggle:active {
  box-shadow: var(--sk-btn-press);
  transform: translateY(2px);
}

html[data-theme="light"] .theme-toggle {
  background: linear-gradient(180deg, #ffffff 0%, #e2e2e2 100%);
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--border-visible);
  outline-offset: 2px;
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 2.25rem) var(--pad) clamp(3.5rem, 8vw, 4.5rem);
}

/* Window chrome — title bar with depth */
.window-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(90, 90, 90, 0.5);
  border-radius: var(--radius-tech);
  background: linear-gradient(180deg, #2a2a2a 0%, #161616 100%);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  max-width: 14rem;
}

html[data-theme="light"] .window-chrome {
  background: linear-gradient(180deg, #f8f8f8 0%, #dcdcdc 100%);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.window-chrome__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #666 0%, #3a3a3a 55%, #222 100%);
  border: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.window-chrome__dot:nth-child(1) {
  background: radial-gradient(circle at 30% 30%, #e8a090 0%, #a85c4a 60%, #6b3028 100%);
}
.window-chrome__dot:nth-child(2) {
  background: radial-gradient(circle at 30% 30%, #d4c4a0 0%, #8a7a58 60%, #4a4030 100%);
}
.window-chrome__dot:nth-child(3) {
  background: radial-gradient(circle at 30% 30%, #7adb8f 0%, #3a9a52 60%, #1a4a28 100%);
}

html[data-theme="light"] .window-chrome__dot {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

html[data-theme="light"] .window-chrome__dot:nth-child(1) {
  background: radial-gradient(circle at 30% 30%, #ff9080 0%, #e06050 100%);
}
html[data-theme="light"] .window-chrome__dot:nth-child(2) {
  background: radial-gradient(circle at 30% 30%, #f0e0a0 0%, #d4b040 100%);
}
html[data-theme="light"] .window-chrome__dot:nth-child(3) {
  background: radial-gradient(circle at 30% 30%, #90e0a0 0%, #40b040 100%);
}

.window-chrome__title {
  margin-left: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header / hero — asymmetric: avatar column + type */
.hero-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

/* Glossy “app icon” bezel + specular glass */
.hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  padding: 5px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
    linear-gradient(145deg, #5a5a5a 0%, #2a2a2a 38%, #080808 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 14px 36px rgba(0, 0, 0, 0.85),
    0 6px 14px rgba(0, 0, 0, 0.65),
    inset 0 2px 4px rgba(255, 255, 255, 0.45),
    inset 0 -6px 14px rgba(0, 0, 0, 0.65);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
}

.hero-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 17px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.2) 28%,
    rgba(255, 255, 255, 0.04) 42%,
    transparent 55%
  );
  mix-blend-mode: soft-light;
}

.hero-avatar-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  pointer-events: none;
  z-index: 3;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 -3px 8px rgba(0, 0, 0, 0.35);
}

.hero-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 82px;
  height: 82px;
  border-radius: 17px;
  object-fit: cover;
  border: none;
  background: #111;
  box-shadow:
    inset 0 3px 12px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .hero-avatar-wrap {
  background: linear-gradient(145deg, #e8e8e8 0%, #c8c8c8 45%, #a8a8a8 100%);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18),
    inset 0 2px 2px rgba(255, 255, 255, 0.95),
    inset 0 -3px 8px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .hero-avatar-wrap::before {
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.9) 0%, transparent 45%);
  mix-blend-mode: overlay;
}

@media (min-width: 640px) {
  .hero-head {
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
  }
}

.hero-head__text {
  min-width: 0;
  flex: 1 1 12rem;
}

.hero-head__text .eyebrow {
  margin-bottom: 0.4rem;
}

.hero-head__text h1 {
  margin-bottom: 0;
}

header.site {
  margin-bottom: clamp(2rem, 5vw, 2.75rem);
  padding-bottom: clamp(1.5rem, 4vw, 2rem);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.site--framed {
  position: relative;
  overflow: visible;
  margin-bottom: 0.5rem;
  padding: clamp(1.35rem, 4vw, 1.75rem);
  border: 1px solid rgba(80, 65, 55, 0.45);
  border-radius: var(--radius);
  background-color: #181410;
  background-image: var(--leather-dark);
  background-size: auto, auto, auto, 100% 100%;
  box-shadow: var(--sk-hero);
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.55));
}

.site--framed::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, transparent 40%, rgba(0, 0, 0, 0.1) 100%);
}

.site--framed > * {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .site--framed {
  background-color: #f0e8e0;
  background-image: var(--leather-light);
  border-color: rgba(120, 100, 85, 0.35);
  box-shadow: var(--sk-hero);
  filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.12));
}

html[data-theme="light"] .site--framed::after {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.65) 0%, transparent 45%, rgba(0, 0, 0, 0.04) 100%);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--text-display);
}

.lead {
  margin: 0;
  color: var(--text-primary);
  max-width: 65ch;
  line-height: 1.65;
}

.lead.about-rich strong {
  color: var(--text-display);
  font-weight: 600;
}

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.stat--hero {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
}

.stat__row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

/* Segmented progress — recessed instrument bezel */
.seg-prog {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  max-width: 28rem;
  min-height: 22px;
  margin-top: 0.85rem;
  padding: 5px 6px;
  border-radius: 6px;
  border: 1px solid #2a2a2a;
  background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
  box-shadow: var(--sk-inset-deep), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .seg-prog {
  border-color: #ccc;
  background: linear-gradient(180deg, #e8e8e8 0%, #f2f2f2 100%);
  box-shadow: var(--sk-inset-deep);
}

.seg-prog__seg {
  flex: 1;
  min-width: 0;
  height: 10px;
  align-self: center;
  background: var(--border);
  border-radius: 1px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.seg-prog__seg--on {
  background: linear-gradient(180deg, #f5f5f5 0%, #d8d8d8 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .seg-prog__seg--on {
  background: linear-gradient(180deg, #2a2a2a 0%, #111111 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 700;
  color: var(--text-display);
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.stat__value--metric {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
}

@media (min-width: 420px) {
  .stat__label::before {
    content: "\00a0·\00a0";
    color: var(--border-visible);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
  }
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 1.5rem;
}

a.social-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--link-border);
}

a.social-link:not(:last-child)::after {
  content: "|";
  display: inline-block;
  margin: 0 0.65rem;
  color: var(--text-disabled);
  font-weight: 400;
  border-bottom: none;
  pointer-events: none;
}

/* Panels — leather + strong lift */
.panel {
  position: relative;
  margin-bottom: clamp(2rem, 5vw, 2.75rem);
  padding: clamp(1.25rem, 3.5vw, 1.5rem) clamp(1.25rem, 3.5vw, 1.5rem);
  border: 1px solid rgba(75, 62, 52, 0.5);
  border-radius: var(--radius);
  background-color: #16120e;
  background-image: var(--leather-dark);
  box-shadow: var(--sk-raise);
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.5));
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
}

.panel > * {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .panel {
  background-color: #faf6f1;
  background-image: var(--leather-light);
  border-color: rgba(140, 120, 100, 0.35);
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.1));
}

html[data-theme="light"] .panel::after {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.5) 0%, transparent 55%);
}

.panel--accent {
  border-color: rgba(75, 62, 52, 0.5);
  border-left: 3px solid var(--accent);
}

html[data-theme="light"] .panel--accent {
  border-left: 3px solid var(--accent);
}

.panel__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}

.bracket-label::before {
  content: "[ ";
  color: var(--text-disabled);
  font-weight: 400;
}

.bracket-label::after {
  content: " ]";
  color: var(--text-disabled);
  font-weight: 400;
}

.panel__amount {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-display);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.panel__desc {
  margin: 0;
  color: var(--body-text);
  font-size: 0.8125rem;
  line-height: 1.7;
}

/* Section titles */
.section-title {
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.section-title__rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 1rem;
}

.section-title__text {
  flex: 0 0 auto;
}

.section-title--plain {
  display: block;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.section-title--plain::before,
.section-title--plain::after {
  display: none;
}

.project-section {
  margin-bottom: 2.75rem;
}

.project-section:last-of-type {
  margin-bottom: 2rem;
}

/* Project category tabs */
.project-tabs {
  margin-bottom: 0.5rem;
}

.project-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.project-tabs__tab {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  min-height: 40px;
  border: 1px solid var(--border-visible);
  border-radius: 999px;
  background: linear-gradient(180deg, #1c1c1c 0%, #141414 100%);
  color: var(--text-secondary);
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.project-tabs__tab:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.project-tabs__tab[aria-selected="true"] {
  border-color: #c8c8c8;
  background: linear-gradient(180deg, #fafafa 0%, #e6e6e6 100%);
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

html[data-theme="light"] .project-tabs__tab {
  background: linear-gradient(180deg, #fafafa 0%, #ececec 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .project-tabs__tab[aria-selected="true"] {
  border-color: #333333;
  background: linear-gradient(180deg, #2c2c2c 0%, #141414 100%);
  color: #f0f0f0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.project-tabs__panel {
  min-height: 2rem;
}

/* Project cards — raised leather tile */
.project {
  position: relative;
  background-color: #181410;
  background-image: var(--leather-dark);
  border: 1px solid rgba(70, 58, 48, 0.45);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--sk-raise);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    filter 0.2s var(--ease-out);
}

.project::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%);
}

.project > * {
  position: relative;
  z-index: 1;
}

.project:hover {
  border-color: rgba(120, 100, 85, 0.55);
  box-shadow: var(--sk-raise-hover);
  transform: translateY(-4px);
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.6));
}

html[data-theme="light"] .project {
  background-color: #fffcf8;
  background-image: var(--leather-light);
  border-color: rgba(130, 110, 95, 0.3);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.08));
}

.project-header {
  margin-bottom: 0.55rem;
}

.project-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.project-title {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.025em;
}

.project-subtitle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.project p {
  margin: 0 0 0.75rem;
  color: var(--body-text);
  font-size: 0.8125rem;
  line-height: 1.72;
}

.project p:last-of-type {
  margin-bottom: 0;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.link-placeholder {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
}

a.project-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

a.project-link::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  margin-top: -0.1rem;
}

/* Ecosystem */
.eco-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eco-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

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

.eco-item__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.45rem;
}

.eco-item__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
}

.eco-item__handle {
  font-size: 0.72rem;
  color: var(--muted);
}

.eco-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.eco-badge {
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

a.eco-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--link-border);
}

/* Experience */
.exp-block {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.exp-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.exp-block__company {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
}

.exp-block__desc {
  margin: 0.5rem 0 0.85rem;
  color: var(--body-text);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.exp-role {
  margin-top: 0.65rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent-dim);
}

.exp-role__title {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
}

.exp-role__meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.exp-role__tech {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Skills — editorial list (no tri-column card row; divide-y structure) */
.panel--editorial.panel--skills {
  background-color: #16120e;
  background-image: var(--leather-dark);
  border: 1px solid rgba(75, 62, 52, 0.5);
  box-shadow: var(--sk-raise);
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.5));
}

html[data-theme="light"] .panel--editorial.panel--skills {
  background-color: #faf6f1;
  background-image: var(--leather-light);
}

.panel--skills::before {
  display: none;
}

.skills-header {
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.section-title--skills {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.skills-kicker {
  margin: 0;
  max-width: 36rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--body-text);
}

.skills-matrix {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tools-stack {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.tools-stack:first-of-type {
  padding-top: 0;
}

.tools-stack:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.tools-stack__head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.tools-stack__index {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.tools-stack__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
  line-height: 1.3;
}

.tools-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
}

.tools-chip {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.5rem;
  font-size: 0.65rem;
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: var(--body-text);
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

html[data-theme="light"] .tools-chip {
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.tools-chip:hover {
  border-color: var(--link-border-hover);
  background: var(--interactive-tint);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tools-chip__glyph {
  flex: 0 0 auto;
  font-size: 0.55rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--interactive);
  opacity: 0.95;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .tools-chip {
    transition: none;
  }
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.footer-rule {
  display: flex;
  justify-content: center;
  margin: 0 0 1rem;
}

.footer-diamond {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff4a4a 0%, var(--accent) 55%, #7a0a0e 100%);
  box-shadow: 0 0 8px rgba(215, 25, 33, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  opacity: 1;
}

.footer-copy {
  font-family: var(--font-mono);
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project {
    transition: none;
    transform: none;
  }

  .project:hover {
    transform: none;
  }

  .theme-toggle:active {
    transform: none;
  }
}
