/* ============================================================
   CV — Web Version (1240px)
   Design: Premium corporate, web-optimized
   Font: Inter (Google Fonts)
   Palette: Deep Navy #0D1B2A / Charcoal #2E3A48 / Steel Blue #0a5e8f
   ============================================================ */

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

:root {
  --navy: #0D1B2A;
  --navy-light: #1B2D45;
  --charcoal: #2E3A48;
  --slate: #5A6872;
  --slate-light: #8B9DAF;
  --gold: #0a5e8f;
  --gold-soft: #0a5e8f12;
  --gold-border: #0a5e8f28;
  --gold-dark: #07547a;
  --white: #ffffff;
  --off-white: #F6F9F8;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  line-height: 1.6;
  background: #EDF2F7;
}

/* ---------- Page Container ---------- */
.cv-page {
  width: 1240px;
  max-width: 100%;
  margin: 40px auto;
  padding: 50px 60px;
  background: var(--white);
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  border-radius: 6px;
}

/* ---------- Header ---------- */
.cv-header {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 3px solid var(--navy);
  margin-bottom: 32px;
}

.cv-header__photo {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 4px 16px rgba(13, 27, 42, 0.15);
}

.cv-header__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.cv-header__identity {
  flex: 1;
  min-width: 0;
}

.cv-header__name {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 6px;
  background: linear-gradient(
    90deg,
    #0D1B2A 0%,
    #12203a 15%,
    #1a1a3e 30%,
    #2a1a35 45%,
    #3a3a4a 60%,
    #1a1a3e 75%,
    #12203a 90%,
    #0D1B2A 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: nameGradient 12s ease-in-out infinite;
}

.cv-header__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cv-header__tagline {
  font-size: 14px;
  color: var(--slate);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 10px;
}

.cv-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-tag {
  font-size: 12px;
  color: var(--charcoal);
  background: var(--off-white);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.cv-header__contact {
  text-align: right;
  font-size: 13px;
  color: var(--charcoal);
  line-height: 2;
  flex-shrink: 0;
}

.cv-header__contact a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s;
}

.cv-header__contact a:hover {
  color: var(--gold);
}

.cv-header__contact-label {
  color: var(--slate);
  font-weight: 500;
  margin-right: 4px;
}

/* ---------- Sections ---------- */
.cv-section {
  margin-bottom: 28px;
}

.cv-section__heading {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: radial-gradient(
    ellipse at 30% 50%,
    #0D1B2A 0%,
    #152440 40%,
    #1a2a4a 70%,
    #0D1B2A 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: headingGradient 8s ease-in-out infinite;
}

.cv-section__heading::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Executive Summary ---------- */
.executive-summary {
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  padding: 20px 24px;
  border-radius: 0 6px 6px 0;
}

.summary-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-bullets li {
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.6;
  padding: 4px 0;
}

.summary-bullets li strong {
  color: var(--navy);
}

/* ---------- Competency Cards (3×2 Grid) ---------- */
.competency-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.comp-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px 14px;
  background: var(--off-white);
  transition: box-shadow 0.2s, transform 0.2s;
}

.comp-card:hover {
  box-shadow: 0 4px 16px rgba(10, 94, 143, 0.10);
  transform: translateY(-1px);
}

.comp-card__header {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}

.comp-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comp-card__list li {
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.7;
  padding-left: 14px;
  position: relative;
}

.comp-card__list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Experience ---------- */
.experience-entry {
  margin-bottom: 16px;
}

.experience-entry__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.experience-entry__role {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.experience-entry__period {
  font-size: 14px;
  color: var(--slate);
  font-weight: 500;
}

.experience-entry__company {
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.experience-entry__intro {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.65;
  font-style: italic;
}

/* ---------- Projects / Portfolio ---------- */
.project {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.project--featured {
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  padding: 20px 24px;
  border-bottom: none;
  border-radius: 0 6px 6px 0;
}

.project:last-of-type {
  border-bottom: none;
  margin-bottom: 12px;
  padding-bottom: 0;
}

.project__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.project__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.project__tech {
  font-size: 12px;
  color: var(--slate);
  font-style: italic;
  flex-shrink: 0;
  margin-left: 16px;
}

.project__type {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}

.project__desc {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.6;
}

.project__desc ul {
  padding-left: 20px;
  margin-top: 4px;
}

.project__desc li {
  margin-bottom: 4px;
}

.portfolio-note {
  font-size: 13px;
  color: var(--slate);
  text-align: center;
  padding: 16px;
  background: var(--off-white);
  border-radius: 6px;
  margin-top: 8px;
}

/* ---------- Career Milestones ---------- */
.milestone-note {
  font-size: 13px;
  color: var(--slate);
  padding: 14px 20px;
  background: var(--off-white);
  border-left: 3px solid var(--gold);
  margin-bottom: 20px;
  border-radius: 0 6px 6px 0;
}

.milestones-timeline {
  margin-bottom: 20px;
}

.milestone {
  display: flex;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.milestone:last-child {
  border-bottom: none;
}

.milestone__period {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-dark);
  min-width: 110px;
  text-align: right;
  padding-top: 2px;
}

.milestone__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.milestone__desc {
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.6;
  margin-top: 2px;
}

.cv-subsection__heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 16px;
  margin-bottom: 10px;
}

/* ---------- Technical Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}

.skill-category {
  margin-bottom: 6px;
}

.skill-category__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.skill-category__items {
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.6;
}

/* ---------- Languages ---------- */
.languages-row {
  display: flex;
  gap: 32px;
  font-size: 14px;
}

.language-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.language-item__name {
  font-weight: 700;
  color: var(--navy);
}

.language-item__level {
  color: var(--slate);
}

/* ---------- Additional Information ---------- */
.additional-info {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.65;
}

.additional-info p {
  margin-bottom: 8px;
}

.additional-info p:last-child {
  margin-bottom: 0;
}

.additional-info strong {
  color: var(--navy);
}

/* ---------- Footer ---------- */
.cv-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--slate-light);
  line-height: 1.7;
}

/* ---------- Utility ---------- */
.placeholder {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 13px;
}

.page-break {
  display: none;
}

/* ---------- Screen Responsive ---------- */
@media screen and (max-width: 1280px) {
  .cv-page {
    width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 40px 44px;
  }
}

@media screen and (max-width: 900px) {
  .cv-page {
    padding: 24px 20px;
  }

  .cv-header {
    flex-direction: column;
    gap: 16px;
  }

  .cv-header__contact {
    text-align: left;
  }

  .competency-cards {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

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

  .project__tech {
    margin-left: 0;
  }

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

  .milestone__period {
    text-align: left;
  }
}

@media screen and (max-width: 600px) {
  .cv-page {
    padding: 16px 14px;
  }

  .cv-header__name {
    font-size: 26px;
  }

  .competency-cards {
    grid-template-columns: 1fr;
  }

  .experience-entry__header {
    flex-direction: column;
  }
}

/* ============================================================
   ANIMATIONS ENGINE
   ============================================================ */

/* ─── Keyframes ─── */
@keyframes nameGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes headingGradient {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

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

/* Random title animations */
@keyframes fadePulse {
  0% { opacity: 1; }
  25% { opacity: 0.45; }
  50% { opacity: 1; }
  75% { opacity: 0.55; }
  100% { opacity: 1; }
}

@keyframes glowSweep {
  0% { text-shadow: none; }
  30% { text-shadow: 0 0 8px rgba(10, 94, 143, 0.3); }
  60% { text-shadow: 0 0 18px rgba(10, 94, 143, 0.4); }
  100% { text-shadow: none; }
}

@keyframes letterShift {
  0% { letter-spacing: inherit; }
  40% { letter-spacing: 2px; }
  100% { letter-spacing: inherit; }
}

@keyframes subtleScale {
  0% { transform: scale(1); }
  40% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

@keyframes colorWave {
  0% { color: var(--navy); -webkit-text-fill-color: var(--navy); }
  30% { color: var(--gold); -webkit-text-fill-color: var(--gold); }
  70% { color: var(--gold-dark); -webkit-text-fill-color: var(--gold-dark); }
  100% { color: var(--navy); -webkit-text-fill-color: var(--navy); }
}

/* ─── Scroll-in entrance ─── */
.cv-section,
.cascade-item {
  opacity: 0;
  transform: translateY(28px);
}

.cv-section.animate-in,
.cascade-item.animate-in {
  animation: fadeSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--enter-delay, 0s);
}

/* Header always visible (no scroll needed) */
.cv-header {
  animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ─── Random title animation classes ─── */
.anim-fade-pulse {
  animation: fadePulse 1.1s ease-in-out !important;
}

.anim-glow-sweep {
  animation: glowSweep 1.2s ease-in-out !important;
}

.anim-letter-shift {
  animation: letterShift 1s ease-in-out !important;
}

.anim-subtle-scale {
  animation: subtleScale 0.9s ease-in-out !important;
  transform-origin: left center;
}

.anim-color-wave {
  animation: colorWave 1.2s ease-in-out !important;
}

/* ─── Divider glow pulse ─── */
.cv-section__heading::before {
  animation: fadePulse 3s ease-in-out infinite;
}

/* ─── Divider bottom border sweep ─── */
@keyframes borderSweep {
  0% { border-image-source: linear-gradient(90deg, var(--border) 0%, var(--border) 100%); }
  50% { border-image-source: linear-gradient(90deg, var(--border) 0%, var(--gold) 50%, var(--border) 100%); }
  100% { border-image-source: linear-gradient(90deg, var(--border) 0%, var(--border) 100%); }
}

.divider-glow {
  border-bottom: 1px solid var(--border);
  animation: borderSweep 6s ease-in-out infinite;
}
