/* ═══════════════════════════════════════════════════════════
   CIP 1101 — Web Design & Development
   Shared Portfolio Stylesheet
   Used by: Lect2.html, Lect3.html (Prelims)
═══════════════════════════════════════════════════════════ */

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

body {
  background: #f8f7f4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
}

a { text-decoration: none; color: inherit; }

/* ── Top stripe ── */
.top-stripe { background: #7f1d1d; height: 6px; width: 100%; }

/* ── Sticky nav bar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e8e4dc;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  padding: 0.6rem 1.5rem;
}

.navbar-inner {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #991b1b;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  font-family: inherit;
}
.back-btn:hover { background: #7f1d1d; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #aaa;
}
.breadcrumb span { color: #ccc; }
.breadcrumb .current { color: #555; font-weight: 600; }

.lect-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

/* ── Header ── */
header { background: #991b1b; }
.header-inner { max-width: 52rem; margin: 0 auto; padding: 2.5rem 1.5rem 2rem; }

.header-top {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.header-icon {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
}

.header-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.3rem;
}

.header-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.header-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.35rem;
}

.header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pill {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
  border-radius: 9999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Divider ── */
.divider-bar {
  background: #e8e4dc;
  border-bottom: 1px solid #d6d0c6;
  padding: 0.5rem 1.5rem;
}
.divider-inner {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.divider-text {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* ── Main ── */
main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Lecture part headings ── */
.part-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: #991b1b;
  border-radius: 8px;
  margin-bottom: -0.5rem;
}
.part-heading h2 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.part-num {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Topic card ── */
.card {
  background: #ffffff;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.card-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #f0ece4;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fafaf8;
}

.card-icon {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
}

.card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }

/* ── Note / explanation text ── */
.note {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.65;
}

.note code {
  background: #f3f1ec;
  border: 1px solid #e0dbd0;
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: #991b1b;
}

/* ── Code block ── */
.code-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

pre {
  background: #1e1e2e;
  border-radius: 7px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #cdd6f4;
}

.token-tag    { color: #f38ba8; }
.token-attr   { color: #fab387; }
.token-val    { color: #a6e3a1; }
.token-cmt    { color: #6c7086; font-style: italic; }
.token-txt    { color: #cdd6f4; }
.token-prop   { color: #89dceb; }
.token-kw     { color: #cba6f7; }
.token-str    { color: #a6e3a1; }
.token-sel    { color: #89b4fa; }

/* ── Live output ── */
.output-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.output-box {
  background: #fdfdfc;
  border: 1px solid #e8e4dc;
  border-radius: 7px;
  padding: 1rem 1.15rem;
}

/* Output content resets for the demo area */
.output-box h1 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin-bottom: 0.3rem; }
.output-box h2 { font-size: 1.25rem; font-weight: 700; color: #1a1a2e; margin-bottom: 0.25rem; }
.output-box h3 { font-size: 1.05rem; font-weight: 600; color: #1a1a2e; margin-bottom: 0.2rem; }
.output-box h4 { font-size: 0.9rem;  font-weight: 600; color: #1a1a2e; margin-bottom: 0.2rem; }
.output-box h5 { font-size: 0.8rem;  font-weight: 600; color: #555;    margin-bottom: 0.2rem; }
.output-box h6 { font-size: 0.72rem; font-weight: 600; color: #888;    margin-bottom: 0.2rem; }
.output-box p  { font-size: 0.85rem; color: #444; line-height: 1.6; margin-bottom: 0.35rem; }
.output-box a  { color: #1d4ed8; text-decoration: underline; font-size: 0.85rem; }
.output-box nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.output-box hr  { border: none; border-top: 1px solid #e0dbd0; margin: 0.5rem 0; }
.output-box figure { display: inline-block; }
.output-box figure img { max-width: 100%; border-radius: 6px; max-height: 180px; object-fit: cover; }
.output-box figcaption { font-size: 0.72rem; color: #888; margin-top: 0.3rem; font-style: italic; }
.output-box aside { background: #eff6ff; border-left: 3px solid #3b82f6; border-radius: 4px; padding: 0.6rem 0.85rem; }
.output-box aside h4 { color: #1d4ed8; font-size: 0.82rem; margin-bottom: 0.2rem; }
.output-box aside p  { color: #1e3a8a; font-size: 0.78rem; margin: 0; }
.output-box footer { background: #f8f7f4; border-top: 1px solid #e8e4dc; border-radius: 4px; padding: 0.6rem 0.85rem; }
.output-box footer p { font-size: 0.78rem; color: #555; margin: 0; }
.output-box section { border: 1px dashed #d1d5db; border-radius: 6px; padding: 0.75rem; }
.output-box article { border: 1px dashed #d1d5db; border-radius: 6px; padding: 0.75rem; }
.output-box header  { background: #f8f7f4; border-bottom: 1px solid #e8e4dc; border-radius: 4px 4px 0 0; padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; }
.output-box blockquote {
  border-left: 4px solid #991b1b;
  background: #fff5f5;
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: #555;
  font-style: italic;
  line-height: 1.65;
}
.output-box mark { background: #fef08a; padding: 0.05rem 0.2rem; border-radius: 2px; }
.output-box code { background: #f3f1ec; border: 1px solid #e0dbd0; border-radius: 3px; padding: 0.1rem 0.35rem; font-family: 'Courier New', monospace; font-size: 0.78rem; color: #991b1b; }
.output-box kbd  { background: #1e1e2e; color: #cdd6f4; border-radius: 4px; padding: 0.1rem 0.4rem; font-family: 'Courier New', monospace; font-size: 0.78rem; border: 1px solid #444; }
.output-box samp { background: #f0fdf4; color: #15803d; border-radius: 3px; padding: 0.1rem 0.35rem; font-family: 'Courier New', monospace; font-size: 0.78rem; border: 1px solid #bbf7d0; }
.output-box sup  { font-size: 0.65rem; vertical-align: super; color: #991b1b; font-weight: 600; }
.output-box sub  { font-size: 0.65rem; vertical-align: sub;   color: #1d4ed8; font-weight: 600; }
.output-box u    { text-decoration: underline; }
.output-box ins  { text-decoration: underline; color: #059669; }
.output-box dfn  { font-style: italic; color: #7e22ce; }
.output-box cite { font-style: italic; color: #0369a1; }
.output-box i    { font-style: italic; }
.output-box pre  { background: #1e1e2e; border-radius: 6px; padding: 0.75rem 1rem; font-size: 0.78rem; color: #cdd6f4; white-space: pre; }

/* ── Info callout ── */
.callout {
  display: flex;
  gap: 0.65rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 0.75rem 1rem;
}
.callout-icon { flex-shrink: 0; margin-top: 1px; }
.callout p { font-size: 0.78rem; color: #78350f; line-height: 1.55; margin: 0; }

/* ── Two-column compare ── */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.compare-cell {
  border: 1px solid #e8e4dc;
  border-radius: 7px;
  overflow: hidden;
}
.compare-cell-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  background: #f8f7f4;
  border-bottom: 1px solid #e8e4dc;
}
.compare-cell-label.old { color: #b91c1c; }
.compare-cell-label.new { color: #059669; }
.compare-cell pre { border-radius: 0; }

/* ── Page footer ── */
.page-footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
}
.page-footer p { font-size: 0.7rem; color: #bbb; }

@media (max-width: 600px) {
  .header-title { font-size: 1.4rem; }
  .compare { grid-template-columns: 1fr; }
  .breadcrumb { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   LECT 1 — Web Design Components
═══════════════════════════════════════════════════════════ */

/* Sub-section headings inside cards (Significance / Best Practices / etc.) */
.lect1-sub {
  font-size: 0.7rem;
  font-weight: 700;
  color: #7f1d1d;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #fecaca;
}

/* Website screenshot placeholder */
.website-screenshot {
  width: 100%;
  display: block;
  border: 1px solid #e8e4dc;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f3ef;
  min-height: 180px; /* reserves space until user adds the image */
}

/* "Bad Example" card variant */
.card-bad { border-color: #fca5a5; }
.card-bad .card-header { background: #fff5f5; }
.card-bad .card-icon   { background: #fef2f2; border-color: #fca5a5; }

/* Lists inside lect1 card bodies */
.lect1-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.lect1-list li {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.65;
}

.portfolio-bar {
    background: #7f1d1d;
    padding: 0.45rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
}
.portfolio-bar a {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    opacity: 0.9;
}
.portfolio-bar a:hover { opacity: 1; }
.portfolio-exam-badge {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
}