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

:root {
  --undime-blue: #003f8a;
  --undime-light: #0066cc;
  --undime-accent: #f5a623;
  --undime-green: #2d9c6e;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #8896a5;
  --border: #dde3ec;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);
  --radius: 12px;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, var(--undime-blue) 0%, #001f5c 100%);
  color: #fff;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.header-inner { position: relative; z-index: 1; }
.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
.logo-undime {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.5px;
}
.logo-divider {
  font-size: 1.5rem;
  opacity: .4;
}
.logo-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: .85;
}
.header-desc {
  font-size: .95rem;
  opacity: .65;
  font-weight: 300;
}

/* ── Timeline wrapper ── */
.timeline-wrapper {
  padding: 3rem 1.5rem 5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Timeline track ── */
.timeline-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-track::before {
  content: '';
  position: absolute;
  left: 90px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--undime-blue), var(--undime-light), var(--undime-accent));
  border-radius: 2px;
}

/* ── Year item ── */
.year-item {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
  cursor: pointer;
}

.year-item:hover .year-card {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: var(--undime-light);
}

.year-item:hover .year-bubble {
  background: var(--undime-light);
  transform: scale(1.1);
}

/* Year bubble (left side) */
.year-bubble {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--undime-blue);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .5px;
  transition: background var(--transition), transform var(--transition);
  position: relative;
  z-index: 2;
  margin-left: 60px;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--undime-blue);
}

.year-bubble.future {
  background: var(--text-muted);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--text-muted);
}
.year-item:hover .year-bubble.future {
  background: var(--text-secondary);
}

/* Connector line between bubble and card */
.year-connector {
  flex-shrink: 0;
  height: 2px;
  width: 24px;
  background: var(--border);
  align-self: center;
  transition: background var(--transition);
}
.year-item:hover .year-connector {
  background: var(--undime-light);
}

/* Card */
.year-card {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: .4rem 0;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.year-card.future {
  background: #f9fafc;
  border-style: dashed;
}

.card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-preview {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-top: .25rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-badge {
  display: inline-block;
  margin-top: .4rem;
  font-size: .7rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #e8f0fe;
  color: var(--undime-blue);
  letter-spacing: .3px;
  width: fit-content;
}

.card-badge.milestone {
  background: #fff3cd;
  color: #7a5000;
}

.card-future-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Milestone years — accent color ── */
.year-item.milestone .year-bubble {
  background: var(--undime-accent);
  color: #1a1a00;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--undime-accent);
}
.year-item.milestone:hover .year-bubble {
  background: #d4901f;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 60, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: 18px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97);
  transition: transform var(--transition);
  overflow: hidden;
}
.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
.modal-close:hover { background: rgba(255,255,255,.3); }

.modal-header {
  background: linear-gradient(135deg, var(--undime-blue), var(--undime-light));
  color: #fff;
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
  flex-shrink: 0;
}

.modal-year {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .7;
  display: block;
  margin-bottom: .3rem;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.modal-body {
  padding: 1.5rem 2rem 2rem;
  overflow-y: auto;
  flex: 1;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.modal-body p { margin-bottom: .85rem; }
.modal-body p:last-child { margin-bottom: 0; }

.modal-body .detail-label {
  display: block;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--undime-blue);
  margin-bottom: .25rem;
  margin-top: 1rem;
}
.modal-body .detail-label:first-child { margin-top: 0; }

.modal-body .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .25rem;
}
.modal-body .tag {
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #e8f0fe;
  color: var(--undime-blue);
}

.modal-body .future-note {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.modal-body .future-note span {
  display: block;
  font-size: 2.5rem;
  margin-bottom: .75rem;
}

/* Milestone header variant */
.modal-header.milestone {
  background: linear-gradient(135deg, #7a5000, var(--undime-accent));
}
.modal-header.future {
  background: linear-gradient(135deg, #4a5568, #718096);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .timeline-track::before { left: 50px; }
  .year-bubble { width: 48px; height: 48px; margin-left: 26px; font-size: .65rem; }
  .year-connector { width: 16px; }
  .card-title { font-size: .88rem; }
  .modal-header { padding: 1.25rem 1.25rem 1rem; }
  .modal-body { padding: 1.25rem; }
}
