/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  /* Colors — pure black/charcoal matching abhayrana.com */
  --bg-primary: #080808;
  --bg-secondary: #0d0d0d;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-nav: rgba(8, 8, 8, 0.88);

  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #6b6b6b;

  --accent: #e74c3c;
  --accent-soft: rgba(231, 76, 60, 0.15);
  --accent-glow: rgba(231, 76, 60, 0.4);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sizing */
  --nav-height: 64px;
  --container-width: 1100px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: var(--container-width);
  height: var(--nav-height);
  background: rgba(14, 14, 14, 0.6);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  z-index: 1000;
  transition: all 0.4s var(--ease);
}



.nav-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  transition: all 0.3s var(--ease);
}

.nav-logo:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

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

.nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
  background: var(--accent);
}

.nav-resume {
  color: var(--accent) !important;
  font-weight: 600;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 10px;
  margin-left: 6px;
}

.nav-resume::after {
  display: none;
}

.nav-resume:hover {
  background: var(--accent-soft) !important;
  border-color: rgba(231, 76, 60, 0.5);
  box-shadow: 0 0 16px rgba(231, 76, 60, 0.15);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50vh;
  background: radial-gradient(100% 100% at 50% 100%, rgba(231, 76, 60, 0.3) 0%, rgba(231, 76, 60, 0.1) 40%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

/* Ensure all sections sit above the fixed particle canvas */
.section,
.footer {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  animation: fadeUp 0.8s var(--ease) both;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 255, 255, 0.15);
  animation: fadeUp 0.8s 0.15s var(--ease) both;
}

.hero-badge {
  display: inline-block;
  animation: fadeUp 0.8s 0.3s var(--ease) both;
}

.hero-badge span {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 0 30px var(--accent-glow);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-top: 24px;
  line-height: 1.8;
  animation: fadeUp 0.8s 0.45s var(--ease) both;
}

.highlight-italic {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.6s var(--ease) both;
}

.hero-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.copy-btn:hover {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #d42815;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 100px 0;
}

.section-alt {
  background: transparent;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 56px;
  font-size: 1rem;
}

/* ========================================
   ABOUT
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 60px;
  align-items: start;
}

.about-image-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  position: relative;
}

.about-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.about-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.about-image-frame:hover .about-image {
  transform: scale(1.05);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.98rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s var(--ease);
}

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

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-icon {
  display: block;
  font-size: 1.6rem;
  color: var(--accent);
}

/* ========================================
   PROJECTS
   ======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.4s var(--ease);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(231, 76, 60, 0.06), transparent 40%);
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 0;
}

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

.project-card:hover {
  border-color: rgba(231, 76, 60, 0.4);
  transform: translateY(-6px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(231, 76, 60, 0.08),
    inset 0 0 60px rgba(231, 76, 60, 0.02);
}

.project-card-inner {
  padding: 32px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.project-name a {
  transition: color 0.2s;
}

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

.project-name-accent a {
  color: var(--accent);
}

.project-type {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.project-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: border-color 0.3s, background 0.3s;
}

.project-card:hover .highlight-item {
  border-color: rgba(231, 76, 60, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.highlight-item i {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 3px;
}

.highlight-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.highlight-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tags span {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: border-color 0.3s, color 0.3s;
}

.project-card:hover .project-tags span {
  border-color: rgba(231, 76, 60, 0.15);
  color: var(--text-secondary);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

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

.project-card-featured {
  border-color: rgba(231, 76, 60, 0.2);
}

.project-card-featured:hover {
  border-color: rgba(231, 76, 60, 0.5);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(231, 76, 60, 0.12),
    inset 0 0 80px rgba(231, 76, 60, 0.03);
}

/* --- Project Brief / Tagline --- */
.project-tagline {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}

.project-tagline em {
  color: var(--accent);
  font-weight: 600;
}

/* --- Brief Footer: links + expand button --- */
.project-brief-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  gap: 16px;
}

.project-brief-footer .project-links {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

/* --- View Details Button --- */
.project-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 50px;
  background: rgba(231, 76, 60, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.project-expand-btn:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.5);
  box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
  transform: translateY(-1px);
}

.project-expand-btn i {
  font-size: 0.7rem;
  transition: transform 0.3s var(--ease);
}

/* Hide .project-details in the cards — they are shown in the modal */
.project-details {
  display: none;
}

