*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000000;
  --black-mid: #1a3150;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --accent: #ff0000;
  --cream: #faf9f6;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --white: #ffffff;
  --card-bg: #ffffff;
  --section-bg: #f3f6fb;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── HERO HEADER ── */
.hero {
  background: var(--black);
  color: white;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.hero-eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.1s;
}

.hero-name {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: white;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.2s;
}

.hero-name span {
  color: var(--accent);
  font-style: italic;
}

.hero-title {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.35s;
}

.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.45s;
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.contact-pill:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}
.contact-pill svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.hero-download {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.55s;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--black);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.4rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.45);
  background: #fbbf24;
}
.btn-download:active {
  transform: scale(0.97);
}
.btn-download.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ── NAV TABS ── */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 0.9rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s,
    border-color 0.2s;
  white-space: nowrap;
  font-family: "DM Mono", monospace;
}
.nav-tab:hover {
  color: var(--blue);
}
.nav-tab.active {
  color: var(--black);
  border-bottom-color: var(--accent);
}

/* ── MAIN LAYOUT ── */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

/* ── SECTIONS ── */
.section {
  margin-bottom: 3.5rem;
}

.section-label {
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.6rem;
  color: var(--black);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

/* ── SUMMARY ── */
.summary-text {
  font-size: 1rem;
  color: #374151;
  line-height: 1.8;
  font-weight: 300;
}

/* ── EXPERIENCE CARDS ── */
.job-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  cursor: pointer;
  transition:
    box-shadow 0.25s,
    border-color 0.25s,
    transform 0.2s;
  overflow: hidden;
}
.job-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transition: transform 0.25s;
}
.job-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
  transform: translateX(3px);
}
.job-card:hover::before,
.job-card.open::before {
  transform: scaleY(1);
}
.job-card.open {
  border-color: #bfdbfe;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.job-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.job-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
}
.job-company {
  font-size: 0.875rem;
  color: var(--blue);
  margin-top: 0.2rem;
  font-weight: 500;
}
.job-dates {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--section-bg);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}

.job-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.6rem;
  font-family: "DM Mono", monospace;
}
.toggle-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--section-bg);
  border-radius: 4px;
  transition:
    transform 0.2s,
    background 0.2s;
  font-size: 10px;
}
.job-card.open .toggle-icon {
  transform: rotate(180deg);
  background: #dbeafe;
  color: var(--blue);
}

.job-bullets {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    margin 0.3s;
  opacity: 0;
  margin-top: 0;
}
.job-card.open .job-bullets {
  max-height: 600px;
  opacity: 1;
  margin-top: 1rem;
}

.job-bullets ul {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.job-bullets li {
  font-size: 0.875rem;
  color: #374151;
  padding: 0.3rem 0;
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.6;
}
.job-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--blue-light);
  font-size: 0.7rem;
  top: 0.4rem;
}

/* ── SIDEBAR ── */
.sidebar {
  position: relative;
}
.sidebar-sticky {
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}

.sidebar-card-title {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.edu-item {
  margin-bottom: 1rem;
}
.edu-item:last-child {
  margin-bottom: 0;
}
.edu-degree {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
}
.edu-school {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.edu-minor {
  font-size: 0.73rem;
  color: var(--blue);
  font-style: italic;
  margin-top: 0.1rem;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #1d4ed8;
  margin: 0.25rem 0.25rem 0 0;
}
.cert-badge::before {
  content: "✓";
  font-size: 0.65rem;
}

.skills-group {
  margin-bottom: 1rem;
}
.skills-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--black);
  margin-bottom: 0.45rem;
}
.skill-tag {
  display: inline-block;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
  font-size: 0.73rem;
  color: #374151;
  margin: 0.2rem 0.2rem 0 0;
  transition:
    background 0.15s,
    border-color 0.15s;
  cursor: default;
}
.skill-tag:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--black);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s,
    transform 0.3s,
    background 0.2s;
  pointer-events: none;
  z-index: 200;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--blue);
}

/* ── PDF MODE (applied during print capture) ── */
@media print {
  .nav-bar,
  .btn-download,
  .scroll-top {
    display: none !important;
  }
  .job-bullets {
    max-height: none !important;
    opacity: 1 !important;
    margin-top: 1rem !important;
  }
  .main {
    grid-template-columns: 1fr 260px;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .main {
    grid-template-columns: 1fr;
  }
  .sidebar-sticky {
    position: static;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-download {
    margin-top: 1rem;
  }
}
