/* Gruvbox Color Palette */
:root {
  /* Background colors */
  --bg0-hard: #1d2021;
  --bg0: #282828;
  --bg0-soft: #32302f;
  --bg1: #3c3836;
  --bg2: #504945;
  --bg3: #665c54;
  --bg4: #7c6f64;

  /* Foreground colors */
  --fg0: #fbf1c7;
  --fg1: #ebdbb2;
  --fg2: #d5c4a1;
  --fg3: #bdae93;
  --fg4: #a89984;

  /* Normal colors */
  --red: #cc241d;
  --green: #98971a;
  --yellow: #d79921;
  --blue: #458588;
  --purple: #b16286;
  --aqua: #689d6a;
  --orange: #d65d0e;
  --gray: #928374;

  /* Bright colors */
  --bright-red: #fb4934;
  --bright-green: #b8bb26;
  --bright-yellow: #fabd2f;
  --bright-blue: #83a598;
  --bright-purple: #d3869b;
  --bright-aqua: #8ec07c;
  --bright-orange: #fe8019;
  --bright-gray: #a89984;
}

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

body {
  background: var(--bg0-hard);
  color: var(--fg1);
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  height: 100vh;
  overflow: hidden;
  transition: all 0.5s ease;
}

/* Terminal Mode Styles */
.terminal {
  height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg0-hard) 0%, var(--bg0) 100%);
  position: relative;
  transition: all 0.5s ease;
}

.terminal-header {
  display: flex;
  align-items: center;
  /* margin-bottom: 20px; */
  padding: 10px 15px;
  background: var(--bg1);
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--bg2);
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--bg3);
}

.btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 5px rgba(251, 241, 199, 0.3);
}

.btn.close {
  background: var(--red);
}
.btn.minimize {
  background: var(--yellow);
}
.btn.maximize {
  background: var(--green);
}

.terminal-title {
  margin-left: 15px;
  color: var(--fg2);
  font-size: 14px;
}

.terminal-body {
  background: var(--bg0-hard);
  padding: 20px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
  position: relative;
  border: 1px solid var(--bg2);
  border-top: none;
}

.output {
  margin-bottom: 10px;
  line-height: 1.4;
}

.prompt {
  color: var(--bright-green);
  font-weight: bold;
}

.input-line {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.current-input {
  background: transparent;
  border: none;
  color: var(--fg1);
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 16px;
  outline: none;
  flex: 1;
  margin-left: 5px;
  caret-color: var(--bright-yellow);
}

.cursor {
  background: var(--bright-yellow);
  width: 10px;
  height: 20px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* File type colors */
.file {
  color: var(--fg1);
}

.directory {
  color: var(--bright-blue);
  font-weight: bold;
}

.executable {
  color: var(--bright-green);
  font-weight: bold;
}

/* Output colors */
.error {
  color: var(--bright-red);
}

.success {
  color: var(--bright-green);
}

.highlight {
  color: var(--bright-yellow);
  font-weight: bold;
}

.ascii-art {
  color: var(--bright-aqua);
  font-size: 12px;
  line-height: 1.2;
}

/* Scrollbar styling */
.scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) var(--bg0);
}

.scrollbar::-webkit-scrollbar {
  width: 8px;
}

.scrollbar::-webkit-scrollbar-track {
  background: var(--bg0);
}

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

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

/* Website Mode Styles */
body.website-mode {
  background: var(--bg0);
  color: var(--fg1);
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

.website {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  background: linear-gradient(135deg, var(--bg0-hard) 0%, var(--bg0) 100%);
  min-height: 100vh;
}

.website.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.terminal.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* Navigation */
.navbar {
  background: var(--bg0-soft);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bg2);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  isolation: isolate;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bright-yellow);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--fg1);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--bright-aqua);
  text-shadow: 0 0 5px rgba(142, 192, 124, 0.5);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bright-green), var(--bright-aqua));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.terminal-toggle {
  background: var(--bg1);
  border: 1px solid var(--bright-green);
  color: var(--bright-green);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
}

.terminal-toggle:hover {
  background: var(--bright-green);
  color: var(--bg0);
  box-shadow: 0 0 10px rgba(184, 187, 38, 0.3);
}

