:root {
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --white: #ffffff;
  --indigo: #4f46e5;
  --indigo-dark: #3730a3;
  --slate: #0f172a;
}

* {
  box-sizing: border-box;
}

html {
  opacity: 0;
  transition: opacity 0.7s ease;
}

html.is-loaded {
  opacity: 1;
}

body.cv-page {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

a:hover,
a:focus {
  color: var(--indigo);
  text-decoration: none;
}

.cv-nav {
  padding: 22px 0;
  background: #0b1120;
  color: var(--white);
}

.cv-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.cv-hero {
  padding: 76px 0 110px;
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.24), transparent 34%),
    #0f172a;
  color: var(--white);
}

.cv-hero-inner {
  display: flex;
  gap: 38px;
  align-items: center;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 142px;
  height: 142px;
  border-radius: 24px;
  padding: 4px;
  background: linear-gradient(135deg, #6366f1, #9333ea);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.45);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
}

.name-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.name-row h1 {
  margin: 0;
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
}

.name-row span {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 7px 12px;
  border: 1px solid rgba(99, 102, 241, 0.42);
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.16);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.role {
  margin: 0 0 6px;
  color: #e2e8f0;
  font-size: 22px;
  font-weight: 700;
}

.subtitle {
  margin: 0 0 22px;
  color: #94a3b8;
  font-size: 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: #94a3b8;
  font-size: 14px;
}

.meta span,
.meta a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.meta i {
  color: #818cf8;
}

.cv-main {
  position: relative;
  margin-top: -46px;
  padding-bottom: 82px;
}

.cv-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr);
  gap: 28px;
}

.cv-sidebar,
.cv-content {
  display: grid;
  gap: 24px;
}

.cv-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.cv-sidebar .cv-card,
.bio-card,
.research-card {
  padding: 28px;
}

.cv-card h2 {
  margin: 0 0 24px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cv-card h2 i {
  color: #f59e0b;
}

.skill-list {
  display: grid;
  gap: 20px;
}

.skill div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.skill span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.skill strong {
  color: var(--indigo);
  font-size: 12px;
}

.skill b {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2ff;
}

.skill i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--indigo);
  transition: width 1s ease;
}

.tech-card {
  position: relative;
  overflow: hidden;
  background: var(--slate);
  color: var(--white);
}

.tech-card h2 {
  color: #64748b;
}

.stack-block + .stack-block {
  margin-top: 18px;
}

.stack-block span {
  display: block;
  margin-bottom: 8px;
  color: #818cf8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.stack-block p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  color: #e2e8f0;
  font-size: 13px;
}

.bio-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.tab-card {
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.tab-button {
  flex: 1;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-button.active {
  background: var(--white);
  color: var(--indigo);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.tab-panel {
  display: none;
  padding: 34px;
}

.tab-panel.active {
  display: block;
}

.timeline-cv {
  display: grid;
  gap: 34px;
}

.timeline-cv article {
  position: relative;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.timeline-cv article:last-child {
  border-left-color: transparent;
}

.dot {
  position: absolute;
  top: 0;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.timeline-cv article:hover .dot {
  background: var(--indigo);
}

.timeline-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.timeline-head h3 {
  margin: 0;
  color: #1e293b;
  font-size: 20px;
  font-weight: 900;
}

.timeline-head span {
  align-self: flex-start;
  padding: 5px 9px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
}

.company {
  margin: 0 0 10px;
  color: var(--indigo);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-cv p:not(.company) {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-feature {
  padding: 28px;
  border-radius: 28px;
  background: var(--indigo);
  color: var(--white);
}

.project-title {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.project-title > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}

.project-title h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.project-title p {
  margin: 2px 0 0;
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote {
  margin: 0 0 22px;
  color: #eef2ff;
  font-size: 15px;
  font-style: italic;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.project-stats div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.project-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-stats strong {
  font-size: 12px;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.project-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
}

.project-grid i {
  color: var(--indigo);
}

.project-grid h4 {
  margin: 10px 0 8px;
  font-size: 15px;
  font-weight: 900;
}

.project-grid p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.research-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
}

.research-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid #c7d2fe;
  border-radius: 18px;
  background: var(--white);
  color: var(--indigo);
}

.research-card h2 {
  margin-bottom: 12px;
  color: #a5b4fc;
}

.research-card h3 {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: 20px;
  font-weight: 900;
}

.research-card p {
  margin: 0;
  color: #64748b;
}

@media (max-width: 991px) {
  .cv-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .cv-hero-inner {
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .cv-nav .container,
  .cv-hero-inner,
  .research-card {
    display: block;
  }

  .back-link {
    margin-top: 14px;
  }

  .avatar-wrap {
    margin-bottom: 26px;
  }

  .name-row h1 {
    font-size: 38px;
  }

  .tabs,
  .project-stats {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: grid;
  }

  .tab-panel {
    padding: 24px;
  }

  .timeline-head {
    display: block;
  }

  .timeline-head span {
    display: inline-block;
    margin-top: 8px;
  }

  .research-icon {
    margin-bottom: 18px;
  }
}
