/* ═══════════════════════════════════════════════════════════════
   RESUME STYLESHEET
   Palette:  slate #1a1f2e | off-white #f7f5f0 | copper #c8873a
             mid-grey #8a8f9c | light-grey #e8e5df
   Type:     DM Serif Display (headers) | Inter (body)
═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --slate:       #1a1f2e;
  --slate-mid:   #2d3347;
  --off-white:   #f7f5f0;
  --copper:      #c8873a;
  --copper-dim:  #e8a85a;
  --grey-mid:    #8a8f9c;
  --grey-light:  #e8e5df;
  --grey-pale:   #f0eee9;
  --text-body:   #3a3f50;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:      6px;
  --transition:  250ms cubic-bezier(.4,0,.2,1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--off-white);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--copper);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--copper-dim); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Header / Hero ───────────────────────────────────────── */
.site-header {
  background: var(--slate);
  color: var(--off-white);
  padding: 3.5rem 2rem 3rem;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

/* Headshot */
.headshot-wrap {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--copper);
  background: var(--slate-mid);
  position: relative;
}

.headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.headshot-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--grey-mid);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  gap: .4rem;
}
.headshot-fallback svg { width: 56px; height: 56px; }

/* Header text */
.header-eyebrow {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: .5rem;
}

.name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  color: var(--off-white);
  line-height: 1.1;
  margin-bottom: .4rem;
}

.tagline {
  font-size: 1rem;
  font-weight: 300;
  color: var(--grey-mid);
  margin-bottom: 1.4rem;
}

/* Contact list */
.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  color: var(--grey-light);
}

.contact-icon {
  color: var(--copper);
  font-style: normal;
  line-height: 1;
  flex-shrink: 0;
}

.contact-list a {
  color: var(--grey-light);
}
.contact-list a:hover { color: var(--off-white); }

/* ── Main Grid ───────────────────────────────────────────── */
.main-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Section Labels ──────────────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--grey-light);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-section { /* each card */ }

/* About */
.about-text {
  font-size: .88rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* Skills */
.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.skill-name {
  font-size: .82rem;
  font-weight: 500;
  color: var(--slate);
  display: flex;
  justify-content: space-between;
}

.skill-bar-track {
  height: 4px;
  background: var(--grey-light);
  border-radius: 99px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--copper);
  border-radius: 99px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .8s cubic-bezier(.4,0,.2,1);
}
.skill-bar-fill.animate { transform: scaleX(1); }

/* Certifications */
.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.cert-item {
  padding-left: .9rem;
  border-left: 2px solid var(--copper);
}

.cert-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--slate);
  line-height: 1.3;
}

.cert-issuer {
  font-size: .75rem;
  color: var(--grey-mid);
  margin-top: .15rem;
}

/* Education */
.edu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-item {}

.edu-degree {
  font-size: .88rem;
  font-weight: 600;
  color: var(--slate);
  line-height: 1.3;
}

.edu-school {
  font-size: .82rem;
  color: var(--text-body);
  margin-top: .1rem;
}

.edu-year {
  font-size: .75rem;
  color: var(--grey-mid);
  margin-top: .1rem;
}

/* ── Timeline ────────────────────────────────────────────── */
.timeline-section {}

.timeline-heading {
  margin-bottom: .25rem;
}

.timeline-hint {
  font-size: .78rem;
  color: var(--grey-mid);
  margin-bottom: 1.8rem;
  font-style: italic;
}

.timeline {
  position: relative;
  padding-left: 1.6rem;
}

/* Vertical rail */
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: var(--grey-light);
}

/* ── Timeline Entry ──────────────────────────────────────── */
.timeline-entry {
  position: relative;
  margin-bottom: 1.2rem;
}

/* Dot on rail */
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 1.1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--grey-light);
  border: 2px solid var(--off-white);
  transition: background var(--transition), transform var(--transition);
}

.timeline-entry.is-open::before,
.timeline-entry:hover::before {
  background: var(--copper);
  transform: scale(1.25);
}

/* ── Entry Header (always visible, clickable) ── */
.entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--grey-light);
  transition: border-color var(--transition), box-shadow var(--transition);
  user-select: none;
}

