:root {
  --bg-primary: #07111f;
  --bg-secondary: #0e1a2c;
  --text-primary: #f7f9fc;
  --text-secondary: #a5b2c6;
  --accent-green: #4dd7a1;
  --accent-cyan: #68c7ff;
  --accent-orange: #e2b35d;
  --border-color: rgba(255, 255, 255, 0.1);
  --glow-green: rgba(77, 215, 161, 0.12);
  --glow-cyan: rgba(104, 199, 255, 0.12);
  --transition: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --nav-height: 72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body.menu-open {
  overflow: hidden;
}

#bg-canvas {
  background: radial-gradient(circle at 20% 30%, rgba(77, 215, 161, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(104, 199, 255, 0.06) 0%, transparent 40%);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  background: rgba(7, 17, 31, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: visible;
}

.navbar::before {
  content: '';
  position: absolute;
  inset: -120% -40% 0;
  background: linear-gradient(
    120deg,
    rgba(226, 179, 93, 0.18),
    rgba(104, 199, 255, 0.16),
    rgba(77, 215, 161, 0.14)
  );
  opacity: 0.55;
  transform: translateY(-40%);
  animation: navGlow 10s ease-in-out infinite;
  z-index: 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.brand-btn {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform var(--transition);
}

.brand-btn:hover {
  transform: scale(1.05);
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-cyan));
  color: var(--bg-primary);
  box-shadow: 0 0 15px rgba(226, 179, 93, 0.22);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65), transparent 60%);
  opacity: 0;
  animation: brandPulse 3.8s ease-in-out infinite;
}

.nav-links-desktop {
  display: none;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .nav-links-desktop {
    display: flex;
  }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  position: relative;
  transition: color var(--transition), transform var(--transition);
}

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

.nav-link:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  opacity: 0.8;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(226, 179, 93, 0.1);
  border: 1px solid rgba(226, 179, 93, 0.22);
  cursor: pointer;
  transition: all var(--transition);
}

@media (min-width: 768px) {
  .theme-toggle {
    display: flex;
  }
}

.theme-text {
  font-size: 0.625rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.05em;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Ensure mobile menu button is always visible on small viewports (fix edge cases) */
@media (max-width: 767px) {
  .mobile-menu-btn {
    display: flex !important;
  }

  /* Make chat card less tall on small devices so it doesn't overflow */
  .chat-card {
    height: 60vh;
    bottom: 1rem;
    right: 1rem;
    width: calc(100vw - 2rem);
    max-width: 420px;
  }

  /* Mobile-specific navbar sizing and touch targets */
  :root {
    --nav-height: 64px;
  }

  .nav-container {
    padding: 0.5rem 0.75rem;
  }

  .brand-mark {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .nav-link {
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
  }

  .mobile-nav {
    top: var(--nav-height);
    max-height: calc(100vh - var(--nav-height));
  }
}

/* Stronger override for larger small screens where some user agents may apply different rules */
@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: flex !important;
  }
}

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

