/* ============================================
   Windows 98 Single Application Styles
   ============================================ */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  /* Background will be set dynamically by JavaScript */
  background: linear-gradient(to bottom, #008080, #006666);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Main Window - Centered Single Application
   ============================================ */

.main-window {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

.main-window .title-bar-text {
  font-size: 14px;
  font-weight: bold;
}

/* ============================================
   Responsive Sizing
   ============================================ */

@media (max-width: 1024px) {
  .main-window {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
    align-items: flex-start;
  }

  .main-window {
    max-width: 100%;
    margin-top: 10px;
  }
}

/* ============================================
   Tab Panels
   ============================================ */

.tab-panel {
  display: none;
  padding: 20px;
  min-height: 400px;
  animation: fadeIn 0.2s ease-in;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.tab-panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--dialog-blue);
  font-size: 20px;
}

.tab-panel p {
  margin: 8px 0;
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================
   Profile Photo
   ============================================ */

.profile-photo {
  width: 250px;
  height: 250px;
  border: 2px solid var(--window-frame);
  box-shadow: 2px 2px 0 var(--button-shadow);
  margin: 0 auto 16px;
  display: block;
  object-fit: cover;
}

@media (max-width: 768px) {
  .profile-photo {
    width: 150px;
    height: 150px;
  }
}

/* ============================================
   Contact Buttons
   ============================================ */

.contact-link {
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

.contact-button {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.contact-button:hover {
  background: var(--button-face);
}

/* ============================================
   Fieldsets for Work Experience
   ============================================ */

fieldset {
  margin-bottom: 16px;
  padding: 12px;
  border: 2px groove var(--button-shadow);
}

fieldset legend {
  font-weight: bold;
  color: var(--dialog-blue);
  padding: 0 4px;
}

fieldset p {
  margin: 6px 0;
}

fieldset p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Table Styling
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

table th,
table td {
  padding: 10px;
  text-align: left;
  border: 1px solid var(--button-shadow);
}

table thead {
  background: var(--dialog-blue);
  color: white;
  font-weight: bold;
}

table tbody tr:nth-child(even) {
  background: var(--button-face);
}

@media (max-width: 768px) {
  table {
    font-size: 12px;
  }

  table th,
  table td {
    padding: 8px 6px;
  }
}

/* ============================================
   Tree View Spacing
   ============================================ */

.tree-view {
  margin: 8px 0;
  font-size: 14px;
}

.tree-view ul {
  margin-left: 20px;
  padding-left: 0;
}

.tree-view li {
  margin: 6px 0;
  font-size: 14px;
}

.tree-view details {
  margin: 4px 0;
}

.tree-view summary {
  font-size: 14px;
  font-weight: bold;
}

/* ============================================
   Status Bar
   ============================================ */

.status-bar {
  display: flex;
  gap: 4px;
  margin-top: auto;
}

.status-bar-field {
  margin: 0;
  padding: 2px 4px;
  flex: 1;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center {
  text-align: center;
}

/* About Tab - Contact Info Styling */
#tab-about p.text-center {
  font-size: 16px;
}

#tab-about p.text-center a {
  font-size: 16px;
}

.mt-1 {
  margin-top: 8px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 16px;
}

/* ============================================
   Window Body Adjustments
   ============================================ */

.window-body {
  padding: 0;
  min-height: 530px;
  display: flex;
  flex-direction: column;
}

.window-body h1 {
  margin: 12px 0 8px 0;
  font-size: 28px;
}

.window-body h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
}

@media (max-width: 768px) {
  .window-body {
    min-height: 350px;
  }

  .window-body h1 {
    font-size: 20px;
  }

  .tab-panel {
    padding: 16px;
    min-height: 350px;
  }
}

/* ============================================
   Field Row Stacked
   ============================================ */

.field-row-stacked {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================
   Accessibility & Focus States
   ============================================ */

button:focus,
a:focus {
  outline: 2px dotted var(--window-frame);
  outline-offset: 2px;
}

[role="tab"]:focus {
  outline: 2px dotted var(--window-frame);
}

/* ============================================
   Smooth Scrolling
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================
   Tab Menu Styling
   ============================================ */

menu[role="tablist"] {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 16px;
}

@media (max-width: 768px) {
  menu[role="tablist"] {
    font-size: 1px;
  }

  menu[role="tablist"] li {
    flex: 1;
    min-width: 0;
  }

  menu[role="tablist"] a {
    font-size: 11px;
    padding: 4px 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  body {
    background: white;
    padding: 0;
  }

  .main-window {
    box-shadow: none;
    max-width: 100%;
  }

  .status-bar {
    display: none;
  }

  .title-bar-controls {
    display: none;
  }

  .tab-panel {
    display: block !important;
    page-break-inside: avoid;
    min-height: auto;
  }

  menu[role="tablist"] {
    display: none;
  }
}