/* ═══════════════════════════════════════════
   RESUME — Design Tokens (inherited from portfolio)
═══════════════════════════════════════════ */
:root {
  --bg: #FAF8F5;
  --bg-alt: #F2EFEA;
  --bg-deep: #E8E4DD;
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #5A5A6E;
  --text-muted: #9A9AAE;
  --accent: #C2553A;
  --accent-light: rgba(194, 85, 58, 0.08);
  --accent-hover: #A8432C;
  --gold: #D4900A;
  --border: rgba(26, 26, 46, 0.08);
  --border-hover: rgba(26, 26, 46, 0.16);

  --font-serif: 'Instrument Serif', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

strong {
  font-weight: 600;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ═══════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════ */
.r-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.r-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.r-back:hover {
  color: var(--accent);
}

.r-topbar-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.r-download-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.r-download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(194, 85, 58, 0.2);
}

.r-download-btn:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   PAGE CONTAINER
═══════════════════════════════════════════ */
.r-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.r-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
  align-items: end;
}

.r-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -1.5px;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
  transition: color 0.5s, -webkit-text-stroke-color 0.5s;
}

.r-name:hover {
  color: var(--text);
  -webkit-text-stroke-color: transparent;
}

.r-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.r-meta-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.r-meta-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-width: 62px;
}

.r-meta-value {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.r-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(194, 85, 58, 0.3);
  transition: text-decoration-color 0.2s, color 0.2s;
}

.r-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.r-headline {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(194, 85, 58, 0.05);
  width: fit-content;
}

.r-headline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08);
  }
}

/* ═══════════════════════════════════════════
   TWO-COLUMN BODY
═══════════════════════════════════════════ */
.r-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
}

/* ═══════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════ */
.r-section {
  margin-bottom: 2.5rem;
}

.r-section:last-child {
  margin-bottom: 0;
}

.r-section-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════ */
.r-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.r-job {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0 1rem;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeSlideIn 0.6s ease forwards;
}

.r-job:nth-child(1) {
  animation-delay: 0.1s;
}

.r-job:nth-child(2) {
  animation-delay: 0.25s;
}

.r-job:nth-child(3) {
  animation-delay: 0.4s;
}

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

.r-job-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.r-marker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: var(--bg);
  flex-shrink: 0;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.r-marker-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(194, 85, 58, 0.12);
}

.r-job:hover .r-marker-dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(194, 85, 58, 0.08);
}

.r-marker-line {
  width: 1.5px;
  flex: 1;
  background: var(--border);
  margin: 4px 0;
}

.r-job-content {
  padding-bottom: 1.8rem;
}

.r-job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.r-job-company {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.r-job-title {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.1rem;
}

.r-job-period {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.r-job-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.r-job-bullets li {
  padding-left: 0.9rem;
  position: relative;
}

.r-job-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.r-hl {
  color: var(--text);
}

/* Expandable bullet details */
.r-expand-content {
  display: none;
  color: var(--text-secondary);
}

.r-expandable[data-expanded="true"] .r-expand-content {
  display: inline;
}

.r-expandable[data-expanded="true"] .r-expand-toggle {
  display: none;
}

.r-expand-toggle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  cursor: pointer;
  margin-left: 0.25rem;
  border-bottom: 1px dashed rgba(194, 85, 58, 0.3);
  padding: 0;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color 0.2s;
}

.r-expand-toggle:hover {
  color: var(--accent-hover);
}

.r-job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.6rem;
}

.r-job-tags span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

.r-job:hover .r-job-tags span {
  color: var(--text-secondary);
  border-color: var(--border-hover);
}

/* ═══════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════ */
.r-projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.r-project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.2s;
  will-change: transform;
}

.r-project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 26, 46, 0.06);
  border-color: var(--border-hover);
}

.r-project-badge {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

.r-project-name {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 0.3rem;
}

.r-project-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════
   SKILLS — Animated Bars
═══════════════════════════════════════════ */
.r-skills {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.r-skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.r-skill-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.06em;
}

.r-skill-bar-wrap {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-deep);
  overflow: hidden;
}

.r-skill-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.r-skill-bar.animated {
  width: var(--fill);
}

.r-skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.r-skill-chips span {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  transition: color 0.2s;
}

.r-skill-group:hover .r-skill-chips span {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   EDUCATION
═══════════════════════════════════════════ */
.r-edu {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.r-edu-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.r-edu-school {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.r-edu-degree {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.r-edu-cgpa {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-block;
  margin-top: 0.2rem;
}

/* ═══════════════════════════════════════════
   CERTIFICATIONS
═══════════════════════════════════════════ */
.r-certs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.r-cert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.r-cert-icon {
  font-size: 1rem;
  line-height: 1.3;
}

.r-cert-name {
  font-size: 0.78rem;
  font-weight: 500;
  display: block;
}

.r-cert-date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.05rem;
}

/* ═══════════════════════════════════════════
   PUBLICATION
═══════════════════════════════════════════ */
.r-publication {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.r-pub-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.4;
}

.r-pub-venue {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.r-pub-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(194, 85, 58, 0.3);
  transition: text-decoration-color 0.2s;
  width: fit-content;
}

.r-pub-link:hover {
  text-decoration-color: var(--accent);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.r-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.r-footer-sep {
  margin: 0 0.5rem;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .r-topbar {
    padding: 0 1rem;
    height: 50px;
  }

  .r-topbar-name {
    display: none;
  }

  .r-download-btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.85rem;
  }

  .r-page {
    padding: 2rem 1.25rem 1.5rem;
  }

  .r-header {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .r-name {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .r-body {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .r-job-header {
    flex-direction: column;
    gap: 0.2rem;
  }

  .r-job-period {
    padding-top: 0;
  }

  .r-job-content {
    padding-bottom: 1.5rem;
  }

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

  .r-section {
    margin-bottom: 2rem;
  }

  .r-section-title {
    margin-top: 2rem;
  }

  /* ── Spacing fixes for skills on mobile ── */
  .r-skills {
    gap: 2rem;
  }

  .r-skill-group {
    gap: 0.75rem;
  }

  .r-skill-chips {
    gap: 0.4rem;
    margin-top: 0.2rem;
  }

  .r-skill-chips span {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .r-name {
    font-size: clamp(1.8rem, 11vw, 2.5rem);
  }

  .r-back span {
    display: none;
  }

  .r-job-bullets {
    font-size: 0.78rem;
  }
}

/* ═══════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════ */
@media print {
  body::after {
    display: none;
  }

  .r-topbar {
    display: none;
  }

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

  .r-name {
    color: var(--text);
    -webkit-text-stroke: 0;
    font-size: 2.5rem;
  }

  .r-body {
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
  }

  .r-expand-content {
    display: inline !important;
  }

  .r-expand-toggle {
    display: none !important;
  }

  .r-skill-bar {
    width: var(--fill) !important;
  }

  .r-project-card {
    break-inside: avoid;
  }

  .r-job {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .r-download-btn {
    display: none;
  }
}