/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  /* Balanced gradient — no heavy dark bias */
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(var(--accent-rgb), 0.055) 0%, transparent 65%),
    radial-gradient(ellipse 70% 50% at 75% 70%, rgba(var(--accent-rgb), 0.03) 0%, transparent 60%),
    var(--bg-primary);
}

body.light #hero {
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(var(--accent-rgb), 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 60% 45% at 80% 65%, rgba(var(--accent-rgb), 0.03) 0%, transparent 55%),
    var(--bg-primary);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    linear-gradient(var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  animation: gridShift 40s linear infinite;
}

body.light #hero::before {
  opacity: 0.09;
}

@keyframes gridShift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(60px); }
}

/* ── Ambient Backend Log Background ── */
.hero-logs {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 100px;
  gap: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,1) 20%,
    rgba(0,0,0,1) 80%,
    transparent 100%
  );
}

.hero-logs .log-stream {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: logScroll 40s linear infinite;
  will-change: transform;
}

@keyframes logScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.hero-logs .log-line {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 2;
  padding: 0 3rem;
  white-space: nowrap;
  opacity: 0.03;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.hero-logs .log-line.log-ok    { color: var(--accent); opacity: 0.05; }
.hero-logs .log-line.log-warn  { color: #f59e0b; opacity: 0.035; }
.hero-logs .log-line.log-error { color: #ef4444; opacity: 0.03; }

body.light .hero-logs .log-line       { opacity: 0.05; }
body.light .hero-logs .log-line.log-ok { opacity: 0.07; }

/* ── Hero Wrap ── */
.hero-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .hero-wrap {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 40px;
    text-align: center;
  }
  .hero-left {
    align-items: center;
    margin-top: 0;
  }
  .hero-label, .hero-role-wrap {
    justify-content: center;
  }
  .hero-tagline {
    margin: 0 auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-social {
    justify-content: center;
  }
  .hero-logs {
    display: none;
  }
}

.hero-left {
  display: flex;
  margin-top: 50px;
  flex-direction: column;
  gap: 1.75rem;
  z-index: 2;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: heroReveal 1s var(--ease-out-expo) forwards;
}

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

.hero-label::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--accent);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--text-primary);
  margin: 0.25rem 0;
  opacity: 0;
  animation: heroReveal 1s var(--ease-out-expo) 0.1s forwards;
}

.hero-heading em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-glow);
}

/* ── Typing Role Line — bold, high contrast, clearly visible ── */
.hero-role-wrap {
  height: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  animation: heroReveal 1s var(--ease-out-expo) 0.2s forwards;
  margin-top: -0.25rem;
}

.hero-role-text {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.025em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

body.light .hero-role-text {
  color: var(--text-primary);
  text-shadow: none;
}

.hero-cursor {
  display: inline-block;
  width: 11px;
  height: 1.25em;
  background: var(--accent);
  margin-left: 5px;
  vertical-align: middle;
  animation: t-blink 0.85s step-end infinite;
  box-shadow: 0 0 12px var(--accent-glow);
  border-radius: 1px;
}

@keyframes t-blink {
  from, to { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-tagline {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-muted);
  max-width: 520px;
  opacity: 0;
  animation: heroReveal 1s var(--ease-out-expo) 0.3s forwards;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroReveal 1s var(--ease-out-expo) 0.4s forwards;
}

/* ── View Resume button: smaller, single-line ── */
#view-resume-btn {
  padding: 0.55rem 1.1rem;  /* ← ADJUST: vertical then horizontal padding */
  font-size: 0.8rem;         /* ← ADJUST: label text size */
  gap: 0.4rem;               /* ← ADJUST: space between icon and label */
  white-space: nowrap;       /* keeps "View Resume" on one line always */
}
#view-resume-btn svg {
  width: 14px;               /* ← ADJUST: icon size */
  height: 14px;
  flex-shrink: 0;
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
  opacity: 0;
  animation: heroReveal 1s var(--ease-out-expo) 0.5s forwards;
}

.hero-social a {
  color: var(--text-dim);
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-social a:hover {
  color: var(--accent);
  transform: translateY(-5px) scale(1.12);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.hero-social svg {
  width: 22px;
  height: 22px;
}

/* ── Hero Right - Photo (Modern layered card layout) ── */
.hero-right {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeIn 1.5s var(--ease-out-expo) 0.6s forwards;
  /* smooth scroll parallax handled via JS — needs will-change */
  will-change: transform;
}

/* Outer container with layered feel */
.hero-photo-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  z-index: 1;
  /* Use aspect-ratio for frame proportions */
}

/* Decorative background card (layer 1) */
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  right: -16px;
  bottom: -16px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  z-index: -2;
  transition: all 0.8s var(--ease-out-expo);
  opacity: 0.5;
}

