/* ===================================================
   internship_report.css — v2
   日月光 IT-ISC 實習報告
   字體最小值：14px
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&family=Noto+Sans+TC:wght@300;400;500&display=swap');

:root {
  /* Palette */
  --bg:            #f5f3ef;
  --bg-deep:       #ede9e3;
  --surface:       #ffffff;
  --surface-alt:   #faf9f7;
  --border:        #dedad3;
  --border-strong: #c8c3bb;

  /* Text */
  --text-main:     #18170f;
  --text-body:     #2e2c24;
  --text-muted:    #6d6860;
  --text-faint:    #9e9890;

  /* Accent — deep vermilion */
  --accent:        #b83025;
  --accent-hover:  #992519;
  --accent-light:  #fcf0ee;
  --accent-border: #e8b5b0;

  /* Tag bg */
  --mono-bg:       #eeebe5;

  /* Shadows — refined layering */
  --shadow-xs:     0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-card:   0 4px 24px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.05);

  /* Layout */
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --max-width:     880px;

  /* Typography */
  --font-serif: 'Noto Serif TC', serif;
  --font-sans:  'Noto Sans TC', sans-serif;
  --font-mono:  'IBM Plex Mono', monospace;

  /* Font scale — min 14px */
  --text-xs:   14px;
  --text-sm:   15px;
  --text-base: 16px;
  --text-md:   17px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  32px;
  --text-hero: clamp(2rem, 5.5vw, 3rem);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

p { margin-bottom: .85rem; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 500; color: var(--text-main); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .045em;
}

/* ── Centering ── */
.site-header,
.section-nav,
.report-main,
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ════════════════════════════════
   HEADER
   ════════════════════════════════ */
.site-header {
  padding-top: 64px;
  padding-bottom: 48px;
  position: relative;
}

/* decorative top stripe */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.header-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-bottom: 28px;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.header-meta span::before {
  content: '—';
  margin-right: 8px;
  color: var(--border-strong);
}
.header-meta span:first-child::before { display: none; }

.report-title {
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 36px;
  letter-spacing: -.02em;
  color: var(--text-main);
}

.report-title .accent {
  color: var(--accent);
  display: block;
}

/* info grid */
.header-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.info-block:nth-child(2n) { border-right: none; }
.info-block:nth-last-child(-n+2) { border-bottom: none; }

.info-block .label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
}

.info-block span:last-child {
  font-size: var(--text-sm);
  color: var(--text-body);
  font-weight: 400;
}

/* ════════════════════════════════
   STICKY NAV
   ════════════════════════════════ */
.section-nav {
  display: flex;
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.nav-btn {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 400;
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
  white-space: nowrap;
  margin-bottom: -1px;
  letter-spacing: .01em;
}

.nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-deep);
}

.nav-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
  background: var(--accent-light);
}

/* ════════════════════════════════
   MAIN
   ════════════════════════════════ */
.report-main {
  padding-top: 48px;
  padding-bottom: 80px;
}

.report-section { display: none; }
.report-section.active { display: block; }

/* ── Section Block ── */
.section-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s;
}

.section-block:hover {
  box-shadow: var(--shadow-card), 0 0 0 1px var(--border);
}

/* Block title */
.block-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  letter-spacing: -.01em;
}

.block-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
  letter-spacing: .06em;
  line-height: 1.5;
  flex-shrink: 0;
}

/* ════════════════════════════════
   CARD DECK
   ════════════════════════════════ */
.card-deck { position: relative; }

#learn > .card-deck {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

/* nav row */
.card-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.card-prev,
.card-next {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-base);
  color: var(--text-body);
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  line-height: 1;
  user-select: none;
}

.card-prev:hover,
.card-next:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: scale(1.05);
}

.card-prev:active,
.card-next:active { transform: scale(.96); }

.card-counter {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-left: 2px;
}

/* progress dots */
.card-dots {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background .2s, transform .2s;
  cursor: pointer;
  border: none;
  padding: 0;
}

.card-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* viewport */
.cards-viewport {
  position: relative;
  min-height: 160px;
}

.card { display: none; }
.card.active {
  display: block;
  animation: cardIn .28s cubic-bezier(.22,.68,0,1.1);
}
.card.exit {
  display: block;
  animation: cardOut .28s ease forwards;
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes cardOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-10px); }
}

/* card tag + title */
.card-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: .12em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-tag::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent-border);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: -.01em;
}

.card p {
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--text-body);
}

/* ════════════════════════════════
   PROGRESS LIST
   ════════════════════════════════ */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .18s, box-shadow .18s;
}

.progress-item:hover {
  border-color: var(--accent-border);
  box-shadow: 0 2px 12px rgba(184,48,37,.06);
}

.progress-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .05em;
}

.progress-item strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}

.progress-item p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ════════════════════════════════
   GROWTH GRID
   ════════════════════════════════ */
.growth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.growth-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.growth-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 4px 16px rgba(184,48,37,.08);
  transform: translateY(-2px);
}

/* top accent line */
.growth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s;
}

.growth-card:hover::before { opacity: 1; }

.growth-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: .12em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.growth-num::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--accent-border);
}

.growth-card h3 {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
  letter-spacing: -.01em;
  line-height: 1.4;
}

.growth-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.8;
}

/* ════════════════════════════════
   CLOSING QUOTE
   ════════════════════════════════ */
.closing-quote {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-main);
  border-left: 3px solid var(--accent);
  padding: 16px 0 16px 24px;
  margin-bottom: 20px;
  font-style: italic;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-right: 20px;
}

.closing-body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.85;
}

/* ════════════════════════════════
   FOOTER
   ════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-faint);
  font-size: var(--text-xs);
}

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */
@media (max-width: 640px) {
  .site-header,
  .section-nav,
  .report-main,
  .site-footer  { padding-left: 20px; padding-right: 20px; }

  .section-block,
  #learn > .card-deck { padding: 22px 20px; }

  .nav-btn { padding: 12px 14px; font-size: var(--text-xs); }
  .growth-grid { grid-template-columns: 1fr; }
  .info-block:nth-child(2n) { border-right: 1px solid var(--border); }
  .info-block { border-right: none; border-bottom: 1px solid var(--border); }
  .info-block:last-child { border-bottom: none; }
  .header-meta { gap: 0; flex-direction: column; }
  .header-meta span::before { display: none; }
}