/* ========================================
   PROJECT DETAIL MODAL
   ======================================== */
.project-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.project-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* When modal is open, prevent body scroll and layout shift */
body.modal-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.project-modal {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: linear-gradient(145deg, #181818 0%, #111111 100%);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: 24px;
  overflow-y: auto;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(231, 76, 60, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}

.project-modal-overlay.active .project-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Custom scrollbar for the modal */
.project-modal::-webkit-scrollbar {
  width: 6px;
}

.project-modal::-webkit-scrollbar-track {
  background: transparent;
}

.project-modal::-webkit-scrollbar-thumb {
  background: rgba(231, 76, 60, 0.3);
  border-radius: 3px;
}

.project-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(231, 76, 60, 0.5);
}

/* Close button */
.project-modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-modal-close:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.4);
  color: var(--accent);
  transform: rotate(90deg);
}

/* Modal content layout */
.project-modal-content {
  padding: 40px 40px 36px;
}

.project-modal-content .modal-header {
  margin-bottom: 24px;
}

.project-modal-content .modal-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.project-modal-content .modal-name.modal-name-accent {
  color: var(--accent);
}

.project-modal-content .modal-type {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.project-modal-content .modal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 76, 60, 0.3), transparent);
  margin: 24px 0;
}

.project-modal-content .modal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
}

.project-modal-content .modal-highlights-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.project-modal-content .modal-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.project-modal-content .modal-highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.3s, background 0.3s;
}

