/* Main Portfolio Styles */

/* Resume Window */
.resume-window .window-content {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

.resume-toolbar {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-bottom: 2px solid #c0c0c0;
  background: linear-gradient(to bottom, #dfdfdf 0%, #c0c0c0 100%);
  flex-shrink: 0;
}

.toolbar-button {
  padding: 4px 8px;
  background: linear-gradient(to bottom, #dfdfdf 0%, #c0c0c0 100%);
  border: 2px outset #dfdfdf;
  border-right-color: #808080;
  border-bottom-color: #808080;
  font-size: 11px;
  cursor: pointer;
  color: #000;
  font-family: 'MS Sans Serif', Arial, sans-serif;
}

.toolbar-button:hover {
  background: linear-gradient(to bottom, #efefef 0%, #dfdfdf 100%);
}

.toolbar-button:active {
  border-style: inset;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.resume-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: white;
  padding: 15px;
  max-height: 100%;
  min-height: 0;
}

.resume-document {
  max-width: 900px;
  font-family: 'Georgia', serif;
  font-size: 12px;
  line-height: 1.6;
  color: #000;
}

.resume-header {
  text-align: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.resume-header h1 {
  margin: 0 0 5px 0;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
}

.resume-header p {
  margin: 0;
  font-size: 11px;
  color: #555;
  font-style: italic;
}

.contact-info-row {
  font-size: 10px;
  margin: 5px 0;
  text-align: center;
}

.contact-info-row a {
  color: #0000ff;
  text-decoration: underline;
  cursor: pointer;
}

.contact-info-row a:hover {
  color: #ff0000;
}

.resume-section {
  margin-bottom: 12px;
  page-break-inside: avoid;
}

.resume-section h2 {
  font-size: 12px;
  font-weight: bold;
  margin: 8px 0 5px 0;
  color: #000;
  border-bottom: 1px solid #999;
  padding-bottom: 2px;
}

.resume-section h3 {
  font-size: 11px;
  font-weight: bold;
  margin: 5px 0 2px 0;
  color: #333;
}

.resume-section h4 {
  font-size: 11px;
  font-weight: bold;
  margin: 3px 0 2px 0;
  color: #555;
}

.resume-section p {
  margin: 4px 0;
  font-size: 11px;
  text-align: justify;
}

.resume-section ul,
.resume-section ol {
  margin: 4px 0 4px 20px;
  padding: 0;
  font-size: 11px;
}

.resume-section li {
  margin: 2px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 8px 0;
}

.skill-box {
  background: #f5f5f5;
  padding: 8px;
  border-left: 3px solid #0000ff;
  border-radius: 2px;
  font-size: 11px;
}

.skill-box h3 {
  color: #0000ff;
  margin: 0 0 3px 0;
  font-size: 11px;
}

.skill-box p {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
}

.experience-item {
  margin-bottom: 8px;
  page-break-inside: avoid;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.exp-title {
  font-weight: bold;
  color: #000;
}

.exp-company {
  font-weight: bold;
  color: #0000ff;
  font-size: 10px;
}

.exp-duration {
  color: #666;
  font-size: 10px;
  font-style: italic;
}

.exp-description {
  font-size: 11px;
  margin: 2px 0;
}

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

.projects-list li {
  margin: 4px 0;
  padding-left: 15px;
  position: relative;
  font-size: 11px;
}

.projects-list li:before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #0000ff;
  font-size: 8px;
}

/* Portfolio/Projects Window */
.projects-window .window-content {
  display: flex;
  flex-direction: column;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
}

.project-card {
  background: white;
  border: 2px inset #dfdfdf;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.project-card:hover {
  background: #e8e8ff;
}

.project-card h4 {
  margin: 0 0 5px 0;
  font-size: 11px;
  font-weight: bold;
  color: #000080;
}

.project-card p {
  margin: 0;
  font-size: 10px;
  color: #333;
  line-height: 1.4;
}

/* Skills Window */
.skills-window .window-content {
  padding: 10px;
}

.skill-category {
  margin-bottom: 12px;
  page-break-inside: avoid;
}

.skill-category-header {
  background: #000080;
  color: white;
  padding: 4px 6px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
}

.skill-category-header:hover {
  background: #0000aa;
}

.skill-items {
  background: white;
  border: 2px inset #dfdfdf;
  padding: 8px;
  margin-top: 2px;
  display: none;
  font-size: 11px;
  line-height: 1.6;
}

.skill-items.expanded {
  display: block;
}

.skill-items p {
  margin: 4px 0;
}

.skill-items strong {
  color: #0000ff;
}

/* About Window */
.about-window .window-content {
  overflow-y: auto;
  padding: 12px;
  line-height: 1.8;
}

.about-content {
  font-size: 11px;
}

.about-content h3 {
  color: #000080;
  margin: 8px 0 5px 0;
  font-size: 12px;
}

.about-content p {
  margin: 5px 0;
  text-align: justify;
}

.achievement-item {
  margin: 8px 0;
  padding-left: 15px;
  position: relative;
}

.achievement-item:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #008000;
  font-weight: bold;
}

/* Contact Window */
.contact-window .window-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 20px;
}

.contact-item {
  text-align: center;
  width: 100%;
}

.contact-item-label {
  font-weight: bold;
  color: #000080;
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.contact-item-value {
  font-size: 10px;
}

.contact-item-value a {
  color: #0000ff;
  text-decoration: underline;
  cursor: pointer;
}

.contact-item-value a:hover {
  color: #ff0000;
}

/* Dialog Box */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.dialog-box {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  box-shadow: 1px 1px 0 #ffffff inset, -1px -1px 0 #808080 inset;
  min-width: 350px;
}

.dialog-title {
  background: linear-gradient(to right, #000080, #1084d7);
  color: white;
  padding: 2px 4px;
  font-weight: bold;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

.dialog-content {
  padding: 15px;
  background: #c0c0c0;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  padding: 10px 15px;
  border-top: 1px solid #dfdfdf;
}

.dialog-button {
  padding: 4px 12px;
  background: linear-gradient(to bottom, #dfdfdf 0%, #c0c0c0 100%);
  border: 2px outset #dfdfdf;
  border-right-color: #808080;
  border-bottom-color: #808080;
  font-size: 11px;
  cursor: pointer;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  min-width: 60px;
}

.dialog-button:hover {
  background: linear-gradient(to bottom, #efefef 0%, #dfdfdf 100%);
}

.dialog-button:active {
  border-style: inset;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

/* Animations */
@keyframes windowSlide {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.window {
  animation: windowSlide 0.2s ease-out;
}

@keyframes windowClose {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.8);
    opacity: 0;
  }
}

.window.closing {
  animation: windowClose 0.2s ease-in forwards;
}

/* Scrollbar styling (webkit browsers) */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: #c0c0c0;
  border: 1px solid #dfdfdf;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #dfdfdf 0%, #c0c0c0 100%);
  border: 2px outset #dfdfdf;
  border-right-color: #808080;
  border-bottom-color: #808080;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #efefef 0%, #dfdfdf 100%);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .resume-scroll {
    padding: 10px;
  }

  .resume-document {
    font-size: 11px;
  }

  .dialog-box {
    min-width: 300px;
    max-width: 90%;
  }
}

/* Notepad Window */
.notepad-window .window-content {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.notepad-toolbar {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-bottom: 2px solid #c0c0c0;
  background: linear-gradient(to bottom, #dfdfdf 0%, #c0c0c0 100%);
  flex-shrink: 0;
}

.notepad-textarea {
  flex: 1;
  border: 2px inset #dfdfdf;
  padding: 8px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: white;
  color: black;
  resize: none;
  outline: none;
}

.notepad-textarea:focus {
  outline: 1px solid #0000ff;
}

/* Minesweeper Game */
.minesweeper-window .window-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.game-header {
  padding: 5px;
  background: #c0c0c0;
  border-bottom: 1px solid #dfdfdf;
  margin-bottom: 5px;
}

.game-header p {
  margin: 3px 0;
  font-size: 11px;
  color: #000;
}

.minesweeper-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  background: #c0c0c0;
  padding: 5px;
  max-width: 320px;
}

.mine-cell {
  width: 35px;
  height: 35px;
  background: linear-gradient(to bottom, #dfdfdf 0%, #c0c0c0 100%);
  border: 2px outset #dfdfdf;
  border-right-color: #808080;
  border-bottom-color: #808080;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
  user-select: none;
}

.mine-cell:hover {
  background: linear-gradient(to bottom, #efefef 0%, #dfdfdf 100%);
}

.mine-cell:active {
  border-style: inset;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

/* Snake Game */
.snake-window .window-content {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.snake-board {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 1px;
  background: #000;
  padding: 5px;
  max-width: 350px;
  margin: 10px 0;
}

.snake-cell {
  width: 20px;
  height: 20px;
  background: #333;
  border: 1px solid #000;
  cursor: default;
}

/* Toolbar Button */
.toolbar-button {
  padding: 4px 8px;
  background: linear-gradient(to bottom, #dfdfdf 0%, #c0c0c0 100%);
  border: 2px outset #dfdfdf;
  border-right-color: #808080;
  border-bottom-color: #808080;
  font-size: 11px;
  cursor: pointer;
  color: #000;
  font-family: 'MS Sans Serif', Arial, sans-serif;
}

.toolbar-button:hover {
  background: linear-gradient(to bottom, #efefef 0%, #dfdfdf 100%);
}

.toolbar-button:active {
  border-style: inset;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
}

/* Mobile adjustments for games */
@media (max-width: 768px) {
  .minesweeper-board {
    grid-template-columns: repeat(6, 1fr);
  }

  .mine-cell {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .snake-board {
    grid-template-columns: repeat(10, 1fr);
  }

  .snake-cell {
    width: 18px;
    height: 18px;
  }
}

/* Mobile Resume Scrolling Fix */
@media (max-width: 768px) {
  .resume-window {
    width: 100vw !important;
    height: calc(100vh - 28px) !important;
    left: 0 !important;
    top: 0 !important;
    right: 0;
    bottom: 0;
    max-width: 100vw;
  }

  .resume-window .window-content {
    height: 100%;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }

  .resume-scroll {
    flex: 1;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    height: auto;
    max-height: none;
  }

  .resume-document {
    max-width: 100%;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .resume-scroll {
    padding: 10px;
  }

  .resume-document {
    max-width: 100%;
    font-size: 10px;
  }

  .resume-header h1 {
    font-size: 16px;
  }

  .resume-section h2 {
    font-size: 11px;
  }
}

/* Clock Widget */
.clock-widget-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.clock-widget {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  box-shadow: 1px 1px 0 #ffffff inset, -1px -1px 0 #808080 inset;
  padding: 10px;
  min-width: 250px;
  font-family: 'MS Sans Serif', Arial, sans-serif;
}

.clock-widget-header {
  background: linear-gradient(to right, #000080, #1084d7);
  color: white;
  padding: 2px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 11px;
}

.close-clock {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  width: 16px;
  height: 14px;
  padding: 0;
  cursor: pointer;
  font-size: 10px;
}

.analog-clock {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

.digital-time {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  margin-top: 10px;
  color: #000;
}

/* Popup scrolling on mobile */
@media (max-width: 768px) {
  .dialog-overlay,
  .clock-widget-overlay,
  .contact-dialog-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 10px;
  }

  .dialog-box,
  .clock-widget,
  .contact-dialog {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 auto;
    max-width: 95%;
  }

  .dialog-content,
  .contact-dialog .dialog-content {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