/* Content Sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--bg2);
}

.section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--bright-yellow);
  text-shadow: 0 0 10px rgba(250, 189, 47, 0.3);
}

.section-content {
  line-height: 1.8;
  font-size: 1.1rem;
  color: var(--fg1);
}

.section-content p {
  margin-bottom: 1.5rem;
}

.highlight-text {
  color: var(--bright-orange);
  font-weight: bold;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-category {
  background: var(--bg0-soft);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.skill-category:hover {
  border-color: var(--bright-aqua);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skill-category h3 {
  color: var(--bright-aqua);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1rem;
  color: var(--fg2);
}

.skill-list li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--bright-green);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--bg0-soft);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: var(--bright-blue);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-5px);
}

.project-title {
  color: var(--bright-blue);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.project-tech {
  color: var(--bright-orange);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-item {
  background: var(--bg0-soft);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.contact-item:hover {
  border-color: var(--bright-purple);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.contact-item:hover .contact-icon svg {
  fill: var(--bright-yellow) !important;
  transform: scale(1.1);
}

/* Contact Icon Reset and Styling */
.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px;
  max-height: 48px;
  fill: var(--bright-purple) !important;
  transition: all 0.3s ease;
  display: block;
}

/* Reset any potential SVG defaults */
.contact-icon svg * {
  fill: inherit;
}

.contact-icon svg path {
  fill: inherit;
}

/* Contact Content Styling */
.contact-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  flex: 1;
  justify-content: space-between;
}

.contact-label {
  color: var(--fg2);
  font-size: 0.9rem;
  word-break: break-all;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-btn {
  background: var(--bg1);
  border: 1px solid var(--bright-aqua);
  color: var(--bright-aqua);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.9rem;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
  min-width: 120px;
  text-align: center;
}

.contact-btn:hover {
  background: var(--bright-aqua);
  color: var(--bg0);
  box-shadow: 0 0 10px rgba(142, 192, 124, 0.3);
  transform: translateY(-2px);
}

.contact-btn:active {
  transform: translateY(0);
}

/* Legacy contact-link for backward compatibility */
.contact-link {
  color: var(--bright-aqua);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-link:hover {
  color: var(--bright-yellow);
  text-shadow: 0 0 5px rgba(250, 189, 47, 0.5);
}

/* Experience section specific styling */
.experience-item {
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: var(--bg0-soft);
  border-left: 4px solid var(--bright-green);
  border-radius: 0 8px 8px 0;
}

.experience-title {
  color: var(--bright-blue);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.experience-period {
  color: var(--bright-yellow);
  margin-bottom: 1rem;
  font-weight: bold;
}

.experience-description {
  color: var(--fg2);
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .container {
    padding: 0 1rem;
  }

  .skill-grid,
  .project-grid,
  .contact-info {
    grid-template-columns: 1fr;
  }

  /* Mobile-specific contact styling */
  .contact-label {
    font-size: 0.8rem;
    display: none; /* Hide URLs on mobile */
  }

  .contact-btn {
    min-width: 140px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .contact-item {
    padding: 1.2rem;
  }
}

/* Animation for mode transition */
.fade-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg0-hard);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fade-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* Selection styling */
::selection {
  background: var(--bright-yellow);
  color: var(--bg0);
}

::-moz-selection {
  background: var(--bright-yellow);
  color: var(--bg0);
}

/* Focus styles - removed yellow border from input */
.current-input:focus {
  outline: none;
}

/* Link hover effects in content */
.section-content a {
  color: var(--bright-aqua);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.section-content a:hover {
  color: var(--bright-yellow);
  border-bottom-color: var(--bright-yellow);
}

/* Code styling within content */
.section-content code {
  background: var(--bg1);
  color: var(--bright-green);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
}

/* Strong text styling */
.section-content strong {
  color: var(--bright-orange);
  font-weight: bold;
}

/* Mobile Responsive Navbar */

/* Hamburger Menu Styles */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  border: none;
  background: transparent;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--fg1);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .hamburger {
    display: flex;
    order: 3;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg0-soft);
    flex-direction: column;
    gap: 0;
    padding: 1rem 2rem;
    border-top: 1px solid var(--bg2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /* z-index: 1200; */
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--bg2);
    width: 100%;
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 1rem 0;
    text-align: center;
    width: 100%;
    border-bottom: none;
    cursor: pointer;
    position: relative;
  }

  .nav-link::after {
    display: none; /* Remove the hover underline effect on mobile */
  }

  .terminal-toggle {
    order: 2;
    margin-left: auto;
    margin-right: 1rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .nav-brand {
    order: 1;
    font-size: 1.2rem;
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }

  /* Backdrop for menu */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 800;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  .nav-backdrop.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-menu {
    gap: 1.5rem;
    touch-action: pan-y;
  }

  .terminal-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}
