/* ============================================================
   resume.css — ahmed-masud.github.io/resume
   Screen: clean readable layout with accordion
   Print:  all sections expanded, ink-friendly
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@300;400;500&family=JetBrains+Mono:wght@300;400&display=swap');

:root {
  --bg:      #FFFFFF;
  --bg2:     #F7F6F3;
  --fg:      #000000;
  --mid:     #2A2A2A;
  --faint:   #666666;
  --accent:  #0047AB;
  --gold:    #7A4F00;
  --rule:    #CCCCCC;
  --serif:   'EB Garamond', Georgia, serif;
  --sans:    'Inter', -apple-system, sans-serif;
  --mono:    'JetBrains Mono', monospace;
  --max-w:   820px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.7;
}

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--accent); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: 3px;
  font-size: 14px; font-weight: 500;
  text-decoration: none; z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 1rem; }

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

/* ── HEADER ──────────────────────────────────────────────── */
.resume-header {
  background: var(--bg);
  border-bottom: 2px solid var(--fg);
  padding: 2rem 3rem 0;
}
.resume-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  padding-bottom: 1.5rem;
}
.resume-header h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 0.2rem;
}
.resume-title {
  font-size: 13px;
  color: var(--mid);
  letter-spacing: 0.02em;
  margin-bottom: 0.1rem;
}
.resume-location {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}
.resume-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.resume-header-right a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}
.resume-header-right a:hover { text-decoration: underline; }

.resume-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-top: 0.5px solid var(--rule);
}
.resume-nav a {
  font-size: 12px;
  color: var(--faint);
  text-decoration: none;
}
.resume-nav a:hover { color: var(--fg); }
.print-btn {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.4rem 1rem;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}
.print-btn:hover { background: var(--fg); color: var(--bg); }


/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.resume-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 3rem;
}

.resume-section { padding: 2rem 0; }

.resume-rule {
  border: none;
  border-top: 0.5px solid var(--rule);
  margin: 0;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--fg);
}

/* ── SUMMARY ─────────────────────────────────────────────── */
.summary-text {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}
.summary-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.highlight {
  font-family: var(--mono);
  font-size: 10px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--fg);
  color: var(--fg);
  border-radius: 2px;
  letter-spacing: 0.04em;
}

/* ── JOB ACCORDION ───────────────────────────────────────── */
.job { border-bottom: 0.5px solid var(--rule); }
.job:first-of-type { border-top: 0.5px solid var(--rule); }

.job-header {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 1rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1.5rem;
}
.job-header:hover .job-company { color: var(--accent); }

.job-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.job-role {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.job-company {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fg);
  transition: color 0.15s;
}
.job-dates {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Expand/collapse indicator */
.job-header::after {
  content: '+';
  font-size: 18px;
  color: var(--faint);
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}
.job-header[aria-expanded="true"]::after { content: '−'; }

.job-body {
  padding: 0 0 1.25rem;
}
.job-desc {
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.job-bullets li {
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.75;
  padding-left: 1.25rem;
  position: relative;
}
.job-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--faint);
}


/* ── SKILLS ──────────────────────────────────────────────── */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.skill-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.875rem;
}
.skill-row dt {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 2px;
}
.skill-row dd { color: var(--mid); line-height: 1.6; }

/* ── PATENTS ─────────────────────────────────────────────── */
.patent-entry {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
}
.patent-id {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.patent-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.3rem;
}
.patent-desc { font-size: 0.875rem; color: var(--mid); line-height: 1.75; }

.awards-list { display: flex; flex-direction: column; gap: 0.75rem; }
.award-entry {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.7;
}
.award-year {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  padding-top: 3px;
}

/* ── EDUCATION ───────────────────────────────────────────── */
.edu-list { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.25rem; }
.edu-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 1rem;
  font-size: 0.875rem;
}
.edu-degree { font-family: var(--serif); font-size: 1rem; font-weight: 500; color: var(--fg); }
.edu-school { color: var(--mid); grid-row: 2; }
.edu-dates {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  grid-row: 1;
  text-align: right;
  padding-top: 3px;
  white-space: nowrap;
}
.edu-note {
  font-size: 12px;
  color: var(--faint);
  grid-column: 1 / -1;
  grid-row: 3;
  font-style: italic;
}

.cert-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.4rem;
}
.cert-items { font-size: 0.875rem; color: var(--mid); line-height: 1.7; }

/* Clearance callout */
.clearance-section {
  background: var(--bg2);
  margin: 0 -3rem;
  padding: 1.5rem 3rem;
  border-top: 0.5px solid var(--rule);
  border-bottom: 0.5px solid var(--rule);
}
.clearance-section .section-title { border-bottom-color: var(--rule); }
.clearance-section p { font-size: 0.875rem; color: var(--mid); }

/* ── FOOTER ──────────────────────────────────────────────── */
.resume-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 3rem 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-top: 0.5px solid var(--rule);
}
.resume-footer p {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}
.resume-footer a { color: var(--faint); text-decoration: none; }
.resume-footer a:hover { color: var(--fg); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .resume-header { padding: 1.5rem 1.5rem 0; }
  .resume-header-inner { grid-template-columns: 1fr; gap: 1rem; }
  .resume-header-right { align-items: flex-start; }
  .resume-main { padding: 0 1.5rem; }
  .skill-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .clearance-section { margin: 0 -1.5rem; padding: 1.5rem; }
  .resume-footer { padding: 1.5rem; flex-direction: column; }
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  body { font-size: 11pt; background: #fff; color: #000; }

  .skip-link,
  .resume-nav,
  .print-btn { display: none !important; }

  .resume-header {
    padding: 0 0 0.75rem;
    border-bottom: 1.5pt solid #000;
  }
  .resume-header-inner { padding-bottom: 0.75rem; }
  .resume-header h1 { font-size: 20pt; }
  .resume-header-right a { color: #000; }

  .resume-main { padding: 0; }

  .section-title {
    font-size: 9pt;
    border-bottom: 0.75pt solid #000;
    margin-bottom: 0.6rem;
    padding-bottom: 0.2rem;
    page-break-after: avoid;
    break-after: avoid;
  }

  .job-header { padding: 0.5rem 0; }
  .job-header::after { display: none; }
  .job-body { display: block !important; }
  .job-body[hidden] { display: block !important; }

  .job-company { font-size: 11pt; }
  .job-role { font-size: 8pt; }
  .job-dates { font-size: 8pt; }
  .job-desc, .job-bullets li { font-size: 10pt; }

  .resume-rule { border-top: 0.5pt solid #ccc; }

  .highlight {
    border: 0.5pt solid #000;
    font-size: 8pt;
  }

  .resume-section { padding: 0.75rem 0; }

  .clearance-section {
    background: #f5f5f5;
    margin: 0;
    padding: 0.75rem 0;
    border: none;
    border-top: 0.5pt solid #ccc;
  }

  .resume-footer {
    padding: 0.75rem 0 0;
    border-top: 0.5pt solid #ccc;
  }

  /* Avoid page breaks inside jobs */
  .job { page-break-inside: avoid; break-inside: avoid; }
  .resume-section { page-break-inside: auto; break-inside: auto; }
  .patent-entry { page-break-inside: avoid; break-inside: avoid; }
  .award-entry { page-break-inside: avoid; break-inside: avoid; }

  a { color: #000; text-decoration: none; }
  a[href]::after { content: none; }
}

