*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0f1d2e;
  --slate: #1c2e42;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --cream: #f5f0e8;
  --cream-dark: #ece6d8;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── LAYOUT ── */
.cv-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 0 80px rgba(15, 29, 46, .18);
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--navy);
  color: var(--white);
  padding: 0 0 60px;
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .07;
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 60px;
  left: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .05;
}

/* photo + name header */
.profile-header {
  background: var(--slate);
  padding: 44px 32px 36px;
  text-align: center;
  position: relative;
}

.photo-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  margin: 0 auto 20px;
  overflow: hidden;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-ring svg {
  width: 70px;
  height: 70px;
  opacity: .4;
}

.profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--white);
}

.profile-title {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 8px;
  font-weight: 500;
}

/* sidebar sections */
.s-section {
  padding: 32px 32px 0;
}

.s-label {
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.s-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: .3;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: .82rem;
  color: rgba(255, 255, 255, .8);
  line-height: 1.5;
}

.contact-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(201, 168, 76, .15);
  border: 1px solid rgba(201, 168, 76, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.contact-icon svg {
  width: 13px;
  height: 13px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-bar-wrap {
  margin-bottom: 14px;
}

.skill-name {
  font-size: .78rem;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.skill-track {
  height: 3px;
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  animation: fillBar .9s ease both;
  animation-delay: var(--d, 0s);
}

@keyframes fillBar {
  from {
    width: 0 !important;
  }
}

/* Download Actions Styling */
.actions-container {
  padding: 32px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.72rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.download-btn.secondary {
  background: var(--slate);
  color: var(--white);
  border: 1px solid var(--gold);
}

.download-btn.secondary:hover {
  background: var(--navy);
}

.download-btn svg {
  width: 14px;
  height: 14px;
}

/* ── TRADITIONAL MODE (FOR PDF CREATION) ── */
body.traditional-mode {
  background: white;
  color: black;
}

.traditional-mode .cv-wrapper {
  display: block;
  max-width: 800px;
  box-shadow: none;
  background: white;
  padding: 0;
  margin: 0 auto;
}

.traditional-mode .sidebar {
  display: block;
  background: white !important;
  color: black !important;
  padding: 0;
  overflow: visible;
}

.traditional-mode .sidebar::before,
.traditional-mode .sidebar::after {
  display: none;
}

.traditional-mode .profile-header {
  background: white !important;
  padding: 0 0 20px;
  text-align: left;
  border-bottom: 2px solid #333;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.traditional-mode .photo-ring {
  margin: 0;
  order: 2;
  width: 100px;
  height: 100px;
  border: 1px solid #ccc;
}

.traditional-mode .profile-name {
  color: #000 !important;
  font-size: 2.4rem;
  order: 1;
}

.traditional-mode .profile-title {
  color: #555 !important;
  font-size: 0.9rem;
  margin-top: 5px;
}

.traditional-mode .s-section {
  padding: 0;
  margin-bottom: 15px;
}

.traditional-mode .s-label {
  color: #000 !important;
  border-bottom: 1px solid #ccc;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.traditional-mode .s-label::after {
  display: none;
}

.traditional-mode .contact-item {
  color: #333 !important;
  margin-bottom: 5px;
  font-size: 0.85rem;
}

.traditional-mode .contact-icon {
  display: none;
}

.traditional-mode .skill-bar-wrap {
  display: inline-block;
  margin-right: 15px;
  margin-bottom: 5px;
}

.traditional-mode .skill-name {
  color: #333 !important;
}

.traditional-mode .skill-name span:last-child {
  display: none;
}

.traditional-mode .skill-track {
  display: none;
}

.traditional-mode .main {
  background: white !important;
  padding: 0;
}

.traditional-mode .main-name,
.traditional-mode .main-subtitle,
.traditional-mode .actions-container,
.traditional-mode .footer-strip {
  display: none !important;
}

.traditional-mode .section-title {
  color: #000 !important;
  font-size: 1rem;
  margin-top: 25px;
  border-bottom: 1.5px solid #444;
  padding-bottom: 4px;
}

.traditional-mode .section-title::before,
.traditional-mode .section-title::after {
  display: none;
}

.traditional-mode .about-text {
  font-family: serif;
  font-style: normal;
  border-left: none;
  padding-left: 0;
  color: #333;
  font-size: 0.95rem;
  max-width: 100%;
}

.traditional-mode .exp-item {
  grid-template-columns: 1fr;
  margin-bottom: 20px;
}

.traditional-mode .exp-date {
  text-align: left;
  font-weight: bold;
}

.traditional-mode .exp-date span {
  color: #333;
  font-size: 0.85rem;
}

.traditional-mode .exp-dot::before,
.traditional-mode .exp-dot::after {
  display: none;
}

.traditional-mode .exp-role {
  font-size: 1.1rem;
  color: #000;
}

.traditional-mode .exp-company {
  color: #333;
  font-style: italic;
  text-transform: none;
  font-size: 0.95rem;
}

.traditional-mode .exp-duties {
  display: block;
  padding-left: 20px;
}

.traditional-mode .exp-duties li {
  background: none;
  border: none;
  padding: 0;
  color: #222;
  list-style: disc;
  white-space: normal;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.traditional-mode .edu-item {
  gap: 0;
  border: none;
  margin-bottom: 15px;
}

.traditional-mode .edu-icon {
  display: none;
}

.traditional-mode .edu-degree {
  font-size: 1rem;
  color: #000;
}

.traditional-mode .edu-inst,
.traditional-mode .edu-year {
  color: #333;
  position: relative;
}

.traditional-mode .refs-grid {
  grid-template-columns: 1fr 1fr;
}

.traditional-mode .ref-card {
  border: none;
  padding: 0;
}

.traditional-mode .ref-card:hover {
  box-shadow: none;
}

.traditional-mode .ref-name {
  color: #000;
  font-size: 0.95rem;
}

.traditional-mode .ref-phone {
  color: #333;
  font-size: 0.85rem;
}

.traditional-mode .ref-phone svg {
  display: none;
}

/* ── MAIN ── */
.main {
  background: var(--cream);
  padding: 60px 56px 80px;
  position: relative;
}

.main-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.6rem;
  font-weight: 300;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--navy);
  margin-bottom: 4px;
}

.main-name em {
  font-style: italic;
  color: var(--gold);
}

.main-subtitle {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 500;
}

/* sections */
.section {
  margin-bottom: 44px;
}

.section-title {
  font-size: .62rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 500;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}

/* about */
.about-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.75;
  color: #3a3a4a;
  font-weight: 400;
  max-width: 560px;
  font-style: italic;
  border-left: 2px solid var(--gold);
  padding-left: 20px;
}

/* experience */
.exp-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0 28px;
  margin-bottom: 30px;
  position: relative;
}

.exp-date {
  text-align: right;
  padding-top: 3px;
}

.exp-date span {
  font-size: .72rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: .05em;
  white-space: nowrap;
}

.exp-dot {
  position: relative;
}

.exp-dot::before {
  content: '';
  position: absolute;
  right: -28px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--gold);
}

