:root {
  --sidebar-bg: #333b47;
  --sidebar-header-bg: #404854;
  --accent-yellow: #ffcc00;
  --accent-blue: #4a90e2;
  --text-white: #ffffff;
  --font-mono: "OCR A Std", "OCR A", "Source Code Pro", monospace;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-mono);
  background-color: #555;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  position: relative;
}

.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--accent-yellow);
  color: #333;
  border: none;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  background-color: #ffd633;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lang-toggle:active {
  transform: scale(0.95);
}

.download-btn {
  position: fixed;
  top: 20px;
  right: 100px;
  background-color: #f2f2f2;
  border: none;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn:hover {
  background-color: #c0c0c0;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.download-btn:active {
  transform: scale(0.95);
}

.funny-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
}

.funny-btn:hover {
  transform: scale(1.3) rotate(15deg);
}

.funny-btn:active {
  transform: scale(0.9) rotate(-15deg);
}

.container {
  width: 215.9mm;
  min-height: 300mm;
  background-color: white;
  display: flex;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* SIDEBAR */
.sidebar {
  width: 35%;
  background-color: var(--sidebar-bg);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
}

.photo-container {
  width: 100%;
  height: 100%;
  background-color: #d1d1d1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.slider-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
}

.slider-wrapper img {
  width: 100%;
  object-fit: contain;
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slider-wrapper img.active {
  position: relative;
  opacity: 1;
}

.sidebar-header {
  background-color: var(--sidebar-header-bg);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  border-left: 6px solid var(--accent-yellow);
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-content {
  padding: 20px 30px;
}

.contact-item {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.contact-label {
  color: var(--accent-yellow);
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 3px;
  line-height: 0;
}

.contact-label i {
  background: var(--accent-yellow);
  color: var(--sidebar-bg);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
  font-size: 0.8rem;
}

.contact-value {
  font-size: 0.8rem;
  padding-left: 28px;
  color: var(--text-white);
}

.contact-value a {
  color: var(--text-white);
  text-decoration: none;
}

.contact-value a:hover {
  color: var(--accent-yellow);
  text-decoration: underline;
}

.sidebar-divider {
  border: 0;
  border-top: 1px solid var(--accent-yellow);
  margin: 15px 0;
  position: relative;
}

.sidebar-divider::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  background: var(--accent-yellow);
  border-radius: 50%;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.lang-item span:first-child::after {
  content: " ──▶";
  color: var(--accent-yellow);
  margin-left: 5px;
}

.skill-legend {
  font-size: 0.65rem;
  margin-bottom: 20px;
  text-align: center;
  font-style: italic;
}

.skill-category {
  font-size: 0.9rem;
  color: var(--text-white);
  margin: 15px 0 10px 0;
  font-weight: bold;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-item {
  font-size: 0.8rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.dot-a {
  color: var(--accent-yellow);
  margin-right: 8px;
  font-size: 0.8rem;
}

.dot-i {
  color: var(--accent-blue);
  margin-right: 8px;
  font-size: 0.8rem;
}

.os-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  font-size: 0.8rem;
  margin-top: 10px;
}

.os-item {
  display: flex;
  align-items: center;
}

/* MAIN CONTENT */
.main-content {
  width: 65%;
  padding: 0px 0px 40px 0px;
  background: #fff;
}

.name-header {
  padding: 20px;
  background: #fff;
}

.name-header h1 {
  font-size: 3rem;
  margin: 0;
  color: #333;
}

.name-header h2 {
  font-size: 1.5rem;
  color: #666;
  font-weight: normal;
  margin-top: 5px;
}

.name-header h2 span {
  color: var(--accent-yellow);
}

.name-header-mobile {
  display: none;
  padding: 20px;
}

.name-header-mobile h1 {
  font-size: 2rem;
  margin: 0;
  color: var(--text-white);
}

.name-header-mobile h2 {
  font-size: 1.2rem;
  color: #ccc;
  font-weight: normal;
  margin-top: 5px;
}

.name-header-mobile h2 span {
  color: var(--accent-yellow);
}

.section {
  width: 65%;
}

.main-section-title {
  background-color: #f2f2f2;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  border-left: 6px solid var(--accent-yellow);
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sub-section-title {
  font-weight: bold;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--accent-yellow);
  display: inline-block;
  margin-bottom: 15px;
  padding-right: 20px;
  text-transform: capitalize;
}

.main-text {
  font-size: 0.8rem;
  line-height: 1.2;
  color: #333;
  text-align: justify;
  margin-bottom: 10px;
  padding: 20px 30px;
}

.exp-box {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.exp-left {
  font-weight: bold;
  font-size: 0.8rem;
}

.exp-middle {
  font-size: 0.8rem;
  color: #666;
}

.exp-right {
  width: 50%;
  font-size: 0.8rem;
  color: #666;
  text-align: right;
}

.main-list {
  padding: 20px;
}

.main-list li {
  font-size: 0.8rem;
  line-height: 1.2;
  margin-bottom: 15px;
  list-style: none;
  position: relative;
}

.main-list li::before {
  content: "●";
  color: var(--accent-yellow);
  position: absolute;
  left: -18px;
  font-size: 0.8rem;
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 15px;
  margin-bottom: 25px;
  font-size: 0.8rem;
}

.edu-year {
  font-weight: bold;
}

.conf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.conf-table td {
  padding: 5px 0;
  vertical-align: top;
}

.conf-year {
  width: 30%;
  font-weight: bold;
}

@media print {
  .name-header-mobile {
    display: none !important;
  }

  .name-header {
    display: block !important;
  }

  .funny-btn {
    display: none !important;
  }

  @page {
    size: 8.5in 13in;
    margin: 0;
  }

  body {
    padding: 0 !important;
    background: white;
    gap: 0 !important;
    margin: 0 !important;
  }

  .container {
    box-shadow: none;
    width: 215.9mm !important;
    max-width: 215.9mm !important;
    min-height: 330.2mm !important;
    height: 330.2mm !important;
    margin: 0 !important;
    page-break-after: always;
    page-break-inside: avoid;
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden !important;
    border-radius: 0 !important;
  }

  .container:last-child {
    page-break-after: auto;
  }

  .sidebar {
    width: 35% !important;
    background-color: var(--sidebar-bg);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
  }

  .main-content {
    width: 65% !important;
    padding: 0px 0px 40px 0px !important;
  }

  .photo-container {
    height: 550px !important;
    background-color: #d1d1d1;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .slider-wrapper {
    height: 550px !important;
  }

  .sidebar-header {
    background-color: var(--sidebar-header-bg);
    border-left: 6px solid var(--accent-yellow);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .main-section-title {
    background-color: #f2f2f2;
    border-left: 6px solid var(--accent-yellow);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .photo-container {
    background-color: #d1d1d1;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .contact-label i {
    background: var(--accent-yellow);
    color: var(--sidebar-bg);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .contact-label,
  .lang-item span:first-child::after,
  .main-list li::before,
  .platzi-list li::before,
  .dot-a {
    color: var(--accent-yellow) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .dot-i {
    color: var(--accent-blue) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .name-header h2 span {
    color: var(--accent-yellow) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .sub-section-title {
    border-bottom: 2px solid var(--accent-yellow) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .sidebar-divider {
    border-top: 1px solid var(--accent-yellow) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .sidebar-divider::after {
    background: var(--accent-yellow) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .dot.active {
    background-color: var(--accent-yellow) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  .slider-btn {
    display: none !important;
  }

  a {
    text-decoration: none;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  .lang-toggle {
    display: none;
  }

  .download-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    gap: 20px;
  }

  .lang-toggle {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .download-btn {
    top: 10px;
    right: 80px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .funny-btn {
    top: 10px;
    left: 10px;
    font-size: 1.2rem;
  }

  .container {
    width: 100%;
    min-height: auto;
    flex-direction: column;
    overflow: visible;
    box-shadow: none;
    border-radius: 8px;
    margin-bottom: 20px;
  }

  .sidebar {
    width: 100%;
    padding-bottom: 20px;
  }

  .name-header {
    display: none;
  }

  .name-header-mobile {
    display: block;
  }

  .photo-container {
    height: 400px;
  }

  .slider-wrapper {
    height: 400px;
  }

  .slider-wrapper img {
    height: 100%;
  }

  .main-content {
    width: 100%;
    padding: 15px;
  }

  .name-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
  }

  .name-header h2 {
    font-size: 1.2rem;
  }

  .main-section-title {
    font-size: 1rem;
  }

  .section {
    width: 100%;
  }

  .main-text {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 15px;
  }

  .main-list {
    font-size: 0.85rem;
    padding-left: 20px;
    margin-bottom: 15px;
  }

  .main-list li {
    margin-bottom: 8px;
  }

  .sidebar-header {
    font-size: 0.95rem;
  }

  .contact-item {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .photo-container {
    height: 150px;
  }

  .slider-wrapper {
    height: 140px;
  }
}

@media (max-width: 480px) {
  body {
    gap: 15px;
  }

  .lang-toggle {
    padding: 6px 10px;
    font-size: 0.7rem;
    top: 8px;
    right: 8px;
  }

  .download-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
    top: 8px;
    right: 70px;
  }

  .container {
    margin-bottom: 15px;
    border-radius: 6px;
  }

  .photo-container {
    height: 400px;
  }

  .slider-wrapper {
    height: 400px;
  }

  .slider-wrapper img {
    height: 100%;
  }

  .main-content {
    padding: 12px;
  }

  .name-header h1 {
    font-size: 1.5rem;
    margin: 0 0 3px 0;
  }

  .name-header h2 {
    font-size: 1rem;
    margin: 0;
  }

  .section {
    width: 100%;
  }

  .main-section-title {
    font-size: 0.9rem;
  }

  .main-text {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 10px;
  }

  .main-list {
    font-size: 0.8rem;
    padding-left: 15px;
    margin-bottom: 10px;
  }

  .main-list li {
    margin-bottom: 6px;

    .sidebar-header {
      font-size: 0.85rem;
    }

    .contact-item {
      font-size: 0.75rem;
      margin-bottom: 10px;
    }

    .contact-label {
      font-size: 0.75rem;
    }

    .skill-category {
      font-size: 0.8rem;
      margin-top: 10px;
      margin-bottom: 6px;
    }

    .skill-list {
      font-size: 0.75rem;
    }

    .exp-box {
      gap: 6px;
      margin-bottom: 8px;
    }

    .exp-left,
    .exp-middle,
    .exp-right {
      font-size: 0.8rem;
    }

    .edu-year,
    .edu-info {
      font-size: 0.75rem;
    }

    .sub-section-title {
      font-size: 0.8rem;
      margin-top: 10px;
      margin-bottom: 6px;
    }

    .lang-item {
      font-size: 0.75rem;
      margin-bottom: 6px;
    }

    .conf-table {
      font-size: 0.7rem;
    }

    .skill-legend {
      font-size: 0.7rem;
    }
  }
}