/* Windows XP Desktop Environment Variables */
:root {
  /* Monitor frame */
  --frame-light: #e0e0e0;
  --frame-dark:  #c0c0c0;
  --frame-shadow:#8a8a8a;
  --screen-bezel:#1a1a1a;
  
  /* XP UI palette */
  --xp-bg:           #3a6ea5;
  --xp-desktop:      #3a6ea5;
  --xp-window-bg:    #ece9d8;
  --xp-titlebar:     linear-gradient(to bottom, #0054e3 0%, #0041d5 3%, #1a58f2 6%, #1a58f2 94%, #0041d5 97%, #0054e3 100%);
  --xp-titlebar-inactive: linear-gradient(to bottom, #7a96df 0%, #6688dd 50%, #5577cc 100%);
  --xp-titlebar-text:#ffffff;
  --xp-button-face:  #ece9d8;
  --xp-button-border-light: #ffffff;
  --xp-button-border-dark:  #aca899;
  --xp-text:         #000000;
  --xp-taskbar:      linear-gradient(to bottom, #245edb 0%, #1941a5 3%, #1941a5 97%, #245edb 100%);
  --xp-start-btn:    linear-gradient(to bottom, #1cb901 0%, #1cb901 48%, #139801 52%, #0e7701 100%);
  
  /* Phosphor glow */
  --phosphor-glow:   rgba(255,255,255,0.1);
}


/* Windows XP Desktop */
.education-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  background: none; /* Remove CRT background if any */
}

.education {
  position: relative;
  z-index: 5;
  margin: 0 auto;
  min-height: 0;
  background: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}



/* XP Window */
.xp-window {
  background: var(--xp-window-bg);
  border: 1px solid var(--xp-button-border-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,0.20), 0 12px 48px rgba(0,0,0,0.10);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  max-width: 900px;    /* Increased from 700px */
  width: 98vw;         /* Fills most of the screen, but leaves space */
  min-width: 320px;
  position: static;
  left: unset;
  right: unset;
}

/* Responsive: on small screens, keep it full but with side space */
@media (max-width: 1000px) {
  .xp-window {
    max-width: 99vw;
    width: 99vw;
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 800px) {
  .xp-window {
    max-width: 100vw;
    width: 100vw;
    border-radius: 6px 6px 0 0;
  }
  .xp-content {
    padding: 8px;
  }
}

@media (max-width: 600px) {
  .xp-window {
    max-width: 96vw !important;
    width: 96vw !important;
    border-radius: 4px 4px 0 0 !important;
    min-width: 0 !important;
    min-height: 70vh !important;          /* Make window taller */
    display: flex;
    flex-direction: column;
  }
  .education {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
  }
  .xp-content {
    height: fit-content;              /* Fill available height */
    overflow: visible;
    padding-left: 0;
    padding-right: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
}

/* Responsive: on small screens, reduce margin and keep side space */
@media (max-width: 800px) {
  .xp-window {
    max-width: 98vw;
    width: 98vw;
    border-radius: 6px 6px 0 0;
  }
  .xp-content {
    padding: 8px;
  }
}



/* Window Title Bar */
.xp-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--xp-titlebar);
  color: var(--xp-titlebar-text);
  padding: 3px 8px 3px 8px;
  font-weight: normal;
  font-size: 1.5rem;
  user-select: none;
  height: 2rem;
}

.xp-titlebar .title {
  display: flex;
  align-items: center; /* vertically centers children */
  gap: 4px;            /* small gap between icon and text */
  line-height: 1.5rem; /* match the titlebar height for consistency */
}

.xp-titlebar .title::before {
  content: '📄';
  font-size: 1.2rem;
  display: inline-block;
  line-height: 1.5rem; /* same as parent for vertical alignment */
  vertical-align: middle; /* extra safety for emoji alignment */
}

/* Window Control Buttons */
.xp-controls {
  display: flex;
  gap: 2px;
}

.xp-controls .btn {
  width: 1.5rem;
  height: 1rem;
  background: var(--xp-button-face);
  border: 1px solid var(--xp-button-border-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: #000;
  transition: all 0.1s;
}

.xp-controls .btn:hover {
  background: #f5f5f5;
  border-color: #0054e3;
}

.xp-controls .btn:active {
  background: #e5e5e5;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3);
}

.xp-controls .btn.minimize::after { content: '_'; }
.xp-controls .btn.maximize::after { content: '□'; }
.xp-controls .btn.close { 
  background: #ff5c5c; 
  color: white;
}
.xp-controls .btn.close::after { content: '×'; font-size: 10px; }
.xp-controls .btn.close:hover { background: #ff3333; }

/* Window Content */
.xp-content {
  padding: 20px;
  color: var(--xp-text);
  /* Fit content instead of forcing internal scroll */
  max-height: none;
  height: auto;
  overflow: visible;
}

/* Section Title */
.education h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: bold;
  color: var(--xp-text);
}

/* Education Content Layout */
.education-content {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  gap: 1rem;
}

/* Make the degrees area a boxed panel like skills */
.degrees {
  background: #f7f7f7;
  border: 1px inset var(--xp-button-border-dark);
  padding: 8px;
  border-radius: 2px;
}

/* Stack individual degree/certificate cards with spacing */
#education-degrees {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* Optional: wider screens could go 2-up
@media (min-width: 900px) {
  #education-degrees { grid-template-columns: 1fr 1fr; }
}
*/

/* Show dataset label as a small header badge inside the card */
.edu-card[data-label]::before {
  content: attr(data-label);
  display: inline-block;
  margin: 0 0 6px 0;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  background: #e1e1e1;
  border: 1px inset var(--xp-button-border-dark);
  border-radius: 2px;
  color: #333;
}

/* Education Cards */
.edu-card {
  background: var(--xp-window-bg);
  border: 1px solid var(--xp-button-border-dark);
  box-shadow: inset 1px 1px 0 var(--xp-button-border-light);
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 2px;
}

.edu-card h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: bold;
  color: var(--xp-text);
}

.edu-card .institution {
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}

.edu-card .dates {
  display: inline-block;
  background: #e1e1e1;
  padding: 1px 4px;
  font-size: 10px;
  border: 1px inset var(--xp-button-border-dark);
  border-radius: 2px;
  color: #333;
}

/* Skills Section */
.skills h3 {
  padding-top: 0.8rem;
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--xp-text);
  text-align: left;
  padding-bottom: 4px;
  border-bottom: 1px solid #ccc;
}

.skill-category {
  margin-bottom: 18px;         /* More space between categories */
}

.skill-category h4 {
  font-size: 13px;
  font-weight: bold;
  margin: 12px 0 8px 0;        /* Top and bottom margin for separation */
  color: #333;
  display: block;
}

.skill-badge {
  display: inline-block;
  margin: 1px;
  padding: 2px 8px;    /* More padding for bigger text */
  font-size: 1rem;     /* Was 9px */
  background: #ffffff;
  border: 1px solid var(--xp-button-border-dark);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.8);
  border-radius: 2px;
  color: #000;
}

.xp-window {
  resize: none !important;
}
.xp-window textarea {
  resize: none !important;
}

@media (min-resolution: 120dpi), 
       (min--moz-device-pixel-ratio: 1.25), 
       (min-device-pixel-ratio: 1.25), 
       (min-resolution: 1.25dppx) {
  .crt-monitor {
    transform: scale(0.9);
    transform-origin: top center;
  }
}
