/* =========================================================
   William Librata — Resume Website
   Palette: deep forest green, warm cream/slate, marigold
   accent (primary), soft coral accent (secondary / hover)
   ========================================================= */

:root {
  --color-navy-900: #1b3a2b;
  --color-navy-800: #234f3a;
  --color-slate-700: #2b2b2b;
  --color-slate-500: #6b6357;
  --color-slate-300: #ded7c9;
  --color-slate-100: #f1ede4;
  --color-white: #ffffff;
  --color-bg: #fbf9f4;
  --color-accent: #f4a300;
  --color-accent-dark: #9c5b00;
  --color-accent-contrast: var(--color-navy-900);
  --color-accent-secondary: #d96a4c;
  --color-coral-dark: #b6503a;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1080px;
  --radius: 6px;
  --shadow-card: 0 1px 3px rgba(27, 58, 43, 0.08), 0 1px 2px rgba(27, 58, 43, 0.06);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-slate-700);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--color-navy-900);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

a:hover {
  color: var(--color-coral-dark);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy-900);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--color-accent-secondary);
  outline-offset: 2px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--color-navy-900);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}

.brand {
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--color-slate-300);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  width: 42px;
  height: 38px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  margin: 0 auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-nav ul {
  display: flex;
  gap: 1.25rem;
}

.primary-nav a {
  color: var(--color-slate-300);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--color-white);
  border-bottom-color: var(--color-accent);
}

.nav-print-btn {
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.btn-primary:hover {
  background: var(--color-navy-900);
  color: var(--color-accent);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-navy-900);
}

.btn-secondary:hover {
  background: var(--color-slate-100);
  color: var(--color-navy-900);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--color-white);
}

.header-inner .btn-outline {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.header-inner .btn-outline:hover {
  background: rgba(217, 106, 76, 0.2);
  border-color: var(--color-accent-secondary);
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--color-navy-900) 0%, var(--color-navy-800) 100%);
  color: var(--color-white);
  padding: 4.75rem 0 3.75rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(217, 106, 76, 0.35) 0%, rgba(217, 106, 76, 0) 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-slate-300);
  margin-bottom: 0.75rem;
}

.hero h1 {
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.hero-title-rule {
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  opacity: 0.6;
}

.hero-summary {
  color: var(--color-slate-300);
  font-size: 1.08rem;
  max-width: 600px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
}

.hero-badges li {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-slate-300);
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.hero-actions {
  margin: 2rem 0 1rem;
}

.hero-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-actions-social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.hero-social-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-slate-500);
}

.hero-social-link {
  color: var(--color-slate-300);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 1px;
}

.hero-social-link span {
  font-size: 0.8em;
}

.hero-social-link:hover,
.hero-social-link:focus-visible {
  color: var(--color-white);
  border-bottom-color: var(--color-accent);
}

.hero .btn-outline {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero .btn-outline:hover {
  background: rgba(217, 106, 76, 0.2);
  border-color: var(--color-accent-secondary);
}

.print-hint {
  font-size: 0.85rem;
  color: var(--color-slate-300);
  margin: 0;
}

/* ---------- Sections ---------- */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--color-slate-100);
}

.section-rule {
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin: 0 0 1.75rem;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--color-white);
  border-radius: var(--radius);
  border-top: 3px solid var(--color-accent-secondary);
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(27, 58, 43, 0.14), 0 2px 6px rgba(27, 58, 43, 0.08);
}

.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.skill-card h3::before {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--color-accent-secondary);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-list li {
  background: var(--color-slate-100);
  color: var(--color-navy-900);
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--color-slate-300);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tag-list li:hover {
  background: rgba(217, 106, 76, 0.14);
  border-color: var(--color-accent-secondary);
  color: var(--color-coral-dark);
}

/* ---------- Experience ---------- */
.job {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--color-slate-300);
}

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

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

.job-org {
  color: var(--color-slate-500);
  font-weight: 500;
  margin: 0;
}

.job-dates {
  color: var(--color-accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  margin: 0;
}

.job-context {
  font-style: italic;
  color: var(--color-slate-500);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.job-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.45rem;
}

.job-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.edu-group h3 {
  margin-bottom: 1rem;
}

.edu-list > li {
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-slate-300);
}

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

.edu-title {
  display: block;
  font-weight: 600;
  color: var(--color-navy-900);
}

.edu-org {
  display: block;
  color: var(--color-slate-500);
  font-size: 0.92rem;
}

.edu-date {
  display: block;
  color: var(--color-accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.edu-sublist {
  margin-top: 0.5rem;
}

.edu-sublist li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--color-slate-500);
  margin-bottom: 0.25rem;
}

.edu-sublist li::before {
  content: "\2013";
  position: absolute;
  left: 0;
}

/* ---------- Contact ---------- */
.contact-lead {
  font-size: 1.05rem;
}

.contact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-slate-300);
}

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

.contact-label {
  min-width: 90px;
  font-weight: 600;
  color: var(--color-navy-900);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-900);
  color: var(--color-slate-300);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.85rem;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1rem;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

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

/* ---------- Print styles (PDF export) ---------- */
@media print {
  @page {
    margin: 16mm 14mm;
  }

  body {
    background: #ffffff;
    color: #111827;
    font-size: 11.5pt;
  }

  .no-print,
  .site-header,
  .hero-actions,
  .print-hint,
  .site-footer {
    display: none !important;
  }

  .hero {
    background: none;
    color: #111827;
    padding: 0 0 1rem;
  }

  .hero::before {
    display: none;
  }

  .hero-title {
    color: #111827;
  }

  .hero-title-rule {
    display: none;
  }

  .hero-summary,
  .eyebrow {
    color: #374151;
  }

  .hero-badges {
    gap: 0;
  }

  .hero-badges li {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-right: 0.6rem;
    color: #374151;
  }

  .hero-badges li::after {
    content: "\2022";
    margin-left: 0.6rem;
    color: #9ca3af;
  }

  .hero-badges li:last-child::after {
    content: "";
    margin: 0;
  }

  .section,
  .section-alt {
    background: none;
    padding: 0.75rem 0;
  }

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

  h1, h2, h3 {
    color: #111827;
  }

  .section-rule {
    background: #111827;
  }

  a {
    color: #111827;
    text-decoration: none;
  }

  .skills-grid {
    display: block;
  }

  .skill-card {
    background: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0.55rem;
    break-inside: avoid;
  }

  .skill-card h3 {
    display: inline;
    font-size: 11pt;
    font-weight: 700;
  }

  .skill-card h3::before {
    display: none;
  }

  .skill-card h3::after {
    content: ": ";
  }

  .tag-list {
    display: inline;
  }

  .tag-list li {
    display: inline;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 11pt;
    color: #111827;
  }

  .tag-list li:not(:last-child)::after {
    content: ", ";
  }

  .job {
    break-inside: avoid;
    border-bottom: 1px solid #d1d5db;
  }

  .job-dates {
    color: #111827;
  }

  section {
    break-inside: avoid-page;
  }
}
