/* === Portfolio Base Theme Variables === */
:root {
  --bg-dark: #121212;
  --text-dark: #ffffff;
  --bg-light: #f0f0f0;
  --text-light: #000000;
  --link-bg: #2a2a2a;
  --link-hover: #444444;
  --accent: #00ffcc;
  --accent-hover: #00ddb5;
}

/* === Base Styles === */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark);
  color: var(--text-dark);
}
body.light {
  background: var(--bg-light);
  color: var(--text-light);
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}
.fade-in.delay {
  animation-delay: 0.5s;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* === Projects Layout === */
.projects {
  max-width: 1000px;
  margin: auto;
  padding: 2rem;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* === Card Styles === */
.project-card {
  background: var(--link-bg);
  padding: 1.5rem;
  border-radius: 10px;
  transition: transform 0.3s, background 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  background: var(--link-hover);
}
body.light .project-card {
  background: #ffffff;
  border: 1px solid #ddd;
}
body.light .project-card:hover {
  background: #f0f0f0;
}

/* === Combined Input + Results Card === */
/* Span two columns and use flex layout */
.project-card[style*="grid-column"] {
  display: flex;
  flex-direction: column;
}

/* Input Section */
.input-section {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.input-section input {
  flex: 1;
  padding: 0.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  background: #222;
  color: #fff;
}
body.light .input-section input {
  background: #f0f0f0;
  color: #000;
}
.input-section button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background: var(--accent);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  color: #000;
  transition: background-color 0.3s ease;
}
.input-section button:hover {
  background: var(--accent-hover);
}

/* Optional spacing before input */
.project-card h3 + .input-section {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

/* === Results & Spinner === */
#loading-spinner {
  font-size: 1rem;
  margin-bottom: 1rem;
}
#prediction-result,
#sentiment-analysis {
  margin-top: 1rem;
  line-height: 1.4;
}

/* === Responsive Chart Styles === */
/* Make canvas fill its container */
.project-card canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 400px;
  margin-top: 1rem;
}
@media (max-width: 600px) {
  .project-card canvas {
    max-height: 250px;
  }
}

/* === Responsive Layout === */
@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
/* Default: show nav-links on larger screens */
.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Mobile only: hide and toggle with hamburger */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--nav-bg);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.show {
    display: flex;
    max-height: 300px;
    padding: 1rem 2rem;
  }
}/* Default: show nav-links on larger screens */
.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Mobile only: hide and toggle with hamburger */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--nav-bg);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.show {
    display: flex;
    max-height: 300px;
    padding: 1rem 2rem;
  }
}
