:root {
  --page-w: 90%;
  --page-h: 11in;
  --margin-x: 0.7in;
  --margin-y: 0.7in;
  --rail-w: 1.4in;
  --accent: #0f172a;
  --muted: #475569;
  --rule: #e2e8f0;
}

@page { size: letter; margin: 0; }

body {
  margin: 0;
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: start;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial;
  color: #0b1220;
}

.page {
  grid-column: 2;
  width: var(--page-w);
  max-width: 1200px;
  min-height: var(--page-h);
  margin: auto;
}

.inner {
  padding: var(--margin-y) var(--margin-x);
  box-sizing: border-box;
}

.section-block {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
  scroll-margin-top: 24px;
}

.section-block:nth-of-type(odd) {
  background: #ffffff;
}

.section-block:nth-of-type(even) {
  background: #f8fafc;
}

h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 4px 0;
}

.subtitle {
  font-weight: 600;
  color: var(--muted);
  font-size: 24px;
  margin-bottom: 10px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.meta a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted #cbd5e1;
}

.meta a:hover {
  color: #0b1220;
  border-bottom-style: solid;
}

hr.rule {
  border: none;
  border-top: 1.5px solid var(--rule);
  margin: 10px 0 16px 0;
}

.section {
  display: block;
}

.label {
  margin-bottom: 12px;
  font-variant-caps: all-small-caps;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--accent);
  font-size: 20px;
  padding-top: 2px;
}

/* ===== Summary ===== */
.summary p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: #111827;
}

/* ===== Skills ===== */
.skills-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
  padding: 10px;
}

.skill-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.skill-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--accent);
}

.skill-card ul {
  margin: 0;
  padding-left: 18px;
}

.skill-card li {
  font-size: 16px;
  margin-bottom: 4px;
  color: #111827;
}

/* ===== Experience ===== */
.xp-item {
  margin-bottom: 14px;
}
.role {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.role h3 {
  font-size: 16px;
  margin: 0;
  color: var(--accent);
}
.when {
  font-size: 16px;
  color: var(--muted);
}
.org {
  font-size: 16px;
  margin: 2px 0 4px;
  color: #111827;
}

ul.bullets {
  margin: 0;
  padding-left: 14px;
  font-size: 16px;
  line-height: 1.4;
}
ul.bullets li {
  margin: 3px 0;
}

/* ===== Education & Certs ===== */
.edu,
.certs {
  font-size: 16px;
  line-height: 1.4;
}
.edu .degree {
  font-weight: 600;
}

.links-grid img {
    width: 128px;
    height: 128px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    padding: 6px;
}

/* ===== Print ===== */
@media print {
  html,
  body {
    background: #fff;
  }
  .page {
    box-shadow: none;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
}

@media (max-width: 1100px) {
  .skills-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .skills-card-grid {
    grid-template-columns: 1fr;
  }
}

#navbar { grid-column: 1; }

.navbar {
  width: 130px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding: 0;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.25);
  background: #f8fafc;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.navbar a {
  display: block;
  color: black;
  padding: 8px 12px;
  text-decoration: none;
  text-align: left;
}

.navbar a:hover {
  background: #1e293b;
  color: #ffffff;
  border-left-color: #38bdf8;
}

.navbar a.active {
  background: #0f172a;
  color: #ffffff;
  border-left-color: #22c55e;
}

/* ===== Responsive (small screens) ===== */
@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  #navbar {
    grid-column: 1 / -1;
  }

  .navbar {
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    box-shadow: none;
    border-bottom: 1px solid var(--rule);
  }

  .navbar a {
    flex: 1 1 auto;
    text-align: center;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .navbar a.active {
    background: #0f172a;
    color: #ffffff;
    border-left: 3px solid #22c55e;
  }

  .navbar a:hover {
    border-bottom-color: #38bdf8;
  }

  .page {
    grid-column: 1;
    width: 100%;
  }

  .inner {
    padding: 24px 16px 40px;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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