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

/* ========================= */
/* VARIABLES */
/* ========================= */
:root {
  --bg: #ffffff;
  --bg2: #f5f4f0;
  --bg3: #eeece8;

  --text: #1a1a18;
  --text2: #5a5a56;
  --text3: #9a9a94;

  --border: rgba(0, 0, 0, 0.10);
  --border2: rgba(0, 0, 0, 0.18);

  --radius: 10px;
  --radius-lg: 14px;
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181816;
    --bg2: #222220;
    --bg3: #2c2c28;

    --text: #e8e8e2;
    --text2: #9a9a94;
    --text3: #5a5a56;

    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.14);
  }
}

/* ========================= */
/* BASE */
/* ========================= */
body {
  font-family: 'Georgia', serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  /* space for navbar */
  padding-top: 70px;
}

/* prevent overflow */
html, body {
  overflow-x: hidden;
}

/* ========================= */
/* LAYOUT */
/* ========================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 40px 60px;
}

/* ========================= */
/* TYPOGRAPHY */
/* ========================= */
h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 15px;
  color: var(--text3);
  margin-bottom: 28px;
  font-family: monospace;
}

/* ========================= */
/* TABS */
/* ========================= */
.top-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.phase-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 12px;
  font-family: monospace;
  cursor: pointer;
  transition: 0.2s;
}

.phase-btn:hover,
.phase-btn.active {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--text3);
}

.phase-btn.active {
  font-weight: 700;
}

/* ========================= */
/* PHASE */
/* ========================= */
.phase-card {
  display: none;
}

.phase-card.visible {
  display: block;
}

.phase-header {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.phase-title {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.phase-sub {
  font-size: 15px;
  color: var(--text2);
}

/* ========================= */
/* GRID SECTIONS */
/* ========================= */
.sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.container .section {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 20px;
  transition: 0.2s;
}

.container .section:hover {
  transform: translateY(-2px);
}

.container .section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: monospace;
  letter-spacing: 0.06em;
}

/* full-width section inside 2-col grid */
.section.full-col {
  grid-column: 1 / -1;
}

/* ========================= */
/* PHASE BADGE */
/* ========================= */
.phase-badge {
  display: inline-block;
  flex-shrink: 0;
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.03em;
}

/* ========================= */
/* ROLE CARD TEXT */
/* ========================= */
.role-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.role-meta {
  font-size: 13px;
  font-family: monospace;
}

/* ========================= */
/* PILLS */
/* ========================= */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text2);
  font-family: monospace;
}

/* pill colors */
.pill.math { background: #EEEDFE; color: #3C3489; }
.pill.code { background: #E1F5EE; color: #085041; }
.pill.tool { background: #E6F1FB; color: #0C447C; }
.pill.project { background: #FAEEDA; color: #633806; }
.pill.warn { background: #FCEBEB; color: #791F1F; }

/* dark pills */
@media (prefers-color-scheme: dark) {
  .pill.math { background: #26215C; color: #CECBF6; }
  .pill.code { background: #04342C; color: #9FE1CB; }
  .pill.tool { background: #042C53; color: #B5D4F4; }
  .pill.project { background: #412402; color: #FAC775; }
  .pill.warn { background: #501313; color: #F7C1C1; }
}

/* ========================= */
/* LIST */
/* ========================= */
.item-list {
  list-style: none;
}

.item-list li {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}

.item-list li:last-child {
  border-bottom: none;
}

/* ========================= */
/* WEEK GRID */
/* ========================= */
.week-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.week-card {
  background: var(--bg3);
  padding: 14px;
  border-radius: 8px;
}

.week-label {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 6px;
  font-family: monospace;
}

.week-text {
  font-size: 14px;
}

/* ========================= */
/* ROLES */
/* ========================= */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-card {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ========================= */
/* NAV BUTTONS */
/* ========================= */
.nav-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.nav-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: transparent;
  cursor: pointer;
}

.nav-btn.primary {
  font-weight: bold;
}

/* ========================= */
/* DOTS */
/* ========================= */
.progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--border2);
  border-radius: 50%;
}

.dot.active {
  width: 18px;
  border-radius: 4px;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

/* MOBILE */
@media (max-width: 600px) {

  h1 {
    font-size: 1.6rem;
  }

  .sections {
    grid-template-columns: 1fr;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .phase-header {
    flex-direction: column;
  }
}

/* TABLET */
@media (max-width: 1100px) {
  .container {
    max-width: 95%;
    padding: 20px 24px 40px;
  }
}
/* ========================= */
/* SPECIFICITY OVERRIDE      */
/* Fixes style.css conflict: */
/* .section { padding: 60px } */
/* at max-width: 900px        */
/* ========================= */
@media (max-width: 900px) {
  .container .section {
    padding: 14px !important;
  }
}