.entry-header:hover {
  border-color: var(--copper);
  box-shadow: 0 2px 12px rgba(200,135,58,.12);
}

.timeline-entry.is-open .entry-header {
  border-color: var(--copper);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  box-shadow: 0 -2px 12px rgba(200,135,58,.08);
}

.entry-title-group {
  flex: 1;
  min-width: 0;
}

.entry-role {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--slate);
  line-height: 1.25;
}

.entry-company {
  font-size: .85rem;
  font-weight: 500;
  color: var(--copper);
  margin-top: .2rem;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .2rem;
  flex-shrink: 0;
}

.entry-dates {
  font-size: .75rem;
  color: var(--grey-mid);
  white-space: nowrap;
}

.entry-location {
  font-size: .72rem;
  color: var(--grey-mid);
}

.entry-toggle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grey-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
  margin-top: .15rem;
}

.timeline-entry.is-open .entry-toggle {
  background: var(--copper);
  transform: rotate(45deg);
}

.entry-toggle svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: var(--slate);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke var(--transition);
}

.timeline-entry.is-open .entry-toggle svg {
  stroke: white;
}

/* ── Entry Body (collapsible) ── */
.entry-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s ease;
  opacity: 0;
  background: white;
  border: 1px solid var(--copper);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.timeline-entry.is-open .entry-body {
  opacity: 1;
  /* max-height set dynamically via JS */
}

.entry-body-inner {
  padding: 1.1rem 1.1rem 1.2rem;
}

.entry-summary {
  font-size: .88rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: .9rem;
}

.entry-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.entry-bullets li {
  font-size: .84rem;
  color: var(--text-body);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.6;
}

.entry-bullets li::before {
  content: '▸';
  color: var(--copper);
  position: absolute;
  left: 0;
  top: .05em;
  font-size: .75em;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .9rem;
}

.tag {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--slate);
  background: var(--grey-pale);
  border: 1px solid var(--grey-light);
  padding: .2rem .55rem;
  border-radius: 99px;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid var(--grey-light);
  font-size: .78rem;
  color: var(--grey-mid);
}

.site-footer a { color: var(--grey-mid); }
.site-footer a:hover { color: var(--copper); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2rem 1.25rem 3rem;
  }

  .sidebar {
    position: static;
  }

  .contact-list {
    gap: .4rem 1.2rem;
  }
}

@media (max-width: 480px) {
  .site-header { padding: 2.5rem 1.25rem 2rem; }

  .entry-header {
    flex-wrap: wrap;
    gap: .6rem;
  }

  .entry-meta {
    align-items: flex-start;
    flex-direction: row;
    gap: .6rem;
  }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .timeline-entry .entry-body {
    max-height: none !important;
    opacity: 1 !important;
  }

  .entry-toggle { display: none; }
  .site-footer a { display: none; }

  .sidebar { position: static; }

  .main-grid {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
  }

  .site-header {
    background: var(--slate) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .skill-bar-fill { transition: none; }
  .entry-body { transition: none; }
  .entry-toggle { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   UNIFIED TIMELINE GROUPS & TYPE BADGES
═══════════════════════════════════════════════════════════════ */

/* Group wrapper */
.timeline-group {
  margin-bottom: 2.8rem;
}

/* Group heading — sits above the entries in each section */
.timeline-group-heading {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--grey-light);
  /* Nudge left to align with the rail */
  margin-left: -1.6rem;
  padding-left: 1.6rem;
}

/* Type badge on each entry header */
.entry-badge {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border-radius: 99px;
  flex-shrink: 0;
  margin-top: .2rem;
}

[data-type="project"]       .entry-badge { background: #e8f0fe; color: #3b5bdb; }
[data-type="certification"] .entry-badge { background: #fff3e0; color: #c8873a; }
[data-type="education"]     .entry-badge { background: #e8f5e9; color: #2e7d32; }
[data-type="job"]           .entry-badge { background: #f3e5f5; color: #7b1fa2; }

/* Link button inside expanded entry */
.entry-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--copper);
  border: 1px solid var(--copper);
  padding: .25rem .7rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.entry-link:hover {
  background: var(--copper);
  color: white;
  text-decoration: none;
}
