@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&display=swap');

:root {
  --bg-color: #0d1117;
  --sidebar-bg: #161b22;
  --header-bg: #21262d;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --accent-green: #39d353;
  --accent-blue: #58a6ff;
  --accent-orange: #f0883e;
  --accent-red: #f85149;
  --border-color: #30363d;
  --selection-bg: rgba(88, 166, 255, 0.2);
}

* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  overflow: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.window-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  border: 1px solid var(--border-color);
}

.window-chrome {
  background-color: var(--header-bg);
  height: 35px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border-bottom: 1px solid var(--border-color);
  user-select: none;
  flex-shrink: 0;
}

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

.control-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.window-title {
  margin-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-layout {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  z-index: 10;
}

.sidebar-header {
  padding: 10px 15px;
  font-size: 11px;
  font-weight: bold;
  color: var(--text-secondary);
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-tree {
  padding: 10px 0;
  overflow-y: auto;
  font-family: 'Fira Code', monospace;
}

.root-folder {
  padding: 6px 15px;
  color: var(--text-secondary);
  font-weight: bold;
  font-size: 13px;
}

.folder, .file {
  padding: 4px 15px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  border-left: 2px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.folder:hover, .file:hover {
  background-color: #21262d;
  padding-left: 20px;
}

.folder {
  color: var(--accent-orange);
  font-weight: 500;
}

.file {
  color: var(--accent-blue);
}

.tree-line {
  color: #444c56;
  margin-right: 8px;
  user-select: none;
  white-space: pre;
}

.file.active {
  background-color: #21262d;
  border-left: 2px solid var(--accent-blue);
  color: var(--text-primary);
}

.folder.active {
  background-color: #21262d;
  border-left: 2px solid var(--accent-orange);
}

.file.highlight {
  color: var(--accent-green);
  font-weight: bold;
}

.arrow {
  display: inline-block;
  width: 15px;
  font-size: 10px;
  margin-right: 5px;
  transition: transform 0.2s;
}

.folder-content {
  display: none;
  overflow: hidden;
}

.folder-content.open {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes clickPulse {
  0% { background-color: rgba(57, 211, 83, 0.3); }
  100% { background-color: transparent; }
}

.click-pulse {
  animation: clickPulse 0.4s ease-out;
}

/* Apple-style Window Animations */
@keyframes appleOpen {
  0% { 
    opacity: 0; 
    transform: scale(0.9) translateY(20px);
    filter: blur(5px);
  }
  70% {
    transform: scale(1.02) translateY(-2px);
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes appleClose {
  0% { 
    opacity: 1; 
    transform: scale(1) translateY(0);
  }
  100% { 
    opacity: 0; 
    transform: scale(0.95) translateY(10px);
    filter: blur(2px);
  }
}

.apple-open {
  animation: appleOpen 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.apple-close {
  animation: appleClose 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Existing Content Area Styles */
.content-area {
  flex-grow: 1;
  padding: 30px 40px;
  overflow-y: auto;
  line-height: 1.6;
  background-color: var(--bg-color);
}

.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.ascii-art {
  color: var(--accent-green);
  font-size: 10px;
  margin-bottom: 20px;
  line-height: 1.2;
}

/* Page Content Styling */
.page-header {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
  padding-bottom: 15px;
}

.page-header h1 {
  margin: 0;
  color: var(--accent-green);
  font-size: 24px;
}

.page-header .path {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.media-container {
  margin: 25px 0;
  background-color: #000;
  padding: 5px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.media-container img, .media-container video {
  max-width: 100%;
  display: block;
  border-radius: 4px;
}

.project-details, .research-details {
  background-color: rgba(33, 38, 45, 0.4);
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.project-details h3, .research-details h3 {
  color: var(--accent-blue);
  margin-top: 0;
  font-size: 18px;
}

.project-details ul {
  padding-left: 20px;
}

.project-details li {
  margin-bottom: 8px;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Responsive Grid Overrides */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

@media (max-width: 900px) {
  .content-area {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    left: -260px;
    height: 100%;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
  }
  
  .sidebar.open {
    transform: translateX(260px);
  }
  
  .mobile-nav-toggle {
    display: block !important;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.mobile-nav-toggle {
  display: none;
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 15px;
  font-size: 12px;
}

/* Custom UI Components */
.tags { margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 10px; background: rgba(88, 166, 255, 0.1); color: var(--accent-blue); padding: 3px 10px; border-radius: 12px; border: 1px solid rgba(88, 166, 255, 0.3); }

.project-card {
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-green);
  background: #1c2128;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.card-title { font-size: 18px; color: var(--accent-green); margin: 0; }
.card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; flex-grow: 1; }

.research-card {
  background: rgba(240, 136, 62, 0.05);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-orange);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}

.research-card:hover {
  background: rgba(240, 136, 62, 0.1);
  transform: translateX(5px);
}

.card-badge {
  display: inline-block;
  font-size: 9px;
  background: var(--accent-orange);
  color: var(--bg-color);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  margin-bottom: 10px;
}