/* ===================================
   Tahsinul Mohsin - Portfolio Styles
   ===================================
   Dark theme with neon cyan-green accents
   Terminal-inspired aesthetic
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1f1f35;
  --accent-primary: #00ffc8;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #06b6d4;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-color: rgba(0, 255, 200, 0.1);
  --glow-color: rgba(0, 255, 200, 0.15);
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 200, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 200, 0.5);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 30px var(--glow-color);
  background: rgba(10, 10, 15, 0.95);
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: var(--accent-primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--accent-primary);
}

.nav-link.active::after {
  transform: scaleX(1);
}

/* Mobile Menu */
#mobile-menu {
  animation: slideDown 0.3s ease forwards;
}

#mobile-menu .nav-link {
  display: block;
  padding: 0.5rem 0;
  font-size: 1rem;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 255, 200, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(124, 58, 237, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
  animation: gradient-shift 15s ease-in-out infinite alternate;
}

.typing-cursor {
  animation: blink 1s step-end infinite;
}

.hero-title .accent {
  color: var(--accent-primary);
  text-shadow: 0 0 40px rgba(0, 255, 200, 0.3), 0 0 80px rgba(0, 255, 200, 0.1);
}

/* Hero CTA Buttons */
.hero-cta .btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--accent-primary);
}

.hero-cta .btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 255, 200, 0.4), 0 0 60px rgba(0, 255, 200, 0.15);
}

.hero-cta .btn-outline {
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
}

.hero-cta .btn-outline:hover {
  background: rgba(0, 255, 200, 0.1);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 200, 0.2);
}

/* Terminal Line */
.terminal-line {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

/* ===== Section Styles ===== */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-primary);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-top: 1rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  transition: all 0.4s ease;
}

@media (min-width: 768px) {
  .card {
    padding: 2rem;
  }
}

.card:hover {
  border-color: rgba(0, 255, 200, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px var(--glow-color);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: rgba(0, 255, 200, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

/* ===== Experience Timeline ===== */
.timeline {
  position: relative;
  border-left: 2px solid rgba(0, 255, 200, 0.2);
  margin-left: 1rem;
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 255, 200, 0.5);
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-primary);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  display: block;
}

.timeline-content {
  margin-top: 0.5rem;
}

/* ===== Skills ===== */
.skill-category {
  transition: all 0.4s ease;
}

.skill-chip {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: rgba(0, 255, 200, 0.1);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--accent-primary);
  border: 1px solid rgba(0, 255, 200, 0.2);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-chip:hover {
  background: rgba(0, 255, 200, 0.2);
  transform: scale(1.05);
}

.skill-bar-container {
  height: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 9999px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
  border-radius: 9999px;
  width: 0;
  transition: width 1.5s ease-out;
}

/* ===== Education ===== */
.edu-card {
  transition: all 0.4s ease;
}

.edu-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 255, 200, 0.1);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
}

/* ===== Contact ===== */
.contact-form input,
.contact-form textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--glow-color);
}

/* Submit button (reuse btn-primary style) */
.contact-form .btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-radius: 0.5rem;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--accent-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.contact-form .btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(0, 255, 200, 0.4);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.contact-link:hover {
  color: var(--accent-primary);
}

/* ===== Footer ===== */
.footer-text {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

/* ===== Animations (Keyframes) ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 255, 200, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.5), 0 0 40px rgba(0, 255, 200, 0.2);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 0%;
    transform: scale(1);
  }
  50% {
    transform: scale(1.1) rotate(1deg);
  }
  100% {
    background-position: 100% 100%;
    transform: scale(1);
  }
}

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

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

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ===== Utility Classes ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-border {
  transition: box-shadow 0.3s ease;
}

.glow-border:hover {
  box-shadow: 0 0 20px var(--glow-color);
}

.glass {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(26, 26, 46, 0.5);
}

/* ===== Back to Top Button ===== */
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ===== Toast Notification ===== */
#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }

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

  .hero-title {
    font-size: 2rem !important;
  }

  .card {
    padding: 1.25rem;
  }

  .timeline {
    margin-left: 0.5rem;
  }

  .timeline-item {
    padding-left: 2rem;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.75rem !important;
  }

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