.exp-dot::after {
  content: '';
  position: absolute;
  right: -24px;
  top: 16px;
  width: 1px;
  height: calc(100% + 14px);
  background: var(--cream-dark);
}

.exp-content {
  padding-bottom: 25px;
  padding-left: 10px;
}

.exp-role {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.exp-company {
  font-size: .78rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.exp-duties {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.exp-duties li {
  font-size: .74rem;
  color: var(--text-muted);
  background: var(--cream-dark);
  border: 1px solid rgba(0, 0, 0, .07);
  padding: 3px 10px;
  border-radius: 30px;
  white-space: nowrap;
}

/* education */
.edu-item {
  display: flex;
  gap: 20px;
  margin-bottom: 22px;
}

.edu-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.edu-degree {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}

.edu-inst {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.edu-year {
  font-size: .7rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: .06em;
  margin-top: 4px;
}

/* references */
.refs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ref-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color .2s, box-shadow .2s;
}

.ref-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 18px rgba(201, 168, 76, .12);
}

.ref-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.ref-phone {
  font-size: .74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ref-phone svg {
  width: 11px;
  height: 11px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
}

/* footer strip */
.footer-strip {
  background: var(--navy);
  grid-column: 1 / -1;
  padding: 14px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-strip span {
  font-size: .7rem;
  color: rgba(255, 255, 255, .35);
  letter-spacing: .1em;
}

.footer-strip a {
  font-size: .7rem;
  color: var(--gold);
  letter-spacing: .1em;
  text-decoration: none;
}

/* entrance animations */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp .6s ease both;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-in:nth-child(1) {
  animation-delay: .05s;
}

.fade-in:nth-child(2) {
  animation-delay: .12s;
}

.fade-in:nth-child(3) {
  animation-delay: .19s;
}

.fade-in:nth-child(4) {
  animation-delay: .26s;
}

@media (max-width: 768px) {
  .cv-wrapper {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 40px 28px 60px;
  }

  .main-name {
    font-size: 2.6rem;
  }

  .exp-item {
    grid-template-columns: 80px 1fr;
    gap: 0 16px;
  }

  .refs-grid {
    grid-template-columns: 1fr;
  }

  .footer-strip {
    padding: 14px 28px;
    flex-direction: column;
    gap: 6px;
  }
}

@media print {
  body {
    background: white;
  }

  .cv-wrapper {
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }

  .sidebar {
    background: #0f1d2e !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .download-btn,
  .actions-container,
  .footer-strip {
    display: none !important;
  }

  .skill-fill {
    animation: none !important;
  }
}