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

/* CSS Variables for themes */
:root,
:root.light {
  --bg-primary: #eceff4;
  --bg-secondary: #d8dee9;
  --text-primary: #2e3440;
  --text-secondary: #4c566a;
  --accent-color: #ebcb8b;
  --sidebar-bg: #d8dee9;
  --terminal-bg: #d8dee9;
}

:root.dark {
  --bg-primary: #2e3440;
  --bg-secondary: #3b4252;
  --text-primary: #eceff4;
  --text-secondary: #d8dee9;
  --accent-color: #ebcb8b;
  --sidebar-bg: #3b4252;
  --terminal-bg: #3b4252;
}

/* Base Styles */
body {
  font-family: "JetBrains Mono", "Consolas", "Monaco", monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
}

/* App Container */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 80px;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.nav-icons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.nav-icon {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon:hover {
  background-color: var(--bg-primary);
  transform: translateY(-2px);
}

.nav-icon.active {
  background-color: var(--bg-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-icon {
  margin-top: auto;
  margin-bottom: 40px;
}

.theme-toggle {
  animation: none;
}

.theme-toggle:hover {
  animation: spin 0.5s ease-in-out;
}

/* Icon visibility for theme toggle */
/* In light mode (default), show moon to switch to dark */
.theme-toggle .fa-sun {
  display: none;
}
.theme-toggle .fa-moon {
  display: inline-block;
}

/* In dark mode, show sun to switch to light */
:root.dark .theme-toggle .fa-sun {
  display: inline-block;
}
:root.dark .theme-toggle .fa-moon {
  display: none;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 100vh;
}

.terminal-container {
  width: 100%;
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal-window {
  background-color: var(--terminal-bg);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* Profile Section */
.profile-section {
  grid-column: 2;
  grid-row: 1;
}

.profile-image {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--text-primary);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Terminal Output */
.terminal-output {
  grid-column: 1;
  grid-row: 1;
  font-size: 24px;
  line-height: 1.4;
}

.command-line {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

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

.command {
  color: var(--text-primary);
  font-weight: 400;
}

.about-me {
  color: var(--text-primary);
  font-weight: 400;
  font-size: 18px;
  text-align: left;
  margin-left: 18px;
  margin-top: 24px;
  margin-bottom: 24px;
  line-height: 1.4;
  display: block;
}

.about-me p {
  margin-bottom: 1em; /* Adds space below each paragraph */
}

.download-link {
  text-decoration: none;
  color: var(--text-primary);
}

.resume {
  color: var(--text-primary);
  font-weight: 400;
  font-size: 18px;
  text-align: left;
  margin-left: 18px;
  margin-top: 24px;
  margin-bottom: 24px;
  line-height: 1.4;
  display: block;
}

.resume p {
  margin-bottom: 1em; /* Adds space below each paragraph */
}

.type2 {
  margin-left: 18px;
}

.align-left {
  margin-left: -35px;
}

.output {
  margin-bottom: 32px;
  margin-left: 52px;
}

.username {
  color: var(--text-primary);
  font-weight: 400;
}

.groups {
  color: var(--text-primary);
  font-weight: 400;
}

.skills-icons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.skills-icons i {
  font-size: 42px;
  color: var(--text-primary);
  transition: transform 0.3s ease, color 0.3s ease;
}

.skills-icons i:hover {
  transform: translateY(-3px) scale(1.1);
}

.skills-icons .fa-python:hover {
  color: #3776ab;
}

.skills-icons .fa-html5:hover {
  color: #e34f26;
}

.skills-icons .fa-css3-alt:hover {
  color: #1572b6;
}

.skills-icons .fa-js-square:hover {
  color: #f7df1e;
}

.skills-icons .fa-linux:hover {
  color: #fcc624;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    padding: 15px 0;
  }

  .nav-icons {
    gap: 15px;
    margin-top: 20px;
  }

  .nav-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .main-content {
    margin-left: 60px;
    padding: 20px 15px;
  }

  .terminal-window {
    padding: 24px;
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .profile-section {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .terminal-output {
    grid-column: 1;
    grid-row: 2;
    font-size: 18px;
  }

  .profile-image {
    width: 100px;
    height: 100px;
  }

  .output {
    margin-left: 0;
    text-align: left;
  }

  .skills-icons {
    justify-content: flex-start;
    gap: 15px;
  }

  .skills-icons i {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 50px;
    padding: 10px 0;
  }

  .nav-icons {
    gap: 12px;
    margin-top: 15px;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .main-content {
    margin-left: 50px;
    padding: 15px 10px;
  }

  .terminal-window {
    padding: 20px;
    gap: 20px;
  }

  .terminal-output {
    font-size: 16px;
  }

  .profile-image {
    width: 80px;
    height: 80px;
  }

  .skills-icons {
    gap: 12px;
    flex-wrap: wrap;
  }

  .skills-icons i {
    font-size: 28px;
  }

  .command-line {
    gap: 8px;
  }

  .output {
    margin-bottom: 24px;
  }
}

/* Animation for theme transition */
* {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* Focus styles for accessibility */
.nav-icon:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Loading animation for profile image */
.profile-image img {
  transition: opacity 0.3s ease;
}

.profile-image img:not([src]) {
  opacity: 0;
}

/* Spin animation for theme toggle */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
