/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #1a5276;
  --navy-dark: #0d2b3e;
  --navy-light: #2471a3;
  --bg: #f7f9fb;
  --white: #ffffff;
  --text: #2c3e50;
  --text-light: #5d6d7e;
  --border: #dce4ea;
  --accent: #2e86c1;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-dark);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-name {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nav-links a.active {
  color: #fff;
  border-bottom: 2px solid rgba(255,255,255,0.7);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 24px 72px;
}
.hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.hero .tagline {
  font-size: 20px;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 20px;
}
.hero .location {
  font-size: 15px;
  opacity: 0.85;
}
.hero .location a {
  color: rgba(255,255,255,0.9);
}
.hero-cta {
  margin-top: 24px;
}
.btn-download {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 32px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-download--hero {
  background: #fff;
  color: var(--navy);
}
.btn-download--contact {
  background: var(--navy);
  color: #fff;
}
.resume-hash {
  margin-top: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.3px;
}
.resume-hash--hero {
  color: rgba(255,255,255,0.5);
}
.resume-hash--contact {
  color: #999;
}

/* ── Sections ── */
section {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px;
}
section h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* ── About ── */
.about-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  max-width: 750px;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.skill-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: 6px;
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.skill-card:hover {
  box-shadow: 0 4px 12px rgba(26,82,118,0.1);
  transform: translateY(-2px);
}
.skill-card h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--navy);
  margin-bottom: 8px;
}
.skill-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ── Experience ── */
.job {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 16px;
}
.job-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.job h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.job .dates {
  font-size: 14px;
  color: var(--text-light);
  white-space: nowrap;
}
.job .company {
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 12px;
}
.job ul {
  padding-left: 20px;
}
.job li {
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}
.job-context {
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-light);
}

/* ── Lab/Side Work ── */
.lab-entry {
  margin-bottom: 16px;
}
.lab-entry h3 {
  margin-bottom: 8px;
}
.lab-entry p {
  font-size: 15px;
  line-height: 1.6;
}

/* ── Portfolio ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.portfolio-card {
  background: linear-gradient(135deg, #f0f6fb 0%, var(--white) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 6px;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.15s, border-left-color 0.2s;
  display: block;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.portfolio-card:hover {
  box-shadow: 0 6px 20px rgba(26,82,118,0.15);
  transform: translateY(-3px);
  border-left-color: var(--accent);
}
.portfolio-card h3 {
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 8px;
}
.portfolio-card .tech {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.portfolio-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 12px;
}
.portfolio-card .view-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.2s;
}
.portfolio-card:hover .view-link {
  color: var(--navy);
}
.portfolio-card__content {
  position: relative;
  z-index: 1;
}
.portfolio-card__chart {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.portfolio-series-header {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--navy);
  margin: 40px 0 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
}
.portfolio-card .part-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  background: var(--navy);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
  margin-right: 6px;
}
.portfolio-card .part-label--ransomware {
  background: #c0392b;
}
.portfolio-card .part-label--all-sizes {
  background: #138d75;
}
.portfolio-card .part-label--small-biz {
  background: #b7770a;
}
.version-tag {
  font-size: 15px;
  color: #777;
  font-weight: 600;
}
.version-tag--current {
  color: var(--navy);
}

/* ── Certs ── */
.cert-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid #27ae60;
  border-radius: 6px;
  padding: 20px 28px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.cert-badge {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}
.cert-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cert-item .cert-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.cert-item .cert-date {
  font-size: 14px;
  color: var(--text-light);
}

/* ── Education ── */
.education-note {
  font-size: 15px;
}

/* ── Contact ── */
.contact-grid {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
}
.contact-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.contact-list li {
  font-size: 16px;
  padding: 8px 0;
}
.contact-list a {
  color: var(--accent);
  text-decoration: none;
}
.contact-list a:hover {
  text-decoration: underline;
}
.contact-label {
  display: block;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 2px;
}
.contact-value {
  font-size: 16px;
  color: var(--text);
}
.contact-cta {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--text-light);
  max-width: 900px;
  margin: 0 auto;
}

/* ── Earlier roles ── */
.earlier-roles {
  margin-top: 16px;
}
.earlier-roles summary {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  padding: 8px 0;
}
.earlier-roles summary:hover {
  color: var(--accent);
}
.earlier-roles-note {
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
  padding: 8px 0;
}
.early-role {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.early-role:last-child {
  border-bottom: none;
}
.early-role .job-top {
  margin-bottom: 4px;
}
.early-role h4 {
  font-size: 15px;
  font-weight: 700;
}
.early-role .company {
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 4px;
}
.early-role p {
  font-size: 14px;
  color: var(--text-light);
}

/* ── Focus ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 32px; }
  .hero .tagline { font-size: 17px; }
  section { padding: 40px 20px; }
  .job-top { flex-direction: column; gap: 2px; }
}