body.light .hero-photo-wrap::before {
  box-shadow: var(--shadow-lg);
  opacity: 0.8;
}

/* Accent line decoration (layer 2) */
.hero-photo-wrap::after {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 80px;
  height: 80px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-radius: 0 14px 0 0;
  z-index: 2;
  transition: all 0.8s var(--ease-out-expo);
  opacity: 0.6;
}

.hero-photo-wrap:hover::before {
  top: 12px;
  left: 12px;
  right: -12px;
  bottom: -12px;
  opacity: 0.7;
}

.hero-photo-wrap:hover::after {
  opacity: 1;
  top: -8px;
  right: -8px;
}

/* Bottom-left accent corner */
.hero-photo-accent-corner {
  position: absolute;
  bottom: -12px;
  left: -12px;
  width: 60px;
  height: 60px;
  border-bottom: 2px solid rgba(var(--accent-rgb), 0.4);
  border-left: 2px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 0 0 0 14px;
  z-index: 2;
  transition: all 0.8s var(--ease-out-expo);
}

.hero-photo-wrap:hover .hero-photo-accent-corner {
  opacity: 0.8;
  bottom: -8px;
  left: -8px;
}

/* Status badge */
.hero-status-badge {
  position: absolute;
  bottom: -20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transition: all var(--transition-smooth);
}

body.light .hero-status-badge {
  box-shadow: var(--shadow-md);
  background: var(--bg-primary);
}

.hero-status-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.hero-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  animation: statusPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(34,197,94,0.4); }
  50%       { box-shadow: 0 0 14px rgba(34,197,94,0.7); }
}

.hero-status-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Main photo frame */
.hero-photo-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.45),
    0 8px 20px rgba(0,0,0,0.25),
    0 0 0 1px var(--border-accent);
  position: relative;
  transition: all 0.8s var(--ease-out-expo);
}

body.light .hero-photo-frame {
  box-shadow:
    0 16px 40px rgba(0,0,0,0.14),
    0 4px 12px rgba(0,0,0,0.08),
    0 0 0 1px var(--border-accent);
}

.hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    transparent 50%,
    rgba(var(--accent-rgb), 0.08) 100%
  );
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.6s;
  opacity: 0;
}

.hero-photo-wrap:hover .hero-photo-frame {
  box-shadow:
    0 32px 80px rgba(0,0,0,0.55),
    0 12px 30px rgba(0,0,0,0.3),
    0 0 0 1px var(--accent);
}

.hero-photo-wrap:hover .hero-photo-frame::after {
  opacity: 1;
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out-expo), filter 0.8s;
  filter: grayscale(0.15) contrast(1.02);
  display: block;
}

.hero-photo-wrap:hover .hero-photo-frame img {
  transform: scale(1.04);
  filter: grayscale(0) contrast(1.04);
}

.hero-location { display: none; }

/* ── Resume Select Modal ── */
.resume-select-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}

.resume-type-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
}

body.light .resume-type-btn {
  box-shadow: var(--shadow-sm);
}

.resume-type-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateX(6px);
  box-shadow: 0 10px 25px var(--accent-glow);
}

.resume-type-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.resume-type-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition);
}

.resume-type-btn:hover .resume-type-title { color: var(--accent); }

.resume-type-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.resume-type-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: all var(--transition-smooth);
}

.resume-type-btn:hover .resume-type-arrow {
  color: var(--accent);
  transform: translateX(5px);
}

/* ── Download option row ── */
.resume-download-row {
  display: flex;
  gap: 0.75rem;
  padding: 0 2rem 2rem;
}

.resume-download-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: transparent;
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-smooth);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.resume-download-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.resume-download-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Resume View Modal ── */
#resume-view-modal { align-items: flex-start; }
#resume-view-modal .modal {
  max-width: 840px;
  max-height: calc(100vh - 112px);
}

.resume-doc {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.resume-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.resume-name {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.resume-title-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.resume-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

.resume-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color var(--transition);
}

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

.resume-contact-item svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.resume-section { margin-bottom: 2rem; }

.resume-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
}

.resume-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-accent);
  opacity: 0.4;
}