.mobile-nav {
  position: fixed;
  top: 4.5rem;
  left: 0;
  right: 0;
  z-index: 110;
  background: rgba(7, 17, 31, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem 1.5rem;
  display: grid;
  gap: 0.75rem;
  max-height: calc(100vh - 4.5rem);
  overflow-y: auto;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav .nav-link {
  font-size: 1rem;
  padding: 0.75rem 0.5rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.mobile-nav .nav-link:hover {
  border-color: rgba(226, 179, 93, 0.25);
  background: rgba(226, 179, 93, 0.08);
}

@media (min-width: 769px) {
  .mobile-nav {
    display: none;
  }
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-height);
}

/* Prevent anchored sections from hiding behind the fixed navbar */
.section {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 2rem;
  position: relative;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 500px;
  height: 500px;
  top: 10%;
  left: 10%;
  background: radial-gradient(circle, var(--glow-green), transparent 70%);
  filter: blur(50px);
}

.hero::after {
  width: 400px;
  height: 400px;
  bottom: 20%;
  right: 5%;
  background: radial-gradient(circle, var(--glow-cyan), transparent 70%);
  filter: blur(50px);
}

.hero-content {
  max-width: 1200px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mono-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-orange) 55%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.typing-role {
  font-size: 1.5rem;
  color: var(--accent-orange);
  min-height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}

.typing-text {
  display: inline-block;
  min-width: 0.5rem;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.5rem;
  background: var(--accent-orange);
  animation: blink 1s infinite;
  margin-left: 0.25rem;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes navGlow {
  0%, 100% {
    transform: translateY(-45%) translateX(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-35%) translateX(8%);
    opacity: 0.7;
  }
}

@keyframes brandPulse {
  0%, 100% {
    opacity: 0;
    transform: scale(0.9);
  }
  45% {
    opacity: 0.45;
  }
  70% {
    opacity: 0;
    transform: scale(1.15);
  }
}

@keyframes navInsightPulse {
  0%, 100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(77, 215, 161, 0.28);
  }
  50% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(77, 215, 161, 0);
  }
}

@keyframes navInsightSweep {
  0% {
    transform: translateX(-65%);
    opacity: 0;
  }
  35% {
    opacity: 0.95;
  }
  70% {
    opacity: 0.5;
  }
  100% {
    transform: translateX(65%);
    opacity: 0;
  }
}

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

@keyframes previewShimmer {
  0%, 100% {
    transform: translateX(-60%);
  }
  50% {
    transform: translateX(60%);
  }
}

@keyframes previewPulse {
  0%, 100% {
    opacity: 0;
    transform: scale(0.98);
  }
  45% {
    opacity: 0.55;
  }
  70% {
    opacity: 0;
    transform: scale(1.05);
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Projects section redesign */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.projects-loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 2.5rem 1rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: linear-gradient(180deg, rgba(10,12,15,0.9), rgba(14,16,18,0.95));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 1.5rem;
  border-radius: 0.75rem;
  align-items: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  transform: translateY(0);
  transition: transform 220ms ease, border-color 220ms ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(226,179,93,0.22);
}

.project-visual {
  min-height: 180px;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  background: linear-gradient(135deg, rgba(26,28,30,0.9), rgba(20,22,24,0.9));
  position: relative;
  padding: 1rem;
  overflow: hidden;
}

.project-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.25), rgba(7, 17, 31, 0.7));
  z-index: 1;
}

.project-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.82;
  z-index: 0;
}

.project-visual .preview-label {
  position: relative;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(104, 199, 255, 0.6);
  background: linear-gradient(120deg, rgba(7, 17, 31, 0.7), rgba(17, 30, 46, 0.85));
  box-shadow: 0 8px 20px rgba(104, 199, 255, 0.18);
  overflow: hidden;
  animation: previewFloat 2.6s ease-in-out infinite;
}

.project-visual .preview-label::before {
  content: '';
  position: absolute;
  inset: -40% -120%;
  background: linear-gradient(90deg, transparent, rgba(104, 199, 255, 0.6), transparent);
  opacity: 0.75;
  transform: translateX(-60%);
  animation: previewShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}

.project-visual .preview-label::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(226, 179, 93, 0.35);
  opacity: 0;
  animation: previewPulse 2.6s ease-in-out infinite;
  pointer-events: none;
}

.project-visual .mock-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  position: relative;
  z-index: 2;
}

.project-content {
  padding: 0.25rem 0.5rem;
}

.project-content .tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.tag-list li {
  list-style: none;
  padding: 0.35rem 0.6rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.project-content h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  margin: 0.25rem 0 0.5rem 0;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
}

.project-link {
  color: var(--accent-orange);
  font-weight: 600;
  text-decoration: none;
}

.featured-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-cyan));
  color: var(--bg-primary);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  box-shadow: 0 6px 18px rgba(226,179,93,0.12);
  z-index: 2;
}

/* Alternate layout for even cards */
.project-card.alt {
  direction: rtl;
  grid-template-columns: 1fr 1fr;
}
.project-card.alt .project-content {
  direction: ltr;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.995);
  transition: opacity 420ms ease, transform 420ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 820px) {
  .project-card,
  .project-card.alt {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .project-visual {
    min-height: 160px;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 420px) {
  .project-visual {
    min-height: 140px;
    padding: 0.75rem;
  }
  .hero {
    padding: 5rem 1rem 1.5rem;
  }
}

.tag {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: rgba(226, 179, 93, 0.06);
  transition: all var(--transition);
}

.tag:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: rgba(226, 179, 93, 0.12);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-primary,
.btn-outline {
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-cyan));
  color: var(--bg-primary);
  box-shadow: 0 8px 24px rgba(226, 179, 93, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(226, 179, 93, 0.3);
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: rgba(226, 179, 93, 0.08);
}

/* Insight Card */
.insight-card {
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.9), rgba(7, 17, 31, 0.92));
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-orange);
  margin-bottom: 0.35rem;
}

