/**
 * GK-OS - Main Stylesheet
 * A personal portfolio operating system UI
 * 
 * This file imports all component stylesheets and applies global styles
 * Version: 1.1.0
 */

/* Import CSS variables first for global availability */
@import url('variables.css');

/* Import base styles and resets */
@import url('base.css');

/* Import component styles */
@import url('desktop.css');      /* Desktop environment and icons */
@import url('widgets.css');      /* Desktop widgets and skill bars */
@import url('windows.css');      /* Window management and styling */
@import url('browser.css');      /* Browser application styling */
@import url('taskbar.css');      /* Taskbar, start menu and notifications */

/* Import mobile styles last as they should override desktop styles */
@import url('mobile.css');       /* Mobile-specific styles and responsive design */

/* Additional global styles that don't fit elsewhere */

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Focus styles for accessibility */
:focus {
  outline: 2px solid var(--console-text);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users, keep for keyboard navigation */
:focus:not(:focus-visible) {
  outline: none;
}

/* Focus visible only for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--console-text);
  outline-offset: 2px;
}

/* Print styles for PDF viewing */
@media print {
  body * {
    visibility: hidden;
  }
  
  .app-window.active,
  .app-window.active * {
    visibility: visible;
  }
  
  .app-window.active {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: none;
    box-shadow: none;
  }
  
  .window-title-bar,
  .window-controls,
  .resize-handle {
    display: none !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --console-text: #00FF00;
    --console-text-dim: #00CC00;
    --console-bg: #000000;
    --window-border-color: #FFFFFF;
    --icon-text-color: #FFFFFF;
  }
  
  .app-window {
    border: 2px solid white;
  }
  
  .context-menu,
  .start-menu,
  .notification-panel {
    border: 2px solid white;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Start Menu Styles */
.start-menu {
    position: absolute;
    bottom: 50px;
    left: 10px;
    width: 250px;
    background-color: var(--context-menu-bg);
    border: 1px solid var(--window-border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUpMenu 0.2s ease-out forwards;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    opacity: 0.97;
}

.start-menu.hidden {
    display: none;
}

.start-menu-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(to bottom, rgba(78, 179, 211, 0.1), transparent);
}

.start-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--console-text);
    margin: 0;
}

.start-menu ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.start-menu li {
    padding: 10px 15px;
    color: var(--console-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
    position: relative;
    margin: 2px 5px;
    border-radius: 8px;
}

.start-menu li:hover, .start-menu li.active {
    background-color: rgba(78, 179, 211, 0.1);
    color: var(--console-text);
}

.start-menu li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--console-text);
    border-radius: 0 2px 2px 0;
}

.start-menu li.separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 8px 15px;
    padding: 0;
    cursor: default;
}

.start-menu li.separator:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.start-menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    color: var(--console-text-dim);
}

.start-menu li:hover .start-menu-icon {
    color: var(--console-text);
}

.start-menu .menu-label {
    flex-grow: 1;
}

/* Animation for start menu */
@keyframes slideUpMenu {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.97;
        transform: translateY(0);
    }
}

/* Mobile optimizations for start menu */
@media (max-width: 768px) {
    .start-menu {
        width: 85%;
        max-width: 300px;
        bottom: 60px;
    }
    
    .start-menu li {
        padding: 14px 15px; /* Larger tap targets */
    }
}

/* Simple Recruiter Mode styling */
body.recruiter-mode {
  /* Subtle indicator that recruiter mode is active */
  background: linear-gradient(135deg, var(--desktop-bg-start), var(--desktop-bg-mid), var(--desktop-bg-end));
}

body.recruiter-mode::after {
  content: none;
}

body.recruiter-mode #skillsWidget {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  border: 1px solid rgba(78, 179, 211, 0.5);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Improved mobile responsiveness for recruiter mode */
@media (max-width: 768px) {
  .recruiter-element {
    width: calc(100% - 30px) !important;
    left: 15px !important;
    right: 15px !important;
    max-width: none !important;
  }
  
  .project-highlights {
    top: 70px !important;
  }
  
  .resume-download {
    width: auto !important;
    left: auto !important;
  }
}

/* Mobile responsiveness for recruiter features */
@media (max-width: 768px) {
  body.recruiter-mode::after {
    font-size: 0.7rem;
    padding: 3px 10px;
    top: 10px;
  }
  
  .floating-action-btn {
    padding: 8px 15px;
    font-size: 0.8rem;
  }
}

