/* ============================================
   Ed Ferking — Resume Stylesheet
   Aesthetic: Editorial / refined professional
   Fonts: DM Serif Display (headings) + DM Sans (body)
   ============================================ */

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

:root {
  --navy:        #1a2e45;
  --navy-mid:    #2c4a6e;
  --steel:       #4a6fa5;
  --steel-light: #7a9cc4;
  --rule:        #c8d8e8;
  --ink:         #1e1e2e;
  --ink-mid:     #3a3a4e;
  --ink-soft:    #5a5a6e;
  --ink-muted:   #8a8a9e;
  --note-bg:     #f0f5fb;
  --note-border: #7a9cc4;
  --tag-bg:      #e8f0f8;
  --tag-text:    #2c4a6e;
  --page-bg:     #fafbfd;
  --white:       #ffffff;
  --serif:       'DM Serif Display', Georgia, serif;
  --sans:        'DM Sans', system-ui, sans-serif;
  --max-width:   880px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--steel);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--navy);
}

/* ── Page Container ── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 2.5rem;
  animation: fadeSlideDown 0.6s ease both;
}

/* ── Headshot ── */
.headshot {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 3px solid var(--rule);
  box-shadow: 0 0 0 1px var(--steel-light);
  filter: grayscale(100%);
  transition: box-shadow 0.3s ease, filter 0.3s ease;
}

.headshot:hover {
  box-shadow: 0 0 0 3px var(--steel);
  filter: grayscale(80%);
}

.header-center {
  flex: 1;
}

.name {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.title {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--steel);
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: right;
  white-space: nowrap;
}

.header-contact a {
  color: var(--ink-soft);
}

.header-contact a:hover {
  color: var(--navy);
}

/* ── Section ── */
.section {
  margin-bottom: 2.4rem;
  animation: fadeSlideUp 0.5s ease both;
}

.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.10s; }
.section:nth-child(3) { animation-delay: 0.15s; }
.section:nth-child(4) { animation-delay: 0.20s; }
.section:nth-child(5) { animation-delay: 0.25s; }

.section-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  color: var(--navy-mid);
  letter-spacing: 0.01em;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.2rem;
}

/* ── Summary ── */
.summary {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.8;
  max-width: 72ch;
}

.summary strong {
  color: var(--navy);
  font-weight: 500;
}

/* ── Competencies ── */
.competencies {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.competencies li {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--rule);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s;
}

.competencies li:hover {
  background: var(--rule);
  border-color: var(--steel-light);
}

/* ── Job ── */
.job {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.job:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.job-left {
  flex: 1;
}

.job-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contract-tag {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--steel);
  background: var(--tag-bg);
  border: 1px solid var(--rule);
  padding: 0.15rem 0.5rem;
  border-radius: 2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}

.job-company {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 300;
  margin-top: 0.1rem;
}

.job-dates {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-style: italic;
  white-space: nowrap;
  padding-top: 0.2rem;
  flex-shrink: 0;
}

.job-note {
  font-size: 0.83rem;
  color: var(--note-border);
  font-style: italic;
  background: var(--note-bg);
  border-left: 3px solid var(--note-border);
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 0 4px 4px 0;
}

.job-bullets {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.job-bullets li {
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.75;
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.3rem;
}

.job-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--steel-light);
  font-weight: 300;
}

.job-bullets li strong {
  color: var(--ink);
  font-weight: 500;
}

.job-bullets li.tech-line {
  color: var(--ink-muted);
  font-size: 0.82rem;
  margin-top: 0.4rem;
  font-style: italic;
}

.job-bullets li.tech-line::before {
  content: '';
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.skill-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--page-bg);
  align-items: baseline;
}

.skill-row:last-child {
  border-bottom: none;
}

.skill-row dt {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--navy-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.skill-row dd {
  font-size: 0.88rem;
  color: var(--ink-mid);
  font-weight: 300;
}

/* ── Education ── */
.edu-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.edu-row:last-child {
  border-bottom: none;
}

.edu-left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.edu-degree {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}

.edu-school {
  font-size: 0.83rem;
  color: var(--ink-soft);
  font-weight: 300;
}

.edu-dates {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-style: italic;
  white-space: nowrap;
  padding-top: 0.15rem;
  flex-shrink: 0;
}

/* ── Footer ── */
.footer {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.footer a {
  color: var(--ink-muted);
}

.footer a:hover {
  color: var(--navy);
}

/* ── Animations ── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Print ── */
@media print {
  body { background: white; }

  .page { padding: 0; max-width: 100%; }

  .header, .section { animation: none; }

  .headshot {
    box-shadow: none;
    border-color: #ccc;
    filter: grayscale(100%);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .job-bullets li::before { color: #888; }

  a { color: inherit; }

  .competencies li {
    border: 1px solid #ccc;
    background: none;
  }
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .page { padding: 1.5rem 1.2rem 3rem; }

  .header {
    flex-wrap: wrap;
    gap: 1.2rem;
  }

  .headshot {
    width: 80px;
    height: 80px;
  }

  .header-center { flex: 1; min-width: 160px; }

  .header-contact {
    width: 100%;
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
  }

  .name { font-size: 2rem; }

  .job-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .skill-row { grid-template-columns: 110px 1fr; }

  .edu-row { flex-direction: column; gap: 0.2rem; }
}
