* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, Verdana, sans-serif;
  /* background: #3a6ea5; */
}

a,
a:focus,
a:active,
a:visited {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: underline;
}

.window {
  margin: 10px;
  /* border: 2px solid #3a6ea5; */
  border: 1px solid #a0a0a0;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}

.content {
  padding: 12px;
  /* Use primary color at the top, fading to white */
  background: linear-gradient(to bottom,
      var(--primary-color) 0%,
      var(--primary-soft) 20%,
      #ffffff 100%);
  min-height: 400px;
}

.profile-header {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
}

.lang-control {
  position: absolute;
  top: 0px;
  right: 0px;
}

#langSwitcher {
  cursor: pointer;
  background: none;
  border: none;
}

.profile-header img {
  border: 1px solid #a0a0a0;
  border-radius: 3px;
}

.profile-header h1 {
  margin: 0;
  font-size: 1rem;
}

.avatar {
  width: 80px;
  height: 80px;
  border: 2px inset #ccc;
  object-fit: cover;
}

/* .profile-header .status */

.section {
  margin-top: 15px;
  border: 1px solid #a0a0a0;
  background: rgba(255, 255, 255, 0.7);
  /* Semi-transparent white */
  backdrop-filter: blur(2px);
  /* Modern touch that mimics old glass effects */
  border-radius: 5px;
  overflow: hidden;
}

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

.vertical-list {
  list-style: none;
  padding: 0;
  margin: 0;
  list-style-type: circle;
  list-style-position: outside;
  padding-left: 1.25rem;
}

.tech-stack-container,
.description-container,
.section .list-title {
  margin-top: 20px;
}

.section h2 {
  margin: 0;
  background: var(--secondary-color);
  padding: 6px;
  font-size: 14px;
  border-bottom: 1px solid #a0a0a0;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.section-content {
  padding: 8px;
  font-size: 13px;
}

.skill-bar {
  height: 6px;
  background: #ddd;
  margin: 4px 0 8px;
}

.lang-native {
  color: #1f4f91;
}

.lang-bilingual {
  color: #247a00;
}

.lang-intermediate {
  color: #FFB300;
}

.lang-beginner {
  color: #D50000;
}

.skill-fill {
  height: 100%;
  background: var(--accent-color);
}

.msn-pagination {
  text-align: center;
  margin-top: 8px;
}

.msn-pagination button {
  background: linear-gradient(#fff, #d6e8ff);
  border: 1px solid var(--secondary-color);
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all .1s;
}

.msn-pagination button:not(:disabled):hover {
  /* Use a soft blue tint instead of the full accent color */
  background: linear-gradient(#f0f7ff, #b8d6fb);
  border-color: var(--accent-color);
  box-shadow: 0 0 3px rgba(58, 110, 165, 0.4);
  /* Subtle glow */
}

.exp-unit {
  padding: 5px 0;
  line-height: 1.4;
}

.exp-unit p,
.skill small {
  margin: 4px 0;
  color: #444;
}

/* Classic MSN Messenger horizontal divider */
.msn-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #a0a0a0, transparent);
  margin: 10px 0;
}

/* Style for disabled buttons to look more like legacy Windows */
.msn-pagination button:disabled {
  color: #888;
  cursor: default;
  background: #f5f5f5;
  border-color: #ccc;
}

.edu-unit {
  padding: 5px 2px;
}

.edu-detail {
  font-size: 11px;
  color: #666;
  display: block;
  margin-top: 2px;
}

.proj-unit {
  padding: 6px;
}

.proj-unit strong {
  padding: 5px 2px;
}

.proj-unit small {
  display: block;
  color: #777;
  font-size: 11px;
}

/* Container for the tags */
.skill-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 5px 0;
}

/* The MSN-style Glossy Tag */
.msn-tag {
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  color: #1e395b;
  border: 1px solid #a0a0a0;
  cursor: default;

  background: none;

  /* Subtle 2000s depth */
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  transition: all .5s;
}

/* Hover effect because old-school UI loved interactivity */
.msn-tag:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Ensure the units handle the extra height well */
.exp-unit,
.proj-unit {
  padding: 10px 5px;
}

.footer {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-top: 1px solid #a0a0a0;
  padding: 4px 10px;
  font-size: 11px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 5px;
  /* Bevel effect */
  box-shadow: inset 0 1px 0 #fff;
}

/* Vertical dividers common in Windows Status Bars */
.footer-divider {
  width: 1px;
  height: 14px;
  background-color: #a0a0a0;
  border-right: 1px solid #fff;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 60px;
}

/* The pulse of the mid-2000s: A glowing status dot */
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #33ff00;
  border: 1px solid #247a00;
  border-radius: 50%;
  box-shadow: 0 0 4px #33ff00;
  display: inline-block;
  flex-shrink: 0;
}

