/* ═══════════════════════════════════════════════
   PROFESSIONAL RESUME — Premium Stylesheet
   Fonts: Inter, Source Sans 3 (Google Fonts)
   Palette: Navy · Slate · Blue Accent · White
   ═══════════════════════════════════════════════ */

:root {
  --navy: #062f21;
  --navy-mid: #0c4e3b;
  --slate: #334155;
  --slate-light: #64748b;
  --text: #1f2937;
  --muted: #4b5563;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --accent: #059669;
  --accent-soft: rgba(5, 150, 105, 0.06);
  --paper: #ffffff;
  --page-bg: #f3f4f6;
  --shadow: 0 20px 60px rgba(6, 47, 33, 0.08), 0 1px 3px rgba(6, 47, 33, 0.06);
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Source Sans 3", "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: #1d4ed8;
}

button {
  font: inherit;
}

strong {
  font-weight: 700;
}

/* ══════════════════════════════════════════════
   TOOLBAR
   ══════════════════════════════════════════════ */

.cv-toolbar {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 24px 16px 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toolbar-link,
.toolbar-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 180ms ease;
  backdrop-filter: blur(12px);
}

.toolbar-button {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.toolbar-link:hover {
  border-color: var(--slate-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.toolbar-button:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

.toolbar-link:focus-visible,
.toolbar-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════
   PAGE CONTAINER
   ══════════════════════════════════════════════ */

.resume-page {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 16px;
}

.resume-sheet {
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   HEADER BANNER
   ══════════════════════════════════════════════ */

.resume-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 40px 42px 34px;
  color: #ffffff;
  position: relative;
}

.resume-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: radial-gradient(circle at 80% 30%, rgba(16, 185, 129, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.resume-header h1 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.role {
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

.contact-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}

.contact-row li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-row svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.contact-row a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  transition: all 160ms ease;
  word-break: break-all;
}

.contact-row a:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

/* ══════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════ */

.resume-section {
  padding: 24px 42px;
  border-bottom: 1px solid var(--line);
}

.resume-section:last-child {
  border-bottom: none;
  padding-bottom: 36px;
}

.resume-section h2 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  line-height: 1.4;
}

/* ── Professional Summary ── */

.summary-text {
  max-width: 72ch;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ── Skills Grid ── */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.skill-category h3 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 6px;
  transition: all 180ms ease;
}

.chip:hover {
  background: rgba(5, 150, 105, 0.14);
  border-color: rgba(5, 150, 105, 0.25);
  transform: translateY(-1px);
}

/* ── Entry (Projects, Education, Awards) ── */

.entry {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  break-inside: avoid;
}

.entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.entry.compact {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.entry-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.entry h3 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

.entry-title-link {
  color: var(--navy);
  text-decoration: none;
  transition: color 160ms ease;
}

.entry-title-link:hover {
  color: var(--accent);
}

.tech-inline {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(5, 150, 105, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(5, 150, 105, 0.1);
  margin-left: 8px;
  vertical-align: middle;
}

.entry-subtitle {
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.entry-meta {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-light);
  text-align: right;
}

.entry-meta a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(5, 150, 105, 0.35);
  text-underline-offset: 2px;
  transition: all 160ms ease;
}

.entry-meta a:hover {
  color: #047857;
  text-decoration-color: #047857;
}

.project-github-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(5, 150, 105, 0.35);
  text-underline-offset: 2px;
  word-break: break-all;
  transition: all 160ms ease;
}

.project-github-link:hover {
  color: #047857;
  text-decoration-color: #047857;
}

.entry-detail {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

.entry ul {
  margin-top: 8px;
  padding-left: 20px;
  display: grid;
  gap: 5px;
}

.entry li {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
}

.entry li::marker {
  color: var(--accent);
}

/* ══════════════════════════════════════════════
   REVEAL ANIMATIONS
   ══════════════════════════════════════════════ */

.cv-reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: cvFadeIn 0.5s ease forwards;
}

.cv-reveal:nth-child(2) { animation-delay: 0.08s; }
.cv-reveal:nth-child(3) { animation-delay: 0.16s; }
.cv-reveal:nth-child(4) { animation-delay: 0.24s; }
.cv-reveal:nth-child(5) { animation-delay: 0.32s; }
.cv-reveal:nth-child(6) { animation-delay: 0.40s; }

@keyframes cvFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 720px) {
  .resume-header {
    padding: 30px 24px 26px;
  }

  .resume-section {
    padding: 20px 24px;
  }

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

  .entry-row {
    flex-direction: column;
    gap: 4px;
  }

  .entry-meta {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .cv-toolbar {
    flex-direction: column;
  }

  .toolbar-link,
  .toolbar-button {
    width: 100%;
    justify-content: center;
  }

  .resume-page {
    padding: 10px;
  }

  .resume-header {
    padding: 24px 18px 22px;
  }

  .resume-header h1 {
    font-size: 1.8rem;
  }

  .resume-section {
    padding: 18px;
  }

  .contact-row {
    gap: 4px 14px;
    font-size: 0.82rem;
  }
}

/* ══════════════════════════════════════════════
   PRINT STYLES
   ══════════════════════════════════════════════ */

@page {
  size: A4;
  margin: 8mm 10mm;
}

@media print {
  body {
    background: #ffffff;
    font-size: 12px;
    line-height: 1.45;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .no-print {
    display: none !important;
  }

  .resume-page {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .resume-sheet {
    box-shadow: none;
    border-radius: 0;
  }

  .resume-header {
    padding: 20px 24px 16px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: var(--navy) !important;
    color: #ffffff !important;
  }

  .resume-header::after {
    display: none !important;
  }

  .resume-section {
    padding: 8px 24px;
  }

  .resume-section:last-child {
    padding-bottom: 12px;
  }

  .resume-section h2 {
    margin-bottom: 8px;
    font-size: 0.76rem;
  }

  .cv-reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  h2, h3 {
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  .skills-grid {
    gap: 6px 14px;
  }

  .skill-category h3 {
    margin-bottom: 2px;
    font-size: 0.78rem;
  }

  .chip {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    padding: 1px 6px;
    font-size: 0.7rem;
  }

  .entry {
    margin-bottom: 6px;
    padding-bottom: 6px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .entry-row {
    margin-bottom: 2px;
  }

  .entry h3 {
    font-size: 0.95rem;
  }

  .entry-subtitle {
    font-size: 0.85rem;
  }

  .entry ul {
    margin-top: 3px;
    gap: 2px;
    padding-left: 18px;
  }

  .entry li {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .entry.compact {
    margin-bottom: 3px;
    padding-bottom: 3px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: var(--accent) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .contact-row {
    color: rgba(255, 255, 255, 0.95) !important;
  }

  .contact-row svg {
    opacity: 0.9 !important;
  }

  .contact-row a {
    color: #ffffff !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .entry-title-link {
    color: var(--navy) !important;
    text-decoration: none !important;
  }

  .entry-meta {
    color: var(--slate-light) !important;
  }

  .entry-meta a,
  .project-github-link {
    color: var(--accent) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    font-weight: 600 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
