:root {
  --bg-color: #1f1f2e;
  --window-bg: rgba(31, 31, 46, 0.9);
  --text-color: #e6e6e6;
  --border-color: #3a3a52;
  --border-active: #8942c7;
  --purple-dark: #16133e;
  --purple-light: #7653c3;
  --accent-color: #8942c7;
  --success-color: #4ade80;
  --error-color: #f87171;
  --panel-bg: rgba(10, 10, 18, 0.95);
  --terminal-bg: rgba(31, 31, 46, 0.9);
  --terminal-text: #6cd52a;
  --terminal-prompt: #6c5ce7;
  --terminal-command: #6c5ce7;
  --terminal-output: #6cd52a;
  --new-color: #51358f;
}

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

/* Fonts */
@font-face {
  font-family: 'JetBrainsMono';
  src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: 'Ubuntu', sans-serif;
  background-color: var(--bg-color);
  background-image: url('/linux-wallpaper.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--text-color);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* Top Panel */
.top-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background-color: var(--panel-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.panel-left,
.panel-right {
  display: flex;
  align-items: center;
}

.panel-center {
  font-size: 14px;
  font-weight: 500;
}

/* Dropdown buttons and menus */
.dropdown-btn {
  background: none;
  border: none;
  color: var(--text-color);
  padding: 4px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.dropdown-btn:hover,
.dropdown-btn.active {
  background-color: var(--purple-dark);
}

.dropdown-menu {
  position: absolute;
  top: 32px;
  left: 0;
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: none;
  flex-direction: column;
  min-width: 180px;
  z-index: 1001;
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-menu button {
  background: none;
  border: none;
  color: var(--text-color);
  padding: 8px 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-menu button:hover {
  background-color: var(--purple-dark);
}

/* System Stats */
.system-stats {
  display: flex;
  align-items: center;
  margin-left: 16px;
  font-size: 12px;
}

.system-icon {
  margin-right: 4px;
}

.system-icon i {
  width: 16px;
  height: 16px;
  color: var(--text-color);
}

/* Desktop */
.desktop {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('linux-wallpaper.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.desktop-clock {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
}

/* Desktop Icons */
.desktop-icons {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--new-color);
  transition: background-color 0.2s;
}

.desktop-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.desktop-icon i {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  color: var(--accent-color);
}

.desktop-icon span {
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Windows */
.window {
  position: absolute;
  background-color: var(--window-bg);
  border: 2px solid var(--new-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  aspect-ratio: 16/9;
}

.window.active {
  border-color: var(--border-active);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--window-bg);
  padding: 8px 12px;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid var(--border-color);
}

.window-title {
  font-weight: 500;
  font-size: 14px;
  color: antiquewhite;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-minimize,
.window-close {
  background: none;
  border: none;
  color: var(--text-color);
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

.window-minimize:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.window-close:hover {
  background-color: rgba(255, 0, 0, 0.2);
}

.window-content {
  padding: 16px;
  height: calc(100% - 36px);
  overflow: auto;
}

.window-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: se-resize;
  z-index: 10;
}

.window-resize-handle::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 4px;
  border-style: solid;
  border-width: 0 0 8px 8px;
  border-color: transparent transparent var(--border-color) transparent;
  transition: border-color 0.2s;
}

.window.active .window-resize-handle::after {
  border-color: transparent transparent var(--border-active) transparent;
}

/* Dock */
.dock {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border-color);
  z-index: 900;
}

.dock-icons {
  display: flex;
  gap: 8px;
}

.dock-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 2px solid var(--new-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  position: relative;
}

.dock-icon:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.1);
}

.dock-icon.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.dock-icon i {
  width: 24px;
  height: 24px;
  color: var(--accent-color);
}

/* Context Menu */
.context-menu {
  position: absolute;
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
}

.context-menu button {
  background: none;
  border: none;
  color: var(--text-color);
  padding: 8px 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.context-menu button:hover {
  background-color: var(--purple-dark);
}

/* Terminal */
.terminal-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'JetBrainsMono', monospace;
  background-color: var(--terminal-bg);
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 8px;
  padding-right: 4px;
  font-size: 14px;
}

.terminal-line {
  margin-bottom: 4px;
  white-space: pre-wrap;
  color: var(--terminal-output);
  line-height: 1.4;
}

.terminal-line.command {
  color: var(--terminal-command);
}

.terminal-input-line {
  margin-top: 0;
  padding: 4px;
}

.terminal-prompt {
  color: var(--terminal-prompt);
  margin-right: 8px;
  white-space: nowrap;
  font-family: 'JetBrainsMono', monospace;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--terminal-text);
  font-family: 'JetBrainsMono', monospace;
  font-size: 14px;
  padding: 0;
}

/* About Section */
.about-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.profile-image img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-color);
}

.profile-info h2 {
  margin-bottom: 5px;
  color: var(--accent-color);
}

.profile-title {
  font-size: 16px;
  margin-bottom: 5px;
}

.profile-location {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #a0a0a0;
}

.profile-location i {
  width: 14px;
  height: 14px;
  margin-right: 5px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-heading {
  color: var(--accent-color);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}

.education-item,
.experience-item {
  margin-bottom: 12px;
}

.education-item h4,
.experience-item h4 {
  margin-bottom: 4px;
}

.education-item p,
.experience-item p {
  font-size: 14px;
  color: #a0a0a0;
}

/* Projects Section */
.projects-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.project-header h4 {
  color: var(--accent-color);
}

.project-links {
  display: flex;
  gap: 8px;
}

.project-link i {
  width: 16px;
  height: 16px;
  color: var(--text-color);
}

.project-description {
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background-color: rgba(108, 92, 231, 0.1);
  color: var(--accent-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.category-btn {
  background: none;
  border: none;
  color: var(--text-color);
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.category-btn:hover,
.category-btn.active {
  background-color: rgba(255, 255, 255, 0.05);
}

.category-btn.active {
  color: var(--accent-color);
  border-left: 3px solid var(--accent-color);
}

/* Contact Section */
.contact-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.contact-item i {
  width: 16px;
  height: 16px;
  color: var(--accent-color);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 14px;
  color: var(--accent-color);
}

.form-group input,
.form-group textarea {
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  font-family: 'Ubuntu', sans-serif;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.submit-btn {
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #5a4bd1;
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background-color: rgba(74, 222, 128, 0.1);
  border-radius: 8px;
  border: 1px solid var(--success-color);
}

.form-success i {
  width: 32px;
  height: 32px;
  color: var(--success-color);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s, transform 0.2s;
}

.social-link:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

.social-link i {
  width: 20px;
  height: 20px;
  color: var(--text-color);
}

.welcome-message {
  color: #39ff14;
  font-family: monospace;
  font-size: 14px;
  text-shadow: 0 0 3px #39ff14;
}

/* Window dragging and resizing visual feedback */
.window.dragging {
  opacity: 0.8;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.window.resizing {
  opacity: 0.8;
}

/* Dock dragging visual feedback */
.dock.dragging {
  opacity: 0.8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Active project card */
.project-card.active-project {
  border-color: var(--border-active);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.2);
}

/* Desktop clock */
.desktop-clock {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: transparent;
  color: var(--text-color);
  padding: 5px 10px;
  font-size: 14px;
  font-family: 'JetBrainsMono', monospace;
}

/* Right-side Link Icons (without text, positioned on top) */
.link-icons {
  position: fixed;
  right: 30px;
  top: 45px; /* Position at top */
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.desktop-icon.link-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
  padding: 10px;
  border: none;
  /* No border for right icons */
  transition: background-color 0.2s;
  margin-bottom: -10px;
}

.desktop-icon.link-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Icon image adjustments */
.desktop-right-icon {
  width: 60px;
  height: auto;
  margin-bottom: 0;
  transition: transform 0.3s;
}

.desktop-right-icon:hover {
  transform: scale(1.1);
}

/* Responsive styles */
@media (max-width: 768px) {
  .window {
    min-width: 280px;
    min-height: 180px;
  }
  
  .dock {
    padding: 4px;
  }
  
  .dock-icon {
    width: 40px;
    height: 40px;
  }
  
  .dock-icon i {
    width: 20px;
    height: 20px;
  }
  
  .top-panel {
    height: 28px;
    padding: 0 4px;
  }
  
  .panel-center {
    font-size: 12px;
  }
  
  .dropdown-btn {
    padding: 2px 8px;
    font-size: 12px;
  }
  
  .system-icon i {
    width: 14px;
    height: 14px;
  }
  
  .system-stats,
  .system-percent {
    font-size: 10px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-section {
    flex-direction: column;
    text-align: center;
  }
  
  /* Right icons for mobile: adjust position and size */
  .link-icons {
    right: 10px;
    top: 10px;
  }
  
  .desktop-right-icon {
    width: 35px;
  }
}