.footer-center {
  flex-grow: 1;
  text-align: center;
  font-style: italic;
  color: #666;
}

.footer-right {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  color: #31659c;
}

.section,
.section-content,
.skills-page {
  overflow: visible !important;
}

/* Ensure the skill itself doesn't clip its own children */
.skill {
  position: relative;
  overflow: visible;
}

.only-print {
  display: none;
}

@media (min-width: 720px) {
  .profile-header h1 {
    font-size: 2rem;
  }
}

@media (min-width: 900px) {
  .window {
    max-width: 900px;
    margin: 20px auto;
  }

  .profile-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 15px;
  }

  .left-column {
    border-right: 1px solid #ccc;
    padding-right: 10px;
  }
}

@media print {

  .msn-tag {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    color: #1e395b;
    border: none;
    cursor: default;

    /* Classic Vista/XP Glass Gradient */
    background: none;

    /* Subtle 2000s depth */
    box-shadow: none;
    text-shadow: none;
    white-space: nowrap;
  }

  /* Hide MSN UI elements that don't belong on paper */
  .title-bar,
  .msn-pagination,
  .footer,
  #prevSkillBtn,
  #nextSkillBtn {
    display: none !important;
  }

  /* Reset the 'Window' look to a flat page */
  .window {
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Reveal all paginated content at once */
  .skills-page,
  .experience-page,
  .project-page {
    display: block !important;
    page-break-inside: avoid;
  }

  .skills-page {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr !important;
    gap: 5px !important;
    margin-bottom: 0;
  }

  /* Force link colors to black and remove '🔗' emoji if desired */
  a {
    color: black !important;
    text-decoration: none;
  }

  /* Stack columns vertically for a standard resume flow */
  .profile-layout {
    display: block !important;
  }

  .no-print {
    display: none;
  }

  .only-print {
    display: inline;
  }
}

/* --- Desktop: Instant Glossy Tooltip --- */
@media (hover: hover) {
  .skill {
    position: relative;
  }

  .skill:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 0;
    max-width: 100%;
    background: #ffffca;
    /* Classic Windows Yellow */
    border: 1px solid #000;
    padding: 3px 6px;
    font-size: 11px;
    z-index: 100;
    display: block;
    opacity: 1;
    pointer-events: none;
    /* Instant appearance */
  }

  .chevron,
  .skill-comment {
    display: none;
    /* Hide expansion on desktop if you prefer tooltips there */
  }
}

/* --- Mobile: Solution 2 Expansion --- */
@media (hover: none) {

  /* Ensure the skill container can hold the absolute tooltip */
  .skill {
    position: relative;
  }

  /* Hide the tooltip by default */
  .skill::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #fffcc7;
    /* Classic Windows Yellow Note color */
    color: #000;
    padding: 8px;
    border: 1px solid #808080;
    border-radius: 5px;
    font-size: 11px;
    width: 150px;
    white-space: normal;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    z-index: 999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s;
  }

  /* Show on Hover (Desktop) AND Focus (Touch tap) */
  .skill:hover::after,
  .skill:focus::after {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Add to style.css */
[dir="rtl"] .profile-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .left-column {
  border-right: none;
  border-left: 1px solid #ccc;
  padding-right: 0;
  padding-left: 10px;
}

[dir="rtl"] .footer {
  flex-direction: row-reverse;
}