.project-modal-content .modal-highlight-item:hover {
  border-color: rgba(231, 76, 60, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.project-modal-content .modal-highlight-item i {
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.project-modal-content .modal-highlight-item strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.project-modal-content .modal-highlight-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-modal-content .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.project-modal-content .modal-tags span {
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.project-modal-content .modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.project-modal-content .modal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-main);
  text-decoration: none;
  transition: all 0.3s var(--ease);
  border: none;
  cursor: pointer;
}

.project-modal-content .modal-action-btn.btn-code {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.project-modal-content .modal-action-btn.btn-code:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-modal-content .modal-action-btn.btn-live {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.project-modal-content .modal-action-btn.btn-live:hover {
  background: #d42815;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ========================================
   PROJECT EXTRA SECTIONS (Modal)
   ======================================== */

/* --- Section Title --- */
.modal-extra-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: 8px;
}

/* --- Architecture Diagram --- */
.architecture-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 20px 0;
}

.arch-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.arch-row-split {
  flex-wrap: wrap;
}

.arch-connector {
  display: flex;
  justify-content: center;
  padding: 6px 0;
  color: rgba(231, 76, 60, 0.4);
  font-size: 0.75rem;
}

.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  min-width: 120px;
  text-align: center;
  transition: all 0.3s var(--ease);
}

.arch-node:hover {
  border-color: rgba(231, 76, 60, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.arch-node i {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.arch-node span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.arch-node small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Architecture node color coding */
.arch-node-user i {
  color: var(--text-secondary);
}

.arch-node-frontend i {
  color: #61DAFB;
}

.arch-node-cdn i {
  color: #FF9900;
}

.arch-node-backend i {
  color: #68A063;
}

.arch-node-ai i {
  color: #e74c3c;
}

.arch-node-db i {
  color: #4DB33D;
}

.arch-node-storage i {
  color: #FF9900;
}

.arch-node-logs i {
  color: #FF9900;
}

.arch-node-vector i {
  color: #A259FF;
}

.arch-node-embed i {
  color: #FFD54F;
}

.arch-node-llm i {
  color: #e74c3c;
}

/* Protocol labels on connectors */
.arch-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  margin-right: 6px;
}

/* Offset connector (points from EC2 to AI services row) */
.arch-connector-offset {
  margin-left: auto;
  margin-right: 15%;
}

/* AI services sub-row alignment */
.arch-row-ai {
  justify-content: flex-end;
  padding-right: 5%;
}

/* --- Tech Stack Badges --- */
.project-tech-badges {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tech-badge-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tech-badge-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 110px;
  padding-top: 5px;
}

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

.tech-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.3s var(--ease);
}

.tech-badge:hover {
  transform: translateY(-1px);
}

/* Badge color variations */
.tech-badge-react {
  background: rgba(97, 218, 251, 0.1);
  color: #61DAFB;
  border-color: rgba(97, 218, 251, 0.25);
}

.tech-badge-vite {
  background: rgba(189, 52, 254, 0.1);
  color: #BD34FE;
  border-color: rgba(189, 52, 254, 0.25);
}

.tech-badge-tailwind {
  background: rgba(56, 189, 248, 0.1);
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.25);
}

.tech-badge-node {
  background: rgba(104, 160, 99, 0.1);
  color: #68A063;
  border-color: rgba(104, 160, 99, 0.25);
}

.tech-badge-express {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border-color: var(--border);
}

.tech-badge-mongo {
  background: rgba(77, 179, 61, 0.1);
  color: #4DB33D;
  border-color: rgba(77, 179, 61, 0.25);
}

.tech-badge-fastapi {
  background: rgba(0, 150, 136, 0.1);
  color: #009688;
  border-color: rgba(0, 150, 136, 0.25);
}

.tech-badge-python {
  background: rgba(55, 118, 171, 0.1);
  color: #3776AB;
  border-color: rgba(55, 118, 171, 0.25);
}

.tech-badge-groq {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.25);
}

.tech-badge-hf {
  background: rgba(255, 213, 79, 0.1);
  color: #FFD54F;
  border-color: rgba(255, 213, 79, 0.25);
}

.tech-badge-qdrant {
  background: rgba(162, 89, 255, 0.1);
  color: #A259FF;
  border-color: rgba(162, 89, 255, 0.25);
}

.tech-badge-aws {
  background: rgba(255, 153, 0, 0.1);
  color: #FF9900;
  border-color: rgba(255, 153, 0, 0.25);
}

/* --- Deployment Grid --- */
.deployment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.deployment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.deployment-item:hover {
  border-color: rgba(231, 76, 60, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.deployment-item i {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.deployment-item strong {
  display: block;
  font-size: 0.78rem;
  color: var(--text-primary);
}

.deployment-item span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Additional Features List --- */
.project-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 6px 0;
}

.project-features-list li i {
  color: #4ade80;
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* --- Modal extra section animation --- */
.project-modal-overlay.active .modal-extra-section {
  animation: modalFadeUp 0.5s 0.45s var(--ease) both;
}

/* Modal entrance animation for staggered children */
.project-modal-overlay.active .modal-header {
  animation: modalFadeUp 0.5s 0.1s var(--ease) both;
}

.project-modal-overlay.active .modal-desc {
  animation: modalFadeUp 0.5s 0.2s var(--ease) both;
}

.project-modal-overlay.active .modal-highlights {
  animation: modalFadeUp 0.5s 0.3s var(--ease) both;
}

.project-modal-overlay.active .modal-tags {
  animation: modalFadeUp 0.5s 0.35s var(--ease) both;
}

.project-modal-overlay.active .modal-actions {
  animation: modalFadeUp 0.5s 0.4s var(--ease) both;
}

@keyframes modalFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal responsive rules → consolidated below in main @media blocks */

/* ========================================
   SKILLS
   ======================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-7 {
  grid-column: span 7;
}

.bento-col-5 {
  grid-column: span 5;
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.bento-card>* {
  position: relative;
  z-index: 2;
}

.bento-card:hover {
  border-color: rgba(231, 76, 60, 0.4);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 30px rgba(231, 76, 60, 0.03);
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  opacity: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(231, 76, 60, 0.1), transparent 40%);
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 0;
}

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

.bento-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.bento-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.bento-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bento-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s var(--ease);
  cursor: default;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.skill-pill:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.4);
  color: #fff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(231, 76, 60, 0.15);
}

.skill-pill i {
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease);
}

.skill-pill:hover i {
  transform: scale(1.2);
}

.skill-pill img {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.skill-pill:hover img {
  transform: scale(1.2);
}

/* ========================================
   EXPERIENCE / TIMELINE
   ======================================== */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14px;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--border) 80%);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 28px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent);
  z-index: 2;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.3s var(--ease);
}

.timeline-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

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

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline-company {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 4px;
}

.timeline-location {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.timeline-location i {
  font-size: 0.7rem;
}

.timeline-date {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 2px;
}

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

.timeline-bullets li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.6;
}

.timeline-bullets strong {
  color: var(--text-primary);
}

/* ========================================
   ACHIEVEMENTS
   ======================================== */
