/* ══════════════════════════════════════════════════
   RESUME — Design System & Tokens
   ══════════════════════════════════════════════════ */

:root {
  /* Color Palette — Deep slate + warm coral accent */
  --bg-primary: #0f1117;
  --bg-secondary: #161922;
  --bg-card: #1c1f2e;
  --bg-card-hover: #232740;
  --bg-glass: rgba(28, 31, 46, 0.65);

  --text-primary: #e8eaf0;
  --text-secondary: #9ba1b5;
  --text-muted: #6b7185;

  --accent: #f0735a;
  --accent-soft: rgba(240, 115, 90, 0.12);
  --accent-glow: rgba(240, 115, 90, 0.25);
  --accent-gradient: linear-gradient(135deg, #f0735a, #e85d8a);

  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(240, 115, 90, 0.3);

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px var(--accent-glow);
}


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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(240, 115, 90, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(130, 80, 220, 0.06), transparent);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover { color: #ff9480; }


/* ══════════ CONTAINER ══════════ */
.resume-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}


/* ══════════ HEADER ══════════ */
.header {
  position: relative;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  animation: fadeSlideDown 0.6s ease both;
}

.header-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.header-content {
  position: relative;
  z-index: 1;
}

.name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-xs);
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.contact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}
.contact-item:hover { color: var(--accent); }

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}


/* ══════════ MAIN GRID ══════════ */
.main-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-xl);
}


/* ══════════ SECTIONS ══════════ */
.section {
  margin-bottom: var(--space-xl);
  animation: fadeSlideUp 0.5s ease both;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.section-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}


/* ══════════ SKILLS ══════════ */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  background: rgba(240, 115, 90, 0.22);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}


/* ══════════ EDUCATION ══════════ */
.edu-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.edu-degree {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.edu-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.edu-school {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.edu-thesis {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  line-height: 1.5;
  font-style: italic;
  border-left: 2px solid var(--border-accent);
  padding-left: var(--space-sm);
}


/* ══════════ CERTIFICATIONS ══════════ */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cert-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease;
}

.cert-item:hover {
  border-color: var(--border-accent);
}

.cert-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cert-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.cert-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ══════════ SUMMARY ══════════ */
.summary-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}


/* ══════════ TIMELINE ══════════ */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
  animation: fadeSlideUp 0.4s ease both;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 11px;
  height: 11px;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: scale(1.3);
}

.timeline-content {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: 2px;
}

.job-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.job-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.job-company {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.job-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}


/* ══════════ RESEARCH GRID ══════════ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.research-card {
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.research-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.research-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.research-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ══════════ FOOTER ══════════ */
.footer {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
}


/* ══════════ ANIMATIONS ══════════ */
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 768px) {
  .resume-container {
    padding: var(--space-md);
  }

  .header {
    padding: var(--space-xl) var(--space-lg);
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

  .timeline-header {
    flex-direction: column;
    gap: 2px;
  }
}


/* ══════════ PRINT STYLES ══════════ */
@media print {
  :root {
    --bg-primary: #fff;
    --bg-secondary: #fff;
    --bg-card: #f9f9fb;
    --bg-card-hover: #f9f9fb;
    --bg-glass: #fff;
    --text-primary: #111;
    --text-secondary: #444;
    --text-muted: #777;
    --accent: #d04a32;
    --border: #ddd;
    --border-accent: #d04a32;
  }

  body {
    background: white;
    background-image: none;
    font-size: 11pt;
    color: #111;
  }

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

  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: 2px solid var(--accent);
    border-radius: 0;
    padding: 1rem 0;
    margin-bottom: 1rem;
  }

  .header-accent { display: none; }

  .name {
    -webkit-text-fill-color: var(--text-primary);
    background: none;
  }

  .main-grid {
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
  }

  .section { margin-bottom: 1rem; }

  .timeline-content,
  .edu-card,
  .cert-item,
  .research-card,
  .summary-text {
    box-shadow: none;
    border: 1px solid #eee;
  }

  .timeline-content:hover,
  .research-card:hover,
  .skill-tag:hover {
    transform: none;
    box-shadow: none;
  }

  .skill-tag {
    background: #f0f0f0;
    border-color: #ddd;
    color: #333;
  }

  .footer { display: none; }

  /* Prevent page breaks inside cards */
  .timeline-item,
  .research-card,
  .edu-card {
    break-inside: avoid;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}
