/* ==========================================================
   THEME — edit these variables to reskin the whole resume.
   ========================================================== */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-primary: #b45309;   /* timeline line/dots, accents */
  --color-muted: #6b7280;
  --color-border: #e5e7eb;

  --font-heading: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --spacing-unit: 8px;
  --line-height-base: 1.6;
  --page-max-width: 800px;
}

/* ==========================================================
   BASE
   ========================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 3);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: var(--line-height-base);
  max-width: var(--page-max-width);
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

p {
  margin: calc(var(--spacing-unit) * 1) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* ==========================================================
   HEADER
   ========================================================== */
#resume-header {
  margin-bottom: calc(var(--spacing-unit) * 5);
}

#resume-header h1 {
  font-size: 2rem;
}

#resume-header .title {
  margin-top: calc(var(--spacing-unit) * 0.5);
  color: var(--color-muted);
  font-size: 1.1rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  padding: 0;
  margin-top: calc(var(--spacing-unit) * 2);
  font-size: 0.95rem;
  color: var(--color-muted);
}

.contact-list li {
  margin: 0;
}

/* ==========================================================
   SECTIONS
   ========================================================== */
main section {
  margin-bottom: calc(var(--spacing-unit) * 5);
}

section h2 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit) * 1);
  border-bottom: 1px solid var(--color-border);
}

/* ==========================================================
   TIMELINE
   ========================================================== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: calc(var(--spacing-unit) * 3.5);
  margin-bottom: calc(var(--spacing-unit) * 3.5);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* the connecting line */
.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: -28px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ==========================================================
   EXPERIENCE / EDUCATION ENTRY CONTENT
   ========================================================== */
.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 2);
}

.entry-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.entry-org {
  font-weight: 400;
  color: var(--color-muted);
}

.entry-date {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.timeline-content ul {
  list-style: disc;
  margin-top: calc(var(--spacing-unit) * 1);
  padding-left: calc(var(--spacing-unit) * 2.5);
}

.timeline-content li {
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}

/* ==========================================================
   SKILLS
   ========================================================== */
.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 1.5);
  padding: 0;
  margin: 0;
}

.skills-list li {
  margin: 0;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 1.25);
  font-size: 0.9rem;
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer {
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ==========================================================
   RESPONSIVE — single column fallback under ~600px
   ========================================================== */
@media (max-width: 600px) {
  body {
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2.5);
  }

  #resume-header h1 {
    font-size: 1.6rem;
  }

  .entry-header {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 0.25);
  }
}

/* ==========================================================
   PRINT — the connecting line/dots are decorative; degrade to
   a simple stacked list so nothing depends on them surviving.
   ========================================================== */
@media print {
  body {
    padding: 0;
    max-width: 100%;
  }

  .timeline-item {
    padding-left: 0;
  }

  .timeline-item::before,
  .timeline-marker {
    display: none;
  }

  .timeline-item {
    border-left: 2px solid var(--color-border);
    padding-left: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 2.5);
  }

  main section,
  .timeline-item {
    break-inside: avoid;
  }
}