.achievements-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-col-6 {
  grid-column: span 6;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: all 0.3s var(--ease);
  overflow: hidden;
  position: relative;
}

.achievement-card>* {
  position: relative;
  z-index: 1;
}

.achievement-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(231, 76, 60, 0.06), transparent 40%);
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 0;
}

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

.achievement-card:hover {
  border-color: rgba(231, 76, 60, 0.4);
  transform: translateY(-6px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(231, 76, 60, 0.08),
    inset 0 0 60px rgba(231, 76, 60, 0.02);
}

.achievement-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.2rem;
  color: var(--accent);
}

.achievement-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.achievement-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.achievement-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.achievement-card strong {
  color: var(--text-primary);
}

.achievement-card-profile {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-card-header .achievement-icon {
  margin: 0;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.profile-card-title h3 {
  margin-bottom: 4px;
}

.profile-card-title .achievement-badge {
  margin-bottom: 0;
}

.achievement-image-container {
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  flex-grow: 1;
  display: flex;
}

.achievement-img-full {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.achievement-card-profile:hover .achievement-img-full {
  transform: scale(1.04);
}

/* ========================================
   CONTACT
   ======================================== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-link-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.contact-link-item i {
  width: 20px;
  text-align: center;
  color: var(--accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

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

/* hCaptcha widget */
.h-captcha {
  display: flex;
  justify-content: center;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color 0.2s, transform 0.2s;
}

.footer-socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ========================================
   CUSTOM ICONS
   ======================================== */
.icon-leetcode {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url(https://cdn.jsdelivr.net/npm/simple-icons@11.0.0/icons/leetcode.svg) no-repeat center / contain;
  mask: url(https://cdn.jsdelivr.net/npm/simple-icons@11.0.0/icons/leetcode.svg) no-repeat center / contain;
  vertical-align: middle;
}

.icon-codeforces {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url(https://cdn.jsdelivr.net/npm/simple-icons@11.0.0/icons/codeforces.svg) no-repeat center / contain;
  mask: url(https://cdn.jsdelivr.net/npm/simple-icons@11.0.0/icons/codeforces.svg) no-repeat center / contain;
  vertical-align: middle;
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px var(--accent-glow);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #d42815;
  transform: translateY(-4px);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal base */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s var(--ease);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal */
.reveal-stagger {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--ease);
}

.reveal-stagger.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 300px 1fr;
    gap: 40px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .achievements-bento,
  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .bento-col-4,
  .bento-col-5,
  .bento-col-6,
  .bento-col-7,
  .bento-col-8 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 10px;
    width: calc(100% - 24px);
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 4px;
    transition: right 0.4s var(--ease);
    border-left: 1px solid var(--border);
    border-radius: 0;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
  }

  .nav-link::after {
    display: none;
  }

  .section {
    padding: 72px 0;
  }

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .achievements-bento,
  .bento-grid {
    display: flex;
    flex-direction: column;
  }

  .about-image-wrapper {
    max-width: 320px;
    margin: 0 auto;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .timeline {
    padding-left: 32px;
  }

  .timeline::before {
    left: 10px;
  }

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

  .timeline-header {
    flex-direction: column;
    gap: 4px;
  }

  .hero-name {
    letter-spacing: -1px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }

  .project-highlights {
    grid-template-columns: 1fr;
  }

  .project-brief-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .project-modal {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 18px;
  }

  .project-modal-content {
    padding: 32px 24px 28px;
  }

  .project-modal-content .modal-name {
    font-size: 1.35rem;
  }

  .project-modal-content .modal-highlights {
    grid-template-columns: 1fr;
  }

  .deployment-grid {
    grid-template-columns: 1fr;
  }

  .project-features-list {
    grid-template-columns: 1fr;
  }

  .tech-badge-group {
    flex-direction: column;
    gap: 6px;
  }

  .tech-badge-label {
    min-width: unset;
  }

  .arch-node {
    min-width: 90px;
    padding: 10px 12px;
  }

  .arch-node span {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2.4rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 18px;
  }

  .arch-node {
    min-width: 70px;
    padding: 8px 10px;
  }

  .arch-node i {
    font-size: 0.9rem;
  }

  .arch-node span {
    font-size: 0.65rem;
  }

  .arch-node small {
    font-size: 0.6rem;
  }
}