.resume-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.resume-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.resume-skill-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: start;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-wrap {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-right {
    justify-content: center;
  }

  .hero-photo-wrap {
    max-width: 300px;
  }
}

/* ── Resume View Modal — Download PDF Button ── */
.resume-view-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 14px var(--accent-glow);
  white-space: nowrap;
}

.resume-view-dl-btn:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--accent-glow);
}

.resume-view-dl-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
/* ── Hero Quote Rotator ── */
.hero-quotes-container {
  margin-top: 0.2rem;
  min-height: 5.5rem;
  max-width: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  opacity: 0;
  animation: heroReveal 1s var(--ease-out-expo) 0.6s forwards;
}

.hero-quote-item {
  position: absolute;
  width: 100%;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-dim);
  line-height: 1.5;
  font-style: italic;
  transition: all 0.6s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(10px);
}

.hero-quote-item.active {
  opacity: 1;
  transform: translateY(0);
}

.hero-quote-item.exit {
  opacity: 0;
  transform: translateY(-10px);
}

body.light .hero-quote-item {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESUME MODAL — Card-based layout
   Added to fix: missing entry styles (raw text bug) + redesign
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Resume doc wrapper ── */
.resume-doc {
  padding: 2rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Header card ── */
.resume-header-card {
  padding: 2rem 2.25rem 1.75rem;
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-card) 100%
  );
  margin-bottom: 0.25rem;
}

.resume-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.resume-title-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.resume-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
}

.resume-contact-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color var(--transition);
}
.resume-contact-item:hover { color: var(--accent); }
.resume-contact-item svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Section card (wraps each resume section) ── */
.resume-section-card {
  padding: 1.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  transition: border-color 0.2s;
}
.resume-section-card:hover {
  border-color: var(--border-accent);
}
body.light .resume-section-card {
  background: var(--bg-primary);
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

/* ── Section title ── */
.resume-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 600;
}
.resume-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-accent);
  opacity: 0.35;
}

/* ── Summary ── */
.resume-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin: 0;
}

/* ── Skills grid ── */
.resume-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.resume-skill-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: 0.88rem;
}
.resume-skill-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  padding-top: 0.15rem;
  letter-spacing: 0.04em;
}
.resume-skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.resume-skill-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
  transition: all 0.15s;
}
.resume-skill-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ── Entry cards (Experience & Education) ── */
.resume-entries {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.resume-entry-card {
  padding: 1.1rem 1.35rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0 9px 9px 0;
  background: var(--bg-secondary);
  transition: border-color 0.2s, background 0.2s;
}
.resume-entry-card:hover {
  border-color: var(--border-accent);
  border-left-color: var(--accent);
  background: var(--bg-card);
}
body.light .resume-entry-card {
  background: var(--bg-primary);
}

/* Top row: title + period side by side */
.resume-ec-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}
.resume-ec-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.resume-ec-org {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 0.15rem;
  letter-spacing: 0.03em;
}
.resume-ec-period {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding-top: 0.15rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.resume-ec-grade {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 5px;
  padding: 0.18rem 0.6rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.resume-ec-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0.45rem 0 0.5rem;
}

/* Shared tag row */
.resume-ec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.resume-ec-tag {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  letter-spacing: 0.03em;
  transition: all 0.15s;
}
.resume-ec-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Project sub-cards ── */
.resume-proj-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.resume-proj-card {
  padding: 1.1rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-secondary);
  transition: border-color 0.2s, background 0.2s;
}
.resume-proj-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card);
}
body.light .resume-proj-card {
  background: var(--bg-primary);
}

.resume-pc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.resume-pc-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}
.resume-pc-period {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* Bullet list inside project sub-card */
.resume-pc-bullets {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  list-style: none;
}
.resume-pc-bullets li {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  position: relative;
  padding-left: 0.85rem;
}
.resume-pc-bullets li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.65;
}

/* ── Certifications ── */
.resume-certs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.resume-cert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.resume-cert-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.resume-cert-title {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}
.resume-cert-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Empty state ── */
.resume-empty {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .resume-doc {
    padding: 1.25rem 1rem 2rem;
    gap: 0.85rem;
  }
  .resume-header-card,
  .resume-section-card {
    padding: 1.1rem 1.1rem;
  }
  .resume-skill-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .resume-ec-top,
  .resume-pc-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .resume-ec-period,
  .resume-pc-period {
    font-size: 0.67rem;
  }
  .resume-cert-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}
