/* Base */
:root {
  --text: #111;
  --muted: #333;
  --muted2: #777;
  --line: #ddd;
  --cardLine: #e6e6e6;
  --max: 980px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
}

a { color: #0b57d0; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid #0b57d0; outline-offset: 2px; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 40px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.name {
  margin: 0;
  font-size: 34px;
  letter-spacing: .2px;
  line-height: 1.15;
}

.headline {
  margin: 6px 0 10px;
  font-weight: 700;
}

.header-right { display: flex; gap: 10px; }

.btn {
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid var(--text);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  background: #fff;
}

.btn:hover { text-decoration: none; background: #f6f6f6; }

/* Contact row */
.meta-row {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sep { color: var(--muted2); }

/* Icons */
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.icon-link:hover { text-decoration: underline; }

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
}

.icon path { fill: currentColor; }

/* Sections + type */
section { margin-top: 18px; }

h2 {
  margin: 18px 0 8px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

h3 { margin: 0; font-size: 16px; }

p { margin: 0 0 10px; }

/* Lists */
ul { margin: 8px 0 0 18px; }
li { margin: 0 0 6px; }

/* Skills grid/cards */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--cardLine);
  border-radius: 12px;
  padding: 12px 12px 8px;
}

.card h3 { margin-bottom: 6px; }

/* Experience */
.role { padding: 10px 0; }

.role-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.dates {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.company {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 75ch; /* improves readability */
}

/* ---------- Company description typography (NEW) ----------
   Add class="company-description" to BOTH company description paragraphs in HTML.
   This forces identical typography across roles even if containers differ.
----------------------------------------------------------- */
.company-description {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  max-width: 85ch;
  letter-spacing: 0.1px;
}

/* Optional: keep bullets visually tight under the description */
.role ul { margin-top: 6px; }

/* Projects */
section ul li strong { color: var(--text); }
section ul li { line-height: 1.4; }

/* Education */
.edu { margin-left: 18px; }

/* Footer */
.footer {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 820px) {
  .header { flex-direction: column; }
  .header-right { width: 100%; }
  .btn { width: 100%; text-align: center; }
  .grid { grid-template-columns: 1fr; }
  .dates { white-space: normal; }
}

/* ---------- Print-friendly resume ---------- */
@media print {
  @page { margin: 0.6in; }

  body { color: #000; }

  .container { max-width: none; padding: 0; }

  .header {
    border-bottom: 1px solid #000;
    padding-bottom: 10px;
  }

  .btn, .icons, .print-hide { display: none !important; }

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

  /* Optional: show URLs on print for external links */
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 10px;
    color: #333;
  }

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

  .card { border: none; padding: 0; }

  .role { break-inside: avoid; page-break-inside: avoid; }

  h2 {
    border-top: 1px solid #000;
    padding-top: 10px;
  }

  /* Ensure company description prints consistently */
  .company-description {
    color: #000;
  }
}
