/* ══════════════════════════════════════════════
   DAVID LOROW - Portfolio
   ══════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --bg:              #0a0b0e;
  --surface:         #0f1117;
  --surface2:        #14181f;
  --surface3:        #1a1f2a;
  --border:          #1a1f2e;
  --border-bright:   #252b3b;

  --accent:          #a64dff;  /* highlighter violet */
  --accent2:         #4d7cff;  /* royal blue */
  --accent3:         #f24dff;  /* magenta */
  --accent-amber:    #f5a623;

  --text:            #e8eaf0;
  --text-muted:      #6b7599;
  --text-dim:        #3d4460;

  --mono:  'Space Mono', monospace;
  --sans:  'DM Sans', sans-serif;

  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis owns scrolling */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── GRID BACKGROUND ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: inherit;
}

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

/* ─── HERO ─── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 80px 96px;
}

/* Eyebrow */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(14px);
}

.eyebrow-line {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.eyebrow-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Title - clip reveal */
.hero-title {
  font-family: var(--mono);
  font-size: clamp(44px, 7.5vw, 96px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

.title-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.07em;
}

.title-inner {
  display: block;
  transform: translateY(110%);
  opacity: 0;
}

.title-inner em {
  font-style: normal;
  color: var(--accent);
}

/* Skills strip */
.hero-skills {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: -8px 0 28px;
  opacity: 0;
  transform: translateY(16px);
}

/* Hero body */
.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 520px;
  line-height: 1.78;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(18px);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── BUTTONS ─── */
.btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 5px;
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
  background: rgba(166, 77, 255, 0.1);
  border: 1px solid rgba(166, 77, 255, 0.5);
  color: var(--accent);
}

.btn-primary:hover {
  background: rgba(166, 77, 255, 0.18);
  border-color: var(--accent);
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 28px rgba(166, 77, 255, 0.18);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
  transform: translateY(-3px) !important;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.btn-ghost:hover {
  border-color: var(--border-bright);
  color: var(--text-muted);
  transform: translateY(-3px) !important;
}

/* ─── SECTION SHARED ─── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 80px;
}

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

.section-header {
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(24px);
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ─── WORK ─── */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work-row {
  display: grid;
  grid-template-columns: 340px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}

.work-row:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.work-row-media {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.work-row-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) brightness(0.75);
  transition: transform 0.6s var(--ease-out), filter 0.4s;
}

.work-row:hover .work-row-media img {
  transform: scale(1.05);
  filter: grayscale(0) brightness(0.85);
}

/* Darkening layer between image and label */
.work-row-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.3);
}

.work-row-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: var(--mono);
  font-size: 110px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(200, 200, 200, 0.9);
  pointer-events: none;
  user-select: none;
}

.work-row-body {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.work-row-title {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.work-row-sub {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
}

.work-row-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-row-points li {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}

.work-row-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.work-row:nth-child(2) .work-row-points li::before { background: var(--accent2); }
.work-row:nth-child(3) .work-row-points li::before { background: var(--accent3); }

.work-row-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent2);
  margin-top: auto;
  padding-top: 8px;
}

.work-row:hover .work-row-cta {
  color: var(--text);
}

/* ─── INFRASTRUCTURE ─── */
.section-intro {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.82;
  max-width: 620px;
  margin-top: 20px;
  font-weight: 300;
}

.it-tabs-wrapper {
  margin-bottom: 0;
}

.it-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.it-tab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 9px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 5px 5px 0 0;
  outline: none;
  transition: color 0.2s, background 0.2s;
}

.it-tab:hover {
  color: var(--text);
  background: var(--surface2);
}

.it-tab.active {
  color: var(--accent);
  background: var(--surface2);
  border-color: var(--border-bright);
}

.it-panels {
  background: var(--surface2);
  border: 1px solid var(--border-bright);
  border-radius: 0 6px 6px 6px;
  overflow: hidden;
}

.it-panel {
  display: none;
  padding: 36px;
  animation: panelIn 0.28s var(--ease-out);
}

.it-panel.active {
  display: block;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.panel-icon {
  width: 42px;
  height: 42px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.panel-header-text { flex: 1; }

.panel-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.panel-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.panel-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(166, 77, 255, 0.07);
  border: 1px solid rgba(166, 77, 255, 0.2);
  color: var(--accent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.skill-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  transition: transform 0.2s;
}

.skill-item:hover {
  transform: translateY(-2px);
}

.skill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.skill-dot.green  { background: var(--accent); }
.skill-dot.blue   { background: var(--accent2); }
.skill-dot.amber  { background: var(--accent-amber); }
.skill-dot.purple { background: var(--accent3); }

.skill-name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 5px;
}

.skill-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.62;
  font-weight: 300;
}

/* Automation block */
.automation-block {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 28px 32px;
  opacity: 0;
  transform: translateY(20px);
}

.auto-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.automation-block p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.78;
  font-weight: 300;
  margin-bottom: 12px;
  max-width: 700px;
}

.automation-block p strong {
  color: var(--text);
  font-weight: 500;
}

.auto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface2);
}

/* ─── DETAIL PAGES (iOS / ML / IT) ─── */
.detail-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 80px 120px;
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 56px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.back-link:hover {
  color: var(--accent);
  border-color: rgba(166, 77, 255, 0.3);
  background: rgba(166, 77, 255, 0.05);
}

.detail-header {
  margin-bottom: 56px;
}

.detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.detail-eyebrow .eyebrow-line {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.detail-eyebrow span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.detail-title {
  font-family: var(--mono);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 22px;
}

.detail-desc {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 24px;
}

.detail-desc strong {
  color: var(--text);
  font-weight: 500;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--accent2);
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.detail-links a:hover {
  color: var(--text);
  border-color: var(--border-bright);
}

.detail-block {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

.detail-block-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.detail-block-caption {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: 24px;
}

/* iOS phone gallery */
.phone-gallery {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.phone-mockup {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg);
  border: 2px solid var(--border-bright);
  border-radius: 34px;
  padding: 12px;
  position: relative;
}

.phone-mockup .phone-notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  background: var(--border-bright);
  border-radius: 4px;
  z-index: 1;
}

.phone-mockup .phone-screen {
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface3);
}

.phone-mockup .phone-screen img {
  width: 100%;
  display: block;
}

.code-shot {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-shot img {
  width: 100%;
  display: block;
}

/* Full-width figure image (ML notebook screenshots) */
.detail-figure {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.detail-figure img {
  width: 100%;
  display: block;
}

.detail-figure.narrow {
  max-width: 460px;
}

/* ─── FOOTER ─── */
footer {
  border-top: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 80px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* Top row: CTA left, sig right */
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
}

.footer-title {
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 20px 0 0;
  opacity: 0;
  transform: translateY(24px);
}

.footer-sig {
  text-align: right;
  flex-shrink: 0;
}

.footer-brand {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

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

.footer-role {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.footer-link:hover {
  color: var(--accent);
  border-color: rgba(166, 77, 255, 0.3);
  background: rgba(166, 77, 255, 0.04);
}

/* ─── CONTACT CARD ─── */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.contact-detail-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
}

.contact-detail-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 44px;
  flex-shrink: 0;
}

.contact-detail-val {
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  transition: color 0.2s;
}

.contact-detail-row:hover .contact-detail-val {
  color: var(--accent);
}

.tag-link {
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tag-link:hover {
  color: var(--accent);
  border-color: rgba(166, 77, 255, 0.35);
  background: rgba(166, 77, 255, 0.06);
}

/* ─── HOMELAB DETAIL ─── */
.host-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.host-chips li {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
}

.host-chips li span {
  color: var(--accent);
  margin-right: 6px;
  letter-spacing: 0.1em;
  font-size: 10.5px;
}

.vm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.vm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s;
}

.vm-card:hover {
  transform: translateY(-2px);
}

.vm-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.vm-card-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.vm-card-role {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.vm-card:nth-child(2) .vm-card-role { color: var(--accent2); }
.vm-card:nth-child(3) .vm-card-role { color: var(--accent3); }

.vm-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
  margin: 8px 0 16px;
}

.vm-stat {
  margin-bottom: 10px;
}

.vm-stat-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.vm-stat-label b {
  color: var(--text);
  font-weight: 500;
}

.vm-bar {
  height: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.vm-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 3px;
}

.vm-card:nth-child(2) .vm-bar i {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.vm-card:nth-child(3) .vm-bar i {
  background: linear-gradient(90deg, var(--accent2), var(--accent3));
}

.vm-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
}

.vm-tags li {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 8px;
  background: var(--bg);
}

/* Prose blocks for homelab deep-dive narrative */
.detail-prose p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.78;
  font-weight: 300;
  margin: 0 0 14px;
  max-width: 700px;
}

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

.detail-prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  max-width: 700px;
}

.detail-prose li {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}

.detail-prose li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.detail-prose strong {
  color: var(--text);
  font-weight: 500;
}

.detail-prose code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--accent);
}

/* Resource allocation table */
.alloc-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 20px;
}

.alloc-table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
}

.alloc-table th,
.alloc-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.alloc-table th {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface2);
  font-size: 10.5px;
}

.alloc-table tbody tr:last-child td {
  border-bottom: none;
}

.alloc-table td {
  color: var(--text-muted);
  font-weight: 300;
}

.alloc-table td:first-child {
  color: var(--text);
  font-weight: 500;
}

/* ─── REVEAL INITIAL STATES ─── */
.reveal-text  { opacity: 0; transform: translateY(20px); }
.reveal-block { opacity: 0; transform: translateY(20px); }

/* Plain-CSS fade-up, used on standalone detail pages without GSAP */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s var(--ease-out) both;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hero-content    { padding: 64px 56px 80px; }
  .section-inner   { padding: 88px 56px; }
  .footer-inner    { padding: 80px 56px; }
  .detail-main     { padding: 56px 56px 96px; }
}

@media (max-width: 768px) {
  .work-row {
    grid-template-columns: 1fr;
  }

  .work-row-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .work-row-body {
    padding: 26px 24px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-sig {
    text-align: left;
  }

  .footer-links {
    justify-content: flex-start;
  }


}

@media (max-width: 600px) {
  .hero-content  { padding: 56px 24px 64px; }
  .section-inner { padding: 64px 24px; }

  .it-tabs         { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .it-panel        { padding: 24px; }

  .panel-header    { flex-wrap: wrap; }
  .panel-header-text { min-width: 0; }
  .panel-badge     { margin-left: 0; }
  .skills-grid     { grid-template-columns: 1fr; }

  .footer-inner    { padding: 60px 24px; gap: 40px; }
  .contact-card    { padding: 20px 24px; }

  .detail-main     { padding: 48px 20px 72px; }
  .phone-mockup    { width: 160px; }

  .contact-detail-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: nowrap;
    width: 100%;
  }

  .contact-detail-val {
    word-break: break-all;
  }
}
