/* ============================================================
   CV SECTION
   ============================================================ */
.cv-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 3rem 4rem;
  max-width: 900px;
  margin: 0 auto 4rem;
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
  text-align: left;
}

.cv-header {
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}

.cv-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.cv-contact {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cv-contact a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cv-contact a:hover {
  color: var(--accent-secondary);
}

.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section-title {
  font-size: 1.1rem;
  color: var(--accent-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.cv-text {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.cv-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.cv-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.cv-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

.cv-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cv-item {
  margin-bottom: 1.5rem;
}

.cv-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.cv-item-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cv-item-date {
  font-size: 0.85rem;
  color: var(--accent-secondary);
  font-weight: 500;
}

.cv-item-subtitle {
  font-size: 0.95rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.cv-footer {
  text-align: center;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

@media (max-width: 768px) {
  .cv-container { padding: 2rem; }
  .cv-item-header { flex-direction: column; align-items: flex-start; }
}

.cv-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch; /* Forces both columns to be the exact same height */
}

@media (max-width: 1024px) {
  .cv-split-layout {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  .cv-pdf-embed-wrapper {
    min-height: 520px;
  }
  .cv-iframe {
    min-height: 460px;
    height: 460px;
  }
}

@media (max-width: 480px) {
  .cv-pdf-embed-wrapper {
    min-height: 440px;
    padding: 10px;
    border-radius: 10px;
  }
  .cv-iframe {
    min-height: 380px;
    height: 380px;
  }
  .cv-container {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .cv-name {
    font-size: 1.8rem;
  }

  .cv-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .cv-contact {
    font-size: 0.78rem;
    gap: 0.5rem;
  }

  .cv-section-title {
    font-size: 1rem;
  }

  .cv-text,
  .cv-list li {
    font-size: 0.88rem;
  }

  .cv-item-title {
    font-size: 1rem;
  }

  .cv-item-date {
    font-size: 0.78rem;
  }

  .cv-split-layout {
    gap: 2.5rem;
  }

  .cv-pdf-embed-wrapper {
    padding: 10px;
    border-radius: 10px;
  }

  .cv-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
}

.cv-right {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.cv-pdf-embed-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; 
  width: 100%;
  flex: 1; /* Forces the box to perfectly fill the cv-right container (matching Education height) */
  background: var(--bg-card);
  border: 2px solid var(--accent-primary);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 0 25px var(--accent-glow), 0 15px 35px rgba(0,0,0,0.2);
}

.cv-iframe {
  flex: 1; /* Forces iframe to fill the exact remaining height of the wrapper */
  width: 100%;
  height: 100%;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  overflow: hidden;
  display: block;
}

.cv-download-action {
  padding: 0.8rem 0 0 0;
  margin-top: 8px;
  background: transparent;
  border-top: 1px dashed var(--border-card);
  display: flex;
  justify-content: center;
  align-items: center;
}

.cv-btn {
  flex: 1;
  max-width: 150px;
  padding: 0.6rem 1rem !important; /* Override standard .btn padding */
  font-size: 0.8rem !important;
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

/* ── SIDE ORNAMENTS ────────────────────────────────────────── */
.side-ornament-left,
.side-ornament-right {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.side-ornament-left {
  left: 20px;
}

.side-ornament-right {
  right: 20px;
}

/* Left Ornaments */
.so-left-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
  margin: 20px 0;
}

.so-left-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  position: relative;
  padding: 20px 0;
}

.so-scan-line {
  position: absolute;
  left: -5px;
  top: 0;
  width: 2px;
  height: 20px;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: scan 4s ease-in-out infinite alternate;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: calc(100% - 20px); }
}

/* Right Ornaments */
.so-right-data {
  writing-mode: vertical-rl;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-primary);
  opacity: 0.6;
  letter-spacing: 5px;
  margin-bottom: 20px;
  animation: dataStream 10s linear infinite;
  display: flex;
  gap: 10px;
}

.so-right-data span {
  display: inline-block;
  transform: rotate(90deg);
}

@keyframes dataStream {
  0% { transform: translateY(-10px); opacity: 0.3; }
  50% { transform: translateY(10px); opacity: 0.8; }
  100% { transform: translateY(-10px); opacity: 0.3; }
}

.so-right-track {
  height: 150px;
  width: 2px;
  background: var(--border-color);
  position: relative;
}

.so-right-progress {
  position: absolute;
  top: 0;
  left: -1px;
  width: 4px;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
  height: 0%; /* updated via JS */
  transition: height 0.1s linear;
}

@media (max-width: 1400px) {
  .side-ornament-left,
  .side-ornament-right {
    display: none;
  }
}

/* ── GLOBAL EFFECTS & FRAMING ─────────────────────────────── */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 4px 4px;
}

.global-frame {
  position: fixed;
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
  border: 1px solid var(--border-color);
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
}

.frame-corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-glow);
}

.frame-corner.top-left {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.frame-corner.top-right {
  top: -1px;
  right: -1px;
  border-left: none;
  border-bottom: none;
}

.frame-corner.bottom-left {
  bottom: -1px;
  left: -1px;
  border-right: none;
  border-top: none;
}

.frame-corner.bottom-right {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

@media (max-width: 768px) {
  .global-frame {
    display: none;
  }
}