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

:root {
  --bg-void: #08080c;
  --bg-surface: rgba(16, 16, 24, 0.65);
  --bg-surface-opaque: #101018;
  --accent: #00d4aa;
  --accent-rgb: 0, 212, 170;
  --accent-glow: rgba(0, 212, 170, 0.2);
  --accent-hover: #00ffcc;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 212, 170, 0.3);
  --font-mono: "Fira Code", monospace;
  --font-sans: 'Outfit', 'Inter', sans-serif;
}

/* Reset and Core Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-void);
  color: var(--text-secondary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Selection & Scrollbar */
::selection {
  background-color: var(--accent-glow);
  color: var(--text-primary);
}

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

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

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

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

/* Custom Navigation */
.custom-navbar {
  background-color: rgba(8, 8, 12, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  transition: all 0.3s ease;
}

.custom-navbar .navbar-brand {
  font-family: var(--font-mono);
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.custom-navbar .navbar-nav .nav-link {
  color: var(--text-muted) !important;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: 24px;
  position: relative;
  transition: color 0.3s ease;
  padding: 6px 0;
}

.custom-navbar .navbar-nav .nav-link:hover,
.custom-navbar .navbar-nav .nav-link.active {
  color: var(--text-primary) !important;
}

.custom-navbar .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-navbar .navbar-nav .nav-link.active::after,
.custom-navbar .navbar-nav .nav-link:hover::after {
  transform: scaleX(1);
}

.nav-avail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(0, 212, 170, 0.25);
  color: var(--accent) !important;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-avail-btn:hover {
  background-color: var(--accent);
  color: var(--bg-void) !important;
  box-shadow: 0 0 15px var(--accent-glow);
}

.nav-avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot-active 1.5s infinite;
}

@keyframes pulse-dot-active {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(0, 212, 170, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 212, 170, 0);
  }
}

/* Hero Section */
.heroSection {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 60px;
}

.hero-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: clamp(10px, 1.1vw, 12px);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: 24px;
}

.heroSection h1 {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  max-width: 1000px;
  margin: 0 auto 35px;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--accent);
  color: var(--bg-void) !important;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 30px;
  border: none;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.15);
}

.btn-primary-custom:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}

.btn-secondary-custom {
  background-color: transparent;
  color: var(--text-primary) !important;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary-custom:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  transform: translateY(-2px);
}

/* Interactive Grids & Particles */
.grid-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.grid-line {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.03);
}

.grid-line-vertical {
  width: 1px;
  height: 100%;
}

.grid-line-horizontal {
  width: 100%;
  height: 1px;
}

.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
  }

  10% {
    opacity: 0.3;
  }

  90% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(-100px) scale(0.5);
    opacity: 0;
  }
}

/* Cursor Trail */
.cursor-trail {
  position: fixed;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  box-shadow: 0 0 10px var(--accent);
  opacity: 0.8;
  transition: transform 0.05s linear;
}

/* Sections General */
section {
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

.section-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  display: block;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 48px;
}

/* Manifesto Section */
.manifestoSection {
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: rgba(8, 8, 12, 0.4);
}

.manifesto-text {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  letter-spacing: -0.010em;
}

.manifesto-muted {
  opacity: 0.2;
  transition: opacity 0.5s ease;
}

.manifesto-active {
  opacity: 1;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
}

/* Stats Section */
.statsSection {
  padding: 80px 0;
  background: linear-gradient(to bottom, var(--bg-void), rgba(16, 16, 24, 0.3), var(--bg-void));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 40px 30px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-num {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* About Section */
.aboutSection {
  overflow: hidden;
}

.about-content {
  max-width: 800px;
  margin-bottom: 40px;
}

.about-accent {
  color: var(--text-primary);
  font-weight: 600;
}

/* Stack Rows */
.stack-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
}

.stack-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: start;
}

@media (min-width: 768px) {
  .stack-row {
    grid-template-columns: 14rem 1fr;
    gap: 32px;
  }
}

.stack-row-title {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding-top: 4px;
}

.stack-row-content {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.6;
}

/* Projects Section & Grid Cards */
.stack-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .stack-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stack-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stack-card {
  position: relative;
  height: auto;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card-glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.project-card-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(250px circle at var(--x, 50%) var(--y, 50%), rgba(0, 212, 170, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card-glass:hover::before {
  opacity: 1;
}

.project-card-glass:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.project-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.project-arrow {
  color: var(--accent);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.project-card-glass:hover .project-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.project-title {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.project-card-glass:hover .project-title {
  color: var(--accent);
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  font-size: 0.85rem;
}

.project-links span {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.project-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

/* Experience Section Timeline */
.careerSection {
  background: linear-gradient(to bottom, var(--bg-void), rgba(16, 16, 24, 0.2), var(--bg-void));
}

.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 1px solid var(--border-color);
}

.timeline-column-title {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.timeline-item {
  position: relative;
  margin-bottom: 60px;
  padding-left: 20px;
}

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

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: var(--bg-void);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background-color: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}

.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: var(--border-hover);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--accent);
  font-weight: 500;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.timeline-bullets {
  padding-left: 20px;
  margin-bottom: 16px;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.timeline-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-tech-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* Contact Section */
.contactSection {
  text-align: center;
  padding-bottom: 120px;
}

.contact-card {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 60px 40px;
  border-radius: 30px;
  position: relative;
}

.contact-email {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  margin: 30px 0;
  transition: color 0.3s ease;
  position: relative;
}

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

.contact-email::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-email:hover::after {
  transform: scaleX(1);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.contact-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-glow);
  transform: translateY(-3px);
}

/* Modal Drawer (Slide Out from Right) */
.modal-dialog-end {
  position: fixed;
  top: 0;
  right: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  max-width: 550px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog-end {
  transform: translateX(0);
}

.custom-modal-content {
  background-color: var(--bg-surface-opaque);
  color: var(--text-secondary);
  height: 100%;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 24px 30px;
}

.modal-header .modal-title {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.btn-close-white {
  filter: invert(1) grayscale(1) brightness(2);
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.btn-close-white:hover {
  opacity: 1;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-project-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  background-color: var(--bg-void);
}

.modal-section-title {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  margin-top: 24px;
}

.modal-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.modal-store-links {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.store-btn {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.store-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Animations Scroll Triggers */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

/* Scroll adjustments for navigation */
section[id] {
  scroll-margin-top: 80px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  .custom-navbar {
    padding: 15px 0;
  }

  .custom-navbar .navbar-collapse {
    background-color: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .custom-navbar .navbar-nav .nav-link {
    margin-left: 0;
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .custom-navbar .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }

  .nav-avail-btn {
    margin-top: 15px;
    width: 100%;
    justify-content: center;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-dot {
    left: -26px;
  }

  .timeline-content {
    padding: 20px;
  }

  .project-card-glass {
    padding: 24px;
    min-height: auto;
  }

  .contact-card {
    padding: 40px 20px;
  }
}

/* prefers-reduced-motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .floating-particle,
  .cursor-trail,
  .grid-container {
    display: none !important;
  }
}