/*
  modal-content.css
  Shared styles for all skill and blog pages loaded inside the modal.
  Works with both dark-theme and light-theme on the parent body.
*/

/* ── Reset inside modal ─────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* The modal-text div already provides the container.
   These styles apply to everything rendered inside #modal-text */

/* ── Typography base ────────────────────── */
body, .mc-root {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  font-size: 0.88rem;
  line-height: 1.75;
  color: inherit; /* inherits from modal (light or dark) */
}

/* ── Headings ───────────────────────────── */
h2.mc-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  color: inherit;
}

h3.mc-subtitle {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mc-accent, #7c6af7);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--mc-border, rgba(255,255,255,0.08));
}

h4.mc-section-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mc-accent, #7c6af7);
  margin: 1.75rem 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
h4.mc-section-heading::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--mc-accent, #7c6af7);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Intro paragraph ────────────────────── */
p.mc-intro {
  font-size: 0.88rem;
  line-height: 1.78;
  color: inherit;
  margin-bottom: 1.5rem;
  opacity: 0.88;
}

p.mc-body {
  font-size: 0.85rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  opacity: 0.85;
}

/* ── Skill item grid ────────────────────── */
.mc-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mc-skill-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--mc-card, rgba(255,255,255,0.04));
  border: 1px solid var(--mc-border, rgba(255,255,255,0.07));
  transition: background 0.2s ease, border-color 0.2s ease;
}
.mc-skill-item:hover {
  background: var(--mc-card-hover, rgba(255,255,255,0.07));
  border-color: var(--mc-border-hover, rgba(124,106,247,0.3));
}

.mc-skill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--mc-accent-glow, rgba(124,106,247,0.12));
  border: 1px solid var(--mc-accent-border, rgba(124,106,247,0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--mc-accent, #7c6af7);
}

.mc-skill-body { flex: 1; min-width: 0; }

.mc-skill-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: inherit;
  margin-bottom: 0.2rem;
}

.mc-skill-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  opacity: 0.75;
}

.mc-skill-desc code {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.72rem;
  background: var(--mc-code-bg, rgba(124,106,247,0.12));
  border: 1px solid var(--mc-accent-border, rgba(124,106,247,0.2));
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  color: var(--mc-accent, #7c6af7);
}

/* ── Cert / highlight badge ─────────────── */
.mc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mc-accent, #7c6af7);
  background: var(--mc-accent-glow, rgba(124,106,247,0.12));
  border: 1px solid var(--mc-accent-border, rgba(124,106,247,0.25));
  border-radius: 100px;
  padding: 0.22rem 0.7rem;
  margin-bottom: 1.25rem;
  width: fit-content;
}

/* ── Blog layout ────────────────────────── */
.mc-blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.mc-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mc-accent, #7c6af7);
  background: var(--mc-accent-glow, rgba(124,106,247,0.12));
  border: 1px solid var(--mc-accent-border, rgba(124,106,247,0.25));
  border-radius: 4px;
  padding: 0.18rem 0.55rem;
}

.mc-date {
  font-size: 0.7rem;
  opacity: 0.5;
  font-family: 'Space Mono', monospace;
}

/* ── Inline code & pre blocks ───────────── */
code {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  background: var(--mc-code-bg, rgba(124,106,247,0.1));
  border: 1px solid var(--mc-accent-border, rgba(124,106,247,0.18));
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  color: var(--mc-accent, #7c6af7);
}

pre {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  background: var(--mc-code-bg, rgba(0,0,0,0.25));
  border: 1px solid var(--mc-border, rgba(255,255,255,0.07));
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.6;
}

/* ── Divider ────────────────────────────── */
.mc-divider {
  height: 1px;
  background: var(--mc-border, rgba(255,255,255,0.08));
  margin: 1.5rem 0;
}

/* ── Links ──────────────────────────────── */
a.mc-link {
  color: var(--mc-accent, #7c6af7);
  text-decoration: none;
  border-bottom: 1px solid var(--mc-accent-border, rgba(124,106,247,0.35));
  padding-bottom: 0.05rem;
  transition: border-color 0.2s, opacity 0.2s;
}
a.mc-link:hover {
  border-color: var(--mc-accent, #7c6af7);
  opacity: 0.85;
}

/* ── Step / numbered list ───────────────── */
.mc-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.mc-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.mc-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mc-accent-glow, rgba(124,106,247,0.15));
  border: 1px solid var(--mc-accent-border, rgba(124,106,247,0.3));
  color: var(--mc-accent, #7c6af7);
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.mc-step-body {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.65;
  opacity: 0.85;
}
.mc-step-body strong {
  opacity: 1;
  font-weight: 700;
  color: inherit;
}

/* ── Light theme variable overrides ─────── */
/* These kick in when the parent body has .light-theme.
   Because the modal content is loaded as innerHTML, it inherits
   the modal's color from CSS variables set on :root in style.css.
   We add extra specificity for code/cards here. */
body.light-theme .mc-skill-item,
body.light-theme .mc-step-num,
body.light-theme .mc-badge,
body.light-theme .mc-tag {
  --mc-card:         rgba(0,0,0,0.03);
  --mc-card-hover:   rgba(91,72,232,0.06);
  --mc-border:       rgba(0,0,0,0.08);
  --mc-border-hover: rgba(91,72,232,0.25);
  --mc-accent:       #5b48e8;
  --mc-accent-glow:  rgba(91,72,232,0.1);
  --mc-accent-border:rgba(91,72,232,0.22);
}

/* Responsive inside modal */
@media (max-width: 500px) {
  .mc-skill-item { flex-direction: column; gap: 0.5rem; }
  .mc-skill-icon { width: 28px; height: 28px; font-size: 0.75rem; }
}