.panel-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(77, 215, 161, 0.08);
  border: 1px solid rgba(77, 215, 161, 0.2);
  color: var(--accent-green);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}

.live-pill span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(77, 215, 161, 0.45);
  animation: pulse 1.8s ease-in-out infinite;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  padding: 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(226, 179, 93, 0.35);
  background: rgba(226, 179, 93, 0.08);
}

.kpi-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.kpi-card strong {
  display: block;
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.kpi-note {
  color: var(--accent-cyan);
  font-size: 0.82rem;
}

.chart-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.chart-header,
.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.bar-chart {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 0.65rem;
  margin: 1rem 0 0.75rem;
}

.bar-chart span {
  display: block;
  border-radius: 0.75rem 0.75rem 0.2rem 0.2rem;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-orange));
  box-shadow: 0 10px 30px rgba(104, 199, 255, 0.16);
  height: 0;
  animation: growBar 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  transform-origin: bottom;
}

.bar-chart span:nth-child(1) { animation-delay: 120ms; }
.bar-chart span:nth-child(2) { animation-delay: 220ms; }
.bar-chart span:nth-child(3) { animation-delay: 320ms; }
.bar-chart span:nth-child(4) { animation-delay: 420ms; }
.bar-chart span:nth-child(5) { animation-delay: 520ms; }

@keyframes growBar {
  from { height: 0; opacity: 0.2; }
  to { height: var(--bar-value); opacity: 1; }
}

/* Chat Card */
.chat-shell {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 120;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.75rem;
}

.chat-launcher {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 17, 31, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.chat-launcher::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(104, 199, 255, 0.5);
  box-shadow: 0 0 18px rgba(104, 199, 255, 0.35);
  animation: cipherPulse 3.4s ease-in-out infinite;
}

.chat-launcher:hover {
  box-shadow: 0 14px 34px rgba(104, 199, 255, 0.2);
}

.chat-launcher-tooltip {
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(7, 17, 31, 0.95);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}

.chat-launcher:hover .chat-launcher-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateY(0);
}

.cipher-eyes {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}

.cipher-eye {
  width: 0.5rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--text-primary);
  position: relative;
  overflow: hidden;
  animation: cipherBlink 3.6s infinite;
  transform-origin: center;
}

.cipher-eye::before {
  content: '';
  position: absolute;
  width: 0.26rem;
  height: 0.26rem;
  border-radius: 50%;
  background: var(--bg-primary);
  top: 0.2rem;
  left: 0.12rem;
  animation: cipherLook 9.5s ease-in-out infinite;
}

.cipher-eye:nth-child(2) {
  animation-duration: 4s;
  animation-delay: 0.35s;
}

.cipher-eye:nth-child(2)::before {
  animation-delay: 1.2s;
}

.chat-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background-color: #0d1117 !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px;
  position: fixed !important;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999 !important;
  width: min(380px, calc(100vw - 2rem));
  transform: scale(0.88);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.chat-shell.is-open .chat-card {
  transform: scale(1);
  pointer-events: auto;
  visibility: visible;
}

.chat-shell.is-open .chat-launcher {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.chat-shell:not(.is-open) .chat-card {
  visibility: hidden;
  transform: scale(0.6);
  pointer-events: none;
}

.chat-header {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(226, 179, 93, 0.12);
  align-items: center;
  background-color: #0d1117 !important;
}

.chat-header-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-avatar {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(7, 17, 31, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 12px rgba(104, 199, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

.chat-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--accent-orange);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 6px var(--accent-orange);
}

.chat-status.typing {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 1.2s ease-in-out infinite;
}

.chat-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: #0f1624 !important;
}

.message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.message.bot svg {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: var(--bg-primary);
  margin-top: 0.25rem;
}

.message span {
  font-size: 0.875rem;
  line-height: 1.6;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.message.user span {
  background: rgba(104, 199, 255, 0.1);
  border-color: rgba(104, 199, 255, 0.18);
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem;
  border-top: 1px solid rgba(226, 179, 93, 0.08);
  background-color: #0d1117 !important;
}

.suggestion {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'JetBrains Mono', monospace;
}

.suggestion:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: rgba(226, 179, 93, 0.08);
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(226, 179, 93, 0.08);
  background-color: #0d1117 !important;
}

.chat-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
}

.chat-input input::placeholder {
  color: var(--text-secondary);
}

