@tailwind base;
@tailwind components;
@tailwind utilities;

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

body {
  background: #FFF8E7;
  color: #000000;
  font-family: 'Noto Sans SC', 'Noto Sans', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.timeline-wrapper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== Header ===== */
.header {
  padding: 48px 0 32px;
  border-bottom: 3px solid #000;
  margin-bottom: 0;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.header-tag {
  border: 2px solid #000;
  padding: 10px 16px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.4;
}

.header-tag span {
  display: block;
  font-family: 'Noto Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #000;
}

.header-title {
  flex: 1;
}

.title-en {
  font-family: 'Noto Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1.2;
}

.title-en-large {
  font-family: 'Playfair Display', serif;
  font-size: 62px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 6px;
}

.title-cn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.3;
  margin-top: 4px;
}

/* ===== Tags Bar ===== */
.tags-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 0 24px;
  border-bottom: 1px solid #000;
  margin-bottom: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  line-height: 1.4;
  border-radius: 0;
  white-space: nowrap;
}

/* Allow multi-line tags on mobile */
.tag br {
  display: none;
}

/* ===== Timeline - Two Column Layout ===== */
.timeline {
  border-bottom: 2px solid #000;
}

/* Group: year (left) + events (right) on same row */
.tl-group {
  display: grid;
  grid-template-columns: min-content 1fr;
  border-bottom: 1px solid #000;
}

/* Year column - black background */
.tl-year {
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 16px;
  line-height: 1.8;
  letter-spacing: 1px;
  display: flex;
  align-items: flex-start;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* Events column - white background */
.tl-events {
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
}

/* Individual event row */
.tl-event {
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.8;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid #ddd;
}

.tl-event:last-child {
  border-bottom: none;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 9px;
}

/* Remove white border from last year block */
.tl-group:last-child .tl-year {
  border-bottom: none;
}

/* Background event rows - full width, black background */
.tl-bg {
  background: #000;
  color: #fff;
  padding: 14px 24px;
  font-size: 17px;
  line-height: 1.9;
  border-bottom: 1px solid #000;
  text-align: center;
}

/* ===== Typography refinements ===== */
@media (max-width: 768px) {
  .timeline-wrapper {
    padding: 0 16px;
  }

  .header {
    padding: 28px 0 20px;
  }

  .header-inner {
    flex-direction: row;
    gap: 16px;
  }

  .header-tag {
    padding: 8px 12px;
  }

  .header-tag span {
    font-size: 10px;
  }

  .title-en {
    font-size: 13px;
    letter-spacing: 2px;
  }

  .title-en-large {
    font-size: 36px;
    letter-spacing: 3px;
  }

  .title-cn {
    font-size: 18px;
  }

  .tags-bar {
    gap: 4px;
    padding: 14px 0 16px;
  }

  .tag {
    font-size: 10px;
    padding: 4px 10px;
  }

  /* Show multi-line on mobile */
  .tag br {
    display: inline;
  }

  .tl-group {
    grid-template-columns: min-content 1fr;
  }

  .tl-year {
    font-size: 13px;
    padding: 12px 12px;
    line-height: 1.7;
  }

  .tl-event {
    font-size: 12px;
    padding: 10px 14px;
    line-height: 1.7;
  }

  .tl-bg {
    font-size: 15px;
    padding: 10px 16px;
    line-height: 1.7;
  }

  .dot {
    width: 6px;
    height: 6px;
    margin-top: 7px;
  }
}

@media (max-width: 480px) {
  .title-en-large {
    font-size: 28px;
  }

  .title-cn {
    font-size: 16px;
  }

  .tags-bar {
    gap: 3px;
  }

  .tag {
    font-size: 9px;
    padding: 3px 7px;
  }

  .tl-group {
    grid-template-columns: min-content 1fr;
  }

  .tl-year {
    font-size: 12px;
    padding: 10px 8px;
    letter-spacing: 0.5px;
    line-height: 1.7;
  }

  .tl-event {
    font-size: 11px;
    padding: 8px 10px;
  }

  .tl-bg {
    font-size: 13px;
    padding: 8px 12px;
  }
}