/*
 * Portfolio Website Styles
 * ======================
 * This file contains all the CSS for the portfolio website.
 * It is organized by sections for easy maintenance and readability.
 */

/* =============================================
 * CSS Custom Properties (Variables)
 * ============================================= */
:root {
  /* Layout variables */
  --bottom-nav-height: 55px;
  
  /* Color palette */
  --ui-bg-base: #ffffff;           /* Base background color */
  --ui-bg-component: #ffffff;      /* Component background color */
  --ui-border-base: #eeeeee;       /* Base border color */
  --ui-fg-base: #000000;           /* Base foreground/text color */
  --ui-fg-muted: #555555;          /* Muted text color */
  --ui-fg-interactive: #000000;    /* Interactive element color */
}

/* =============================================
 * Base Styles
 * ============================================= */
body {
  font-family: 'Outfit', monospace;
  background-color: var(--ui-bg-base);
  color: var(--ui-fg-base);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection highlighting */
::selection {
  background-color: var(--ui-fg-base);
  color: var(--ui-bg-base);
}

/* Hide scrollbar for cleaner appearance */
::-webkit-scrollbar {
  width: 0;
}

/* =============================================
 * Animation Definitions
 * ============================================= */
@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =============================================
 * Animation Classes
 * ============================================= */
.animate-card {
  animation: 0.5s ease-out forwards fadeInUp;
  animation-delay: var(--animation-delay, 0s);
  opacity: 0;
}

.fade-in-section {
  animation: 0.5s fadeIn;
}

/* Search highlight effect */
.search-highlight {
  background-color: rgb(0 0 0 / 0.1);
  border-radius: 2px;
}

/* =============================================
 * Navigation Styles
 * ============================================= */
#nav-container {
  display: flex;
  height: 100%;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  background-color: var(--ui-bg-component);
  border-top: 1px solid var(--ui-border-base);
}

.nav-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  color: var(--ui-fg-muted);
  transition: color 0.2s ease-in-out;
  font-weight: 500;
  cursor: pointer;
}

.nav-link.active {
  color: var(--ui-fg-interactive);
  font-weight: 700;
}

.nav-link i {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.nav-link span {
  font-size: 0.6rem;
}

/* =============================================
 * Responsive Styles
 * ============================================= */
@media (min-width: 1024px) {
  #floating-nav {
    left: auto;
    right: 2.5rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    max-width: none;
  }
  
  #nav-container {
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    background-color: #fff0;
    border: none;
    box-shadow: none;
    height: auto;
  }
  
  .nav-link {
    flex-direction: row;
    justify-content: flex-end;
    flex-grow: 0;
    height: auto;
    font-weight: 500;
    padding: 4px 0;
  }
  
  .nav-link:hover {
    color: var(--ui-fg-base);
  }
  
  .nav-link.active {
    font-weight: 700;
  }
  
  .nav-link i {
    display: none;
  }
  
  .nav-link span {
    font-size: 1rem;
  }
}

/* =============================================
 * Accessibility Utilities
 * ============================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.focus:not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* =============================================
 * Lazy Loading Utilities
 * ============================================= */
.lazy {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.lazy[data-src] {
  opacity: 1;
}