.chat-input button {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: rgba(226, 179, 93, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.chat-input button:hover {
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-cyan));
}

.chat-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition);
}

.chat-close:hover {
  color: var(--accent-orange);
}

@keyframes cipherBlink {
  0%, 91%, 100% {
    transform: scaleY(1);
  }
  93%, 96% {
    transform: scaleY(0.15);
  }
}

@keyframes cipherLook {
  0%, 30% {
    transform: translate(0, 0);
  }
  40% {
    transform: translate(-2px, -1px);
  }
  55% {
    transform: translate(2px, 0);
  }
  70% {
    transform: translate(0, 1px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes cipherPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.15);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  transition: opacity var(--transition);
  font-size: 0.75rem;
}

.scroll-indicator:hover {
  opacity: 0.7;
}

.scroll-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.dot {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: var(--accent-green);
  animation: scroll-bounce 1.5s infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 2;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-line {
  width: 2rem;
  height: 1px;
  background: var(--accent-orange);
}

.section-line.cyan {
  background: var(--accent-cyan);
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-orange);
}

.section-label.cyan {
  color: var(--accent-cyan);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 3rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.info-card {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: rgba(226, 179, 93, 0.04);
}

.info-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.info-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent-orange);
}

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.location-card,
.status-card {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: rgba(226, 179, 93, 0.04);
}

.location-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(226, 179, 93, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 0.75rem;
}

.location-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.status-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent-green);
  display: inline-block;
  margin-right: 0.5rem;
  box-shadow: 0 0 6px var(--accent-green);
}

.skills-showcase {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: rgba(226, 179, 93, 0.04);
}

.skill-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.skill-percentage {
  font-size: 0.75rem;
  color: var(--accent-orange);
  font-weight: 600;
}

.skill-progress {
  height: 0.25rem;
  background: rgba(226, 179, 93, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-cyan));
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(226, 179, 93, 0.28);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-group {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: rgba(0, 255, 133, 0.01);
  transition: all var(--transition);
}

.skill-group:hover {
  border-color: var(--accent-green);
  background: rgba(0, 255, 133, 0.03);
}

.skill-group h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 1rem;
  margin-top: 0;
}

.skill-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skill-group li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
}

.skill-group li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: bold;
}

/* Experience Section */
.experience-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.experience-card {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: rgba(0, 255, 133, 0.01);
  transition: all var(--transition);
}

.experience-card:hover {
  border-color: var(--accent-green);
  background: rgba(0, 255, 133, 0.03);
  transform: translateX(4px);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.exp-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.exp-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-green);
  white-space: nowrap;
  font-weight: 600;
}

.exp-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* Contact Section */
.contact-section {
  text-align: center;
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-form {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: rgba(16, 26, 44, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.contact-email-error {
  min-height: 1rem;
  color: #ff8c8c;
  font-size: 0.75rem;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-field span {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-field input,
.contact-field textarea {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: rgba(7, 17, 31, 0.75);
  color: var(--text-primary);
  padding: 0.75rem 0.9rem;
  font: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-field textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(104, 199, 255, 0.2);
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.5rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-cyan));
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-status {
  min-height: 1.2rem;
  font-size: 0.85rem;
  margin: 0;
  color: var(--text-secondary);
}

.contact-status.success {
  color: var(--accent-green);
}

.contact-status.error {
  color: #ff8c8c;
  font-weight: 600;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition);
  font-weight: 600;
}

.contact-link:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(0, 255, 133, 0.05);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

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

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

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

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

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

  .hero {
    padding: 5rem 1rem 1rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
  }

  .typing-role {
    font-size: 1.1rem;
    line-height: 1.3;
    min-height: auto;
    flex-wrap: wrap;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.7;
  }

  .contact-content {
    max-width: 100%;
  }

  .contact-form {
    width: 100%;
    padding: 1rem;
  }

  .chat-shell {
    bottom: 1rem;
    right: 1rem;
  }

  .chat-card {
    bottom: 1rem;
    right: 1rem;
  }

  .chat-card {
    height: auto;
    max-height: 70vh;
  }

  .chat-header {
    padding: 1rem;
  }

  .chat-messages {
    max-height: 40vh;
  }

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

  .contact-links {
    flex-direction: column;
    gap: 1rem;
  }

  .contact-link {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .exp-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .bar-chart {
    height: 120px;
  }
}

@media (max-width: 520px) {
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
