/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --color-bg:             #ffffff;
  --color-surface:        #f5f8ff;
  --color-text:           #111827;
  --color-text-muted:     #6b7280;
  --color-accent:         #0055cc;
  --color-accent-light:   #eef3ff;
  --color-accent-border:  #c7d7f5;
  --color-border:         #e5e7eb;
  --color-role-bg:        #f5f8ff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max-width: 960px;
}

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

/* ─── Base Typography ────────────────────────────────────────── */
html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3 { line-height: 1.2; }

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

ul { list-style: none; }

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

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

/* ─── Header & Nav ───────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--color-accent);
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  letter-spacing: -0.2px;
}

nav ul {
  display: flex;
  gap: 1.75rem;
}

nav ul li a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color 0.15s;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--color-accent);
  text-decoration: none;
}

nav ul li a.active {
  font-weight: 600;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 0 2rem;
  align-items: center;
  padding: 2.25rem 0 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(150deg, var(--color-accent-light) 0%, #f8faff 55%, #ffffff 100%);
  border-bottom: 1px solid var(--color-accent-border);
  border-radius: 10px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  justify-self: center;
  background: var(--color-border);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px var(--color-accent-border), 0 4px 12px rgba(0, 85, 204, 0.15);
}

.avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: -0.5px;
}

.hero-text h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.2rem;
  color: var(--color-text);
}

.hero-text .subtitle {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hero-text .hero-pitch {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  max-width: none;
}

.hero-text .meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.open-to-work {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0, 85, 204, 0.3);
}

.btn-primary:hover {
  background: #003fa0;
  box-shadow: 0 2px 6px rgba(0, 85, 204, 0.4);
  text-decoration: none;
}

.btn-secondary {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

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

/* ─── Section Headings ───────────────────────────────────────── */
section { margin-bottom: 2rem; }

section h2 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-accent-border);
}

/* ─── Two-column resume body ─────────────────────────────────── */
.resume-body {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 0 2rem;
  align-items: start;
}

.resume-sidebar { min-width: 0; }
.resume-main    { min-width: 0; }

/* ─── Expertise ──────────────────────────────────────────────── */
.expertise-groups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.expertise-group {
  background: var(--color-surface);
  border: 1px solid var(--color-accent-border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.expertise-group h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.expertise-group ul li {
  font-size: 0.875rem;
  color: var(--color-text);
  padding: 0.15rem 0;
}

.expertise-group ul li::before {
  content: "–";
  color: var(--color-accent-border);
  margin-right: 0.5rem;
}

/* ─── Experience ─────────────────────────────────────────────── */
.employer {
  margin-bottom: 0.5rem;
}

.employer-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.employer-header strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.employer-header .location {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.employer-tenure {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.role {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--color-accent);
  margin-bottom: 1rem;
  background: var(--color-role-bg);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 3px rgba(0, 85, 204, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.role:last-child { margin-bottom: 0; }

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.role-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.role-dates {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.role ul {
  padding-left: 0;
}

.role ul li {
  font-size: 0.9rem;
  color: var(--color-text);
  padding: 0.2rem 0;
  padding-left: 1.1rem;
  position: relative;
}

.role ul li::before {
  content: "·";
  position: absolute;
  left: 0.2rem;
  color: var(--color-accent);
  font-weight: 700;
}

.stat {
  font-weight: 600;
  color: var(--color-accent);
}

/* ─── Patents ────────────────────────────────────────────────── */
.patent-entry {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--color-accent);
  margin-bottom: 1rem;
  background: var(--color-role-bg);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 3px rgba(0, 85, 204, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.patent-entry:last-child { margin-bottom: 0; }

.patent-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.patent-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.patent-number {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-family: monospace;
}

.patent-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ─── Education ──────────────────────────────────────────────── */
.edu-card {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-role-bg);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 3px rgba(0, 85, 204, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.edu-entry {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.edu-entry .school {
  font-weight: 600;
  font-size: 0.95rem;
}

.edu-entry .years {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.edu-degrees {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.125rem;
}

.edu-thesis {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ─── Contact Page ───────────────────────────────────────────── */
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.contact-block .contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  width: 5rem;
  flex-shrink: 0;
}

.contact-intro {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.7;
  max-width: 560px;
}

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

footer .container {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1rem 0;
  }

  .hero-text h1 { font-size: 1.4rem; }

  .resume-body {
    grid-template-columns: 1fr;
  }

  .employer-header,
  .role-header,
  .edu-entry {
    flex-direction: column;
    align-items: flex-start;
  }

  nav { height: auto; padding: 0.75rem 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
  nav ul { gap: 1.25rem; }

  footer .container { flex-direction: column; align-items: flex-start; }
}

/* ─── Print / PDF ────────────────────────────────────────────── */
@media print {
  header { display: none; }
  footer { display: none; }

  main { padding: 0; }

  body { font-size: 10.5pt; line-height: 1.45; }

  .hero {
    grid-template-columns: 175pt 1fr;
    gap: 0 1.25rem;
    padding: 0 0 0.6rem;
    margin-bottom: 0.6rem;
    background: none;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .avatar, .avatar-placeholder { display: none; }
  .hero-text { grid-column: 1 / -1; }
  .hero-text h1 { font-size: 17pt; margin-bottom: 0.1rem; }
  .hero-text .subtitle { color: var(--color-text-muted); margin-bottom: 0.3rem; }
  .hero-text .hero-pitch { margin-bottom: 0.3rem; }
  .hero-text .meta { margin-bottom: 0; }

  .btn-primary { display: none; }
  .btn-secondary { display: none; }
  .hero-links { display: none; }
  .open-to-work { display: none; }

  section { margin-bottom: 0.75rem; }

  section h2 {
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
  }

  .employer-tenure { margin-bottom: 0.5rem; }

  .resume-body {
    grid-template-columns: 175pt 1fr;
    gap: 0 1.25rem;
  }

  .expertise-group {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
  }

  .expertise-group h3 { color: var(--color-text-muted); }

  .role {
    background: none;
    border-left: 2px solid #ccc;
    box-shadow: none;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
  }

  .role ul li::before { color: #aaa; }

  .role-header { margin-bottom: 0.4rem; }

  .role ul li { padding: 0.1rem 0; padding-left: 1.1rem; }

  .patent-entry {
    background: none;
    border-left: 2px solid #ccc;
    box-shadow: none;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
  }

  .patent-desc { display: none; }

  .edu-card {
    background: none;
    border-left: 2px solid #ccc;
    box-shadow: none;
    padding: 0.5rem 0.75rem;
  }

  .stat { color: var(--color-text); }

  a { color: var(--color-text); }
}