/* Refined floating action buttons */
.floating-action-btn {
  position: fixed;
  background-color: rgba(26, 26, 26, 0.85);
  color: var(--console-text);
  padding: 8px 15px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  z-index: 900;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.floating-action-btn:hover {
  background-color: rgba(78, 179, 211, 0.15);
  border-color: rgba(78, 179, 211, 0.3);
}

.floating-action-btn svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

/* Improved features animation */
.recruiter-feature {
  animation: featureAppear 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  opacity: 0;
}

@keyframes featureAppear {
  from { 
    opacity: 0;
    transform: translateY(15px) scale(0.97);
    filter: blur(3px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Staggered animations for multiple features */
.recruiter-feature:nth-child(1) { animation-delay: 0.05s; }
.recruiter-feature:nth-child(2) { animation-delay: 0.1s; }
.recruiter-feature:nth-child(3) { animation-delay: 0.15s; }
.recruiter-feature:nth-child(4) { animation-delay: 0.2s; }

/* More refined desktop widget appearance */
.desktop-widget {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  max-height: 80vh;
}

.desktop-widget .widget-header {
  padding: 10px 15px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Refined contact card styling */
.contact-card {
    background-color: rgba(26, 26, 26, 0.9);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.contact-card:hover {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(to bottom, rgba(78, 179, 211, 0.05), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(78, 179, 211, 0.1), rgba(0, 200, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--console-text);
    border: 1px solid rgba(78, 179, 211, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-info h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--console-text);
}

.header-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-body {
    padding: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.contact-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.contact-item svg {
    color: var(--console-text-dim);
    flex-shrink: 0;
}

.contact-item a, .contact-item span {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: var(--console-text);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--console-text-dim);
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: rgba(78, 179, 211, 0.1);
    color: var(--console-text);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Mobile responsiveness for recruiter features */
@media (max-width: 768px) {
  body.recruiter-mode::after {
    font-size: 0.7rem;
    padding: 3px 10px;
    top: 10px;
  }
  
  .floating-action-btn {
    padding: 8px 15px;
    font-size: 0.8rem;
  }
  
  .desktop-widget {
    width: 85% !important;
    max-width: none !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
  }
  
  .contact-card {
    width: calc(100% - 30px) !important;
    max-width: 400px !important;
    left: 15px !important;
    right: 15px !important;
    margin: 0 auto !important;
    top: 790px !important;
  }
  
  #resumeDownloadBtn {
    left: auto !important;
    right: 10px !important;
    bottom: 120px !important;
  }
}

/* Portfolio Mode - Comprehensive and OS-Integrated Styling */

/* Fix portfolio mode background */
body.portfolio-mode {
  background: var(--desktop-bg, #1a1a1a);
}

/* Portfolio mode label */
body.portfolio-mode::after {
  content: "Recruiter Mode";
  position: fixed;
  bottom: 55px; /* Position above taskbar */
  left: 5px;
  font-size: 0.7rem;
  color: rgba(78, 179, 211, 0.7);
  padding: 3px 8px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-family: 'Source Code Pro', monospace;
  z-index: 700;
  pointer-events: none;
}

/* Toggle button styling - renamed and moved to right side */
.os-button {
  position: fixed;
  top: auto; 
  bottom: 75px; 
  right: 15px; /* Changed from left to right */
  left: auto; 
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: rgba(30, 30, 30, 0.85);
  color: var(--console-text);
  border-radius: 6px;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 900;
  user-select: none;
}

/* Resume download button - moved above the Recruiter View button */
.portfolio-resume-button {
  position: fixed !important;
  bottom: 120px !important; /* Increased to position above the os-button */
  right: 15px !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  max-width: 200px !important;
  height: auto !important;
  max-height: 40px !important;
  padding: 8px 15px !important;
  z-index: 950 !important;
  font-size: 0.85rem !important;
  opacity: 0 !important;
  transition: all 0.3s ease !important;
  background-color: rgba(78, 179, 211, 0.1) !important;
  transform: translateY(20px) !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
}

body.portfolio-mode .portfolio-resume-button {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Portfolio grid layout - ensure it doesn't overlap taskbar */
.portfolio-grid {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 55px !important; /* Space for taskbar */
  display: grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  grid-template-rows: repeat(12, 1fr) !important;
  gap: 15px !important;
  padding: 15px !important;
  z-index: 50 !important;
  overflow-y: auto !important;
}

/* Better mobile responsiveness for portfolio mode */
@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
    padding-top: 50px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    height: calc(100% - 65px) !important; /* Account for taskbar */
    bottom: 65px !important;
  }
  
  #portfolioModeToggle {
    bottom: 70px !important;
    right: 15px !important; /* Ensure right positioning on mobile */
    left: auto !important;
    top: auto !important;
  }
  
  .portfolio-resume-button {
    bottom: 115px !important; /* Positioned above the toggle on mobile */
    right: 15px !important;
    left: auto !important;
    top: auto !important;
    max-width: 180px !important;
  }
}

/* Portfolio grid layout */
.portfolio-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 15px;
  padding: 15px;
  z-index: 50;
}

body.portfolio-mode .desktop-icons-container {
  display: none;
}

/* Panel positions in grid */
.bio-panel {
  grid-column: 1 / 6;  /* Increased width from 1/5 to 1/6 */
  grid-row: 1 / 7;     /* Increased height from 1/5 to 1/7 */
}

.education-panel {
  grid-column: 6 / 9;  /* Adjusted to accommodate wider bio panel */
  grid-row: 1 / 5;
}

.experience-panel {
  grid-column: 9 / 13;
  grid-row: 1 / 8;     /* Increased height from 1/7 to 1/8 */
}

.skills-panel {
  grid-column: 1 / 6;  /* Widened to match bio panel above */
  grid-row: 7 / 13;    /* Reduced height by starting at row 7 instead of 5 */
}

.certifications-panel {
  grid-column: 6 / 9;
  grid-row: 5 / 9;     /* Adjusted to fill space better */
}

.projects-panel {
  grid-column: 6 / 9;
  grid-row: 9 / 13;    /* Adjusted to fill space better */
}

/* Panel base styling */
.portfolio-panel {
  background-color: rgba(30, 30, 30, 0.85);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  animation: panelFadeIn 0.5s forwards;
  font-family: 'Source Code Pro', monospace;
}

@keyframes panelFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation delay for staggered appearance */
.bio-panel { animation-delay: 0s; }
.education-panel { animation-delay: 0.1s; }
.experience-panel { animation-delay: 0.2s; }
.skills-panel { animation-delay: 0.3s; }
.certifications-panel { animation-delay: 0.4s; }
.projects-panel { animation-delay: 0.5s; }

/* Panel header styling */
.panel-header {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background: linear-gradient(to bottom, rgba(60, 60, 60, 0.4), rgba(40, 40, 40, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--console-text);
}

.panel-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  color: var(--console-text);
}

/* Panel content styling */
.panel-content {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
}

/* Bio panel styling */
.bio-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.bio-avatar {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(78, 179, 211, 0.1), rgba(0, 200, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--console-text);
  border: 1px solid rgba(78, 179, 211, 0.2);
  margin-right: 15px;
  flex-shrink: 0;
}

.bio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.bio-title h3 {
  margin: 0 0 5px;
  font-size: 1.1rem;
  color: var(--console-text);
}

.bio-title h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: normal;
}

.bio-summary {
  margin-bottom: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.bio-details {
  margin-bottom: 15px;
}

.bio-detail {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.bio-detail svg {
  margin-right: 8px;
  color: var(--console-text-dim);
  flex-shrink: 0;
}

.bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.bio-link {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(78, 179, 211, 0.1);
  border-radius: 20px;
  color: var(--console-text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.bio-link:hover {
  background-color: rgba(78, 179, 211, 0.1);
  transform: translateY(-2px);
}

.bio-link svg {
  margin-left: 5px;
}

/* Education panel styling */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.education-item {
  display: flex;
  gap: 15px;
}

.education-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.timeline-year {
  font-size: 0.85rem;
  color: var(--console-text);
  white-space: nowrap;
  margin-bottom: 5px;
}

.timeline-line {
  width: 2px;
  height: 100%;
  background-color: rgba(78, 179, 211, 0.2);
  flex-grow: 1;
}

.education-content {
  flex-grow: 1;
}

.education-degree {
  margin: 0 0 5px;
  font-size: 1rem;
  color: var(--console-text);
}

.education-school {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  font-size: 0.9rem;
}

.education-location, .education-details, .education-gpa {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 3px;
}

.education-courses {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.education-courses span {
  color: var(--console-text-dim);
}

/* Experience panel styling */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.experience-item {
  display: flex;
  gap: 15px;
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.experience-content {
  flex-grow: 1;
}

.experience-header {
  margin-bottom: 10px;
}

.experience-title {
  margin: 0 0 3px;
  font-size: 1rem;
  color: var(--console-text);
}

.experience-company {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  font-size: 0.9rem;
}

.experience-location {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.experience-description {
  color: var(--text-primary);
  font-size: 0.85rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.experience-achievements {
  padding-left: 20px;
  margin: 10px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.experience-achievements li {
  margin-bottom: 5px;
  position: relative;
}

.experience-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tech-tag {
  background-color: rgba(0, 0, 0, 0.2);
  color: var(--console-text-dim);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  border: 1px solid rgba(78, 179, 211, 0.1);
}

/* Skills panel styling */
.skills-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skills-category {
  margin-bottom: 15px;
}

.category-title {
  font-size: 0.95rem;
  color: var(--console-text);
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(78, 179, 211, 0.1);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background-color: rgba(78, 179, 211, 0.05);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.85rem;
  border: 1px solid rgba(78, 179, 211, 0.1);
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background-color: rgba(78, 179, 211, 0.1);
  transform: translateY(-2px);
}

/* Certifications panel styling */
.certifications-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.certification-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.certification-item:hover {
  background-color: rgba(78, 179, 211, 0.05);
  transform: translateY(-2px);
}

.certification-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(78, 179, 211, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--console-text);
  flex-shrink: 0;
}

.certification-details {
  flex-grow: 1;
}

.certification-name {
  margin: 0 0 3px;
  font-size: 0.95rem;
  color: var(--console-text);
}

.certification-issuer {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.certification-year {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Projects panel styling */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-item {
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.project-item:hover {
  background-color: rgba(78, 179, 211, 0.05);
  transform: translateY(-2px);
}

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

.project-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--console-text);
}

.project-year {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.project-description {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.project-highlight {
  font-size: 0.8rem;
  color: var(--console-text-dim);
  margin-bottom: 10px;
  font-style: italic;
}

.project-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-skill {
  background-color: rgba(78, 179, 211, 0.1);
  color: var(--console-text);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(78, 179, 211, 0.2);
}

/* Better mobile responsiveness for portfolio mode */
@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(8, 1fr);
    grid-auto-rows: minmax(min-content, auto);
    gap: 12px;
  }
  
  .bio-panel {
    grid-column: 1 / 5;
    grid-row: 1 / 5;  /* Keep at a reasonable size on smaller screens */
  }
  
  .education-panel {
    grid-column: 5 / 9;
    grid-row: 1 / 4;
  }
  
  .experience-panel {
    grid-column: 1 / 5;
    grid-row: 5 / 9;  /* Increased height for more space */
  }
  
  .skills-panel {
    grid-column: 5 / 9;
    grid-row: 4 / 6;  /* Keep small as requested */
  }
  
  .certifications-panel {
    grid-column: 5 / 9;
    grid-row: 6 / 8;
  }
  
  .projects-panel {
    grid-column: 1 / 9;
    grid-row: 8 / 11;
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    padding: 10px;
    padding-top: 50px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: calc(100% - 50px);
  }
  
  .portfolio-panel {
    width: 100%;
    height: auto;
    min-height: 0;
  }
  
  .os-button {
    top: 10px;
    left: 10px;
    right: auto;
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  
  .portfolio-resume-button {
    position: sticky;
    bottom: 15px;
    right: auto;
    left: auto;
    margin: 10px auto;
    width: calc(100% - 20px);
  }
  
  /* Order panels for mobile view */
  .bio-panel { order: 1; }
  .education-panel { order: 2; }
  .experience-panel { order: 3; }
  .skills-panel { order: 4; }
  .certifications-panel { order: 5; }
  .projects-panel { order: 6; }
  
  /* Make panels shorter on mobile */
  .panel-content {
    max-height: 300px;
    overflow-y: auto;
  }
  
  /* Simplify timeline display on mobile */
  .education-item, .experience-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .education-timeline, .experience-timeline {
    flex-direction: row;
    width: 100%;
    margin-bottom: 5px;
  }
  
  .timeline-line {
    display: none;
  }
  
  .timeline-year {
    margin-bottom: 0;
    background-color: rgba(78, 179, 211, 0.1);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
  }
}

/* Animation for panel appearance */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
