/* ===== CLEAN TERMINAL PORTFOLIO ===== */

/* === CSS Variables === */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent: #ffc107;
  --accent-hover: #ffb300;
  --border: #2a2a2a;
  --card-bg: #121212;
  --success: #3fb950;
  --font: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --accent: #e6a800;
  --accent-hover: #cc9600;
  --border: #e0e0e0;
  --card-bg: #ffffff;
}

/* === Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.text-justify {
  text-align: justify;
}

/* === Scroll Progress === */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  width: 0%;
}

/* === Loading Screen === */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

.terminal-container {
  width: min(500px, 90vw);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.terminal-header {
  background: var(--bg-primary);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.terminal-buttons {
  display: flex;
  gap: 6px;
}

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-btn.close {
  background: #ff5f56;
}

.terminal-btn.minimize {
  background: #ffbd2e;
}

.terminal-btn.maximize {
  background: #27c93f;
}

.terminal-title {
  color: var(--text-secondary);
  font-size: 0.8rem;
  flex: 1;
  text-align: center;
}

.terminal-body {
  padding: 16px;
  min-height: 120px;
}

.terminal-line {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.terminal-prompt {
  color: var(--success);
}

.terminal-text {
  color: var(--text-primary);
}

.terminal-output {
  color: var(--success);
  padding-left: 16px;
}

/* === Header/Nav === */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.nav-link {
  color: var(--text-secondary) !important;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent) !important;
}

#theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

/* === Hero === */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

.hero-section .lead {
  color: var(--text-secondary);
}

.profile-image {
  max-width: 400px;
  border-radius: 8px;
}

/* === Sections === */
.section-title {
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
}

/* === Cards === */
.card,
.skill-card,
.project-card,
.highlight-card,
.stat-card,
.certificate-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover,
.skill-card:hover,
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Project card text colors */
.project-card .card-title,
.project-card .project-title {
  color: var(--text-primary);
}

.project-card .card-text,
.project-card .project-description {
  color: var(--text-secondary);
}

.skill-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.skill-name {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* === About Section === */
.about-profile-img {
  width: 250px;
  max-width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.about-gradient-border {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

/* === Stats === */
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === Timeline === */
.timeline {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.timeline-item {
  text-align: center;
  position: relative;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  margin: 0 auto 8px;
}

.timeline-item.active .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.timeline-item.future {
  opacity: 0.5;
}

.timeline-content h5 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* === Progress Log (Clean Card) === */
.progress-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.progress-card-header {
  background: var(--bg-primary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.progress-card-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
}

.progress-card-body::-webkit-scrollbar {
  width: 6px;
}

.progress-card-body::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.progress-card-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.progress-card-body h1,
.progress-card-body h2,
.progress-card-body h3 {
  color: var(--accent);
  margin-top: 1.5rem;
}

.progress-card-body h1:first-child {
  margin-top: 0;
}

.progress-card-body ul {
  padding-left: 1.5rem;
}

.progress-card-body li {
  margin-bottom: 0.5rem;
}

/* === Cybersecurity Sections (Coming Soon) === */
.coming-soon-card {
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  opacity: 0.7;
}

.coming-soon-card i {
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.coming-soon-card h5 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.coming-soon-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
}

/* === Buttons === */
.btn-primary {
  background: var(--accent);
  border: none;
  color: var(--bg-primary);
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-outline-primary:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* === Form === */
.form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.form-control:focus {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.form-control::placeholder {
  color: var(--text-secondary);
}

/* === Footer === */
.footer-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.social-link {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* === Matrix Rain === */
#matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}

/* === Toast === */
.toast-notification {
  z-index: 9999;
}

/* === Animations === */
@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.typing-cursor {
  animation: blink 1s infinite;
  color: var(--accent);
}

/* === Responsive === */
@media (max-width: 992px) {
  .hero-section {
    padding-top: 60px;
    min-height: auto;
    padding-bottom: 2rem;
  }

  .hero-section .order-1 {
    margin-bottom: 0 !important;
  }

  .hero-section .row {
    row-gap: 0.5rem !important;
  }
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 1.8rem;
    margin-top: 0;
  }

  .hero-section .lead,
  .hero-subtitle {
    font-size: 1rem !important;
  }

  .profile-image {
    max-width: 240px;
    margin-bottom: 0;
  }

  .profile-image-container {
    margin-bottom: 0;
  }

  .about-profile-img {
    width: 120px;
    height: 120px;
  }

  /* Smaller About section text on mobile */
  .section-text.fs-5 {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
  }

  .section-title.display-4 {
    font-size: 1.8rem !important;
  }

  .timeline {
    gap: 0.75rem;
  }

  .progress-card-body {
    max-height: 300px;
  }

  .highlight-card {
    padding: 1rem;
  }

  /* Fix stat cards on mobile */
  .stat-card {
    padding: 0.75rem 0.5rem;
    text-align: center;
    height: 100%;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .coming-soon-card {
    padding: 1.25rem;
  }
}

@media (max-width: 576px) {
  .terminal-container {
    width: 95vw;
  }

  /* Navbar mobile fixes */
  .navbar-brand {
    font-size: 0.9rem !important;
  }

  .navbar-nav {
    text-align: right;
    padding-right: 1rem;
  }

  .nav-link {
    padding: 0.5rem 0 !important;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .profile-image {
    max-width: 280px;
  }

  .about-profile-img {
    width: 180px;
  }

  .section-text.fs-5 {
    font-size: 0.85rem !important;
  }

  .btn-lg {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
  }

  /* Fix stat cards text overflow */
  .stat-card {
    padding: 0.5rem 0.25rem;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.65rem;
    word-wrap: break-word;
  }
}