:root {
  --bg: #080a0e;
  --bg2: #0d1017;
  --surface: #111520;
  --border: rgba(255, 255, 255, 0.07);
  --accent: #6effa0;
  --accent2: #7b8cff;
  --accent3: #ff6b9d;
  --text: #e8eaf0;
  --muted: #5a6080;

  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

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

@media (hover: none) and (pointer: coarse) {
  * {
    cursor: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

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

/* Typography */
h1,
h2,
h3,
.logo,
.title,
.large-title {
  font-family: var(--font-display);
}

.mono,
.stat-box span,
.t-date,
.t-tags span,
input,
textarea {
  font-family: var(--font-mono);
}

/* Cursor */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease;
}

.cursor.hovered {
  width: 40px;
  height: 40px;
  background: rgba(110, 255, 160, 0.2);
  mix-blend-mode: normal;
  border: 1px solid var(--accent);
}

/* Layout */
.section {
  padding: clamp(60px, 10vw, 120px) clamp(24px, 5vw, 60px);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  overflow: hidden; /* Prevent child overflow from causing horizontal scroll */
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: transparent;
  transition: 0.3s ease transform, 0.2s ease color;
}

.btn.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(110, 255, 160, 0.2);
}

.btn.primary:hover {
  background: #55e088;
  transform: translateY(-2px);
}

.btn.secondary {
  background: rgba(17, 21, 32, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(110, 255, 160, 0.05);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px clamp(24px, 5vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: 0.3s ease;
  background: transparent;
}

nav.scrolled {
  padding: 16px clamp(24px, 5vw, 60px);
  background: rgba(8, 10, 14, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-left {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

#menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
  margin-right: -10px;
}

#menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s ease;
}

#menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

#menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(100px, 15vh, 160px) clamp(24px, 5vw, 60px);
  position: relative;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  z-index: -2;
}

.glow-bg {
  position: absolute;
  top: 50%;
  left: 30%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(110, 255, 160, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
}

.label {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 24px;
}

#hero h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -1px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  text-shadow: 0 0 20px rgba(110, 255, 160, 0.1);
}

.badge-item {
  display: flex;
  align-items: center;
  color: var(--text);
  opacity: 0.85;
  font-size: 1rem;
  transition: 0.3s ease transform, 0.3s ease color;
  cursor: default;
}
.badge-item:hover {
  opacity: 1;
  transform: translateX(8px);
  color: var(--accent);
}

#typewriter {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 40px;
  min-height: 3em;
}

.hero-btns {
  display: flex;
  gap: 16px;
}

/* Hero Code Block */
.hero-code-block {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17, 21, 32, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px;
  width: 420px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0;
  animation: fadeInCode 1s ease forwards 0.3s;
}

.hero-code-block:hover {
  border-color: rgba(110, 255, 160, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(110, 255, 160, 0.15);
  transform: translateY(-52%) scale(1.02);
}

@keyframes fadeInCode {
  from {
    opacity: 0;
    transform: translateY(-40%);
  }

  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

.panel-header {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero-code-block pre {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

#typing-code::after {
  content: "|";
  animation: blink 1s infinite;
  color: var(--accent);
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.keyword {
  color: var(--accent3);
}

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

.property {
  color: var(--accent2);
}

.string {
  color: #f1fa8c;
}

.method {
  color: #8be9fd;
}

/* About */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  transition: 0.3s ease transform;
}

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

.stat-box h3 {
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-box span {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-image {
  position: relative;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  filter: grayscale(20%);
  transition: 0.4s ease;
  display: block;
}

.profile-photo:hover {
  filter: grayscale(0%);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(110, 255, 160, 0.1);
  transform: translateY(-5px);
}

.corner-tag {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-left: 2px solid var(--accent);
}

/* Skills */
.title {
  font-size: 2.5rem;
  margin-bottom: 60px;
  text-align: center;
}

.marquee-wrapper {
  overflow: hidden;
  margin-bottom: 80px;
  position: relative;
}

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
}

.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.marquee {
  display: flex;
  gap: 40px;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  padding: 10px 0;
}

.marquee span:hover {
  color: var(--text);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transition: color 0.2s ease;
}

.row-1 {
  animation: scroll-left 20s linear infinite;
}

.row-2 {
  animation: scroll-right 25s linear infinite;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px;
  transition: 0.3s ease all;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 255, 160, 0.4);
  box-shadow: 0 10px 30px rgba(110, 255, 160, 0.05);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.skill-name {
  color: var(--text);
}

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

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar .fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Experience */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.t-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  transform-origin: top;
  transform: scaleY(0);
}

.timeline.active .t-line {
  transform: scaleY(1);
  transition: transform 1.5s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.t-item {
  position: relative;
  margin-bottom: 60px;
}

.t-dot {
  position: absolute;
  left: -45px;
  top: 0;
  width: 11px;
  height: 11px;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: 0.4s ease;
  box-shadow: 0 0 0 4px rgba(110, 255, 160, 0.05);
}

.t-item.active .t-dot,
.t-item:hover .t-dot {
  background: var(--text);
  box-shadow: 0 0 15px var(--accent), 0 0 0 4px rgba(110, 255, 160, 0.3);
}

.t-content {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px;
  transition: 0.3s ease transform;
}

.t-item:hover .t-content {
  transform: translateX(10px);
  border-color: var(--border);
  background: var(--bg2);
}

.t-date {
  color: var(--accent);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 12px;
}

.t-content h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.t-company {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 20px;
}

.t-content p {
  color: var(--muted);
  margin-bottom: 24px;
}

.t-bullets {
  list-style: none;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.t-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.t-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.t-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.t-tags span {
  padding: 4px 12px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  background: var(--bg);
}

/* Projects */
.p-arch {
  margin-top: 20px;
  padding: 12px;
  background: var(--bg);
  border: 1px dashed rgba(110, 255, 160, 0.3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-align: center;
  transition: 0.3s;
}

.project-card:hover .p-arch {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(110, 255, 160, 0.1);
  background: var(--bg2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

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

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: 0.3s;
  box-shadow: 0 0 15px var(--accent);
}

.project-card:hover {
  background: var(--bg2);
  transform: translateY(-5px);
  border-color: rgba(110, 255, 160, 0.3);
  box-shadow: 0 10px 30px rgba(110, 255, 160, 0.05);
}

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

.project-card.full-width {
  grid-column: 1 / -1;
  flex-direction: row;
}

.p-image {
  background: var(--bg2);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

.project-card.full-width .p-image {
  width: 60%;
  aspect-ratio: auto;
  border-right: 2px solid var(--border);
}

.p-image::before {
  content: '';
  position: absolute;
  inset: 0;
}

.p-image.alpha::before {
  background: radial-gradient(circle, rgba(110, 255, 160, 0.1), transparent);
}

.p-image.beta::before {
  background: radial-gradient(circle, rgba(123, 140, 255, 0.1), transparent);
}

.p-image.gamma::before {
  background: radial-gradient(circle, rgba(255, 107, 157, 0.1), transparent);
}

.p-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.p-info h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.p-info p {
  color: var(--muted);
  margin-bottom: 24px;
  flex: 0 0 auto;
}

.p-bullets {
  list-style: none;
  margin-bottom: 24px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  flex: 1;
}

.p-bullets li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.p-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent2);
}

.p-links {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.p-links a {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-decoration: none;
  transition: 0.3s ease color;
  display: flex;
  align-items: center;
  gap: 8px;
}

.p-links a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.p-links a .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

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

.p-links a:hover .arrow {
  transform: translate(3px, -3px);
}

/* Contact */
.contact-wrap {
  max-width: 600px;
  margin: 0 auto;
}

.large-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  text-align: left;
}

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

input,
textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 16px;
  color: var(--text);
  outline: none;
  transition: 0.3s ease border-color;
}

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

textarea {
  resize: none;
}

#success-msg {
  text-align: center;
  padding: 40px 0;
}

.check {
  width: 60px;
  height: 60px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  background: rgba(110, 255, 160, 0.1);
}

#success-msg h3 {
  color: var(--accent);
  margin-bottom: 10px;
}

#success-msg p {
  color: var(--muted);
}

/* Footer */
footer {
  padding: 40px 60px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg2);
}

.f-left {
  color: var(--muted);
}

.f-right {
  display: flex;
  gap: 24px;
}

.f-right a {
  color: var(--muted);
  text-decoration: none;
  transition: 0.3s;
}

.f-right a:hover {
  color: var(--text);
}

/* Impact Section */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  transition: 0.3s ease all;
  position: relative;
  overflow: hidden;
}

.impact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: 0.3s;
  box-shadow: 0 0 15px var(--accent);
}

.impact-card:hover {
  transform: translateY(-5px);
  border-color: rgba(110, 255, 160, 0.3);
  background: var(--bg2);
}

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

.impact-card h3 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.impact-card p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tech Stack Map */
.tech-map {
  position: relative;
  min-height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(110, 255, 160, 0.05), transparent 60%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.tech-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.tech-lines line {
  stroke: var(--accent);
  stroke-width: 0.2;
  stroke-dasharray: 2;
  opacity: 0.4;
  animation: mapDash 30s linear infinite;
}

@keyframes mapDash {
  to {
    stroke-dashoffset: -100;
  }
}

.tech-center {
  background: var(--surface);
  border: 2px solid var(--accent);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 0 30px rgba(110, 255, 160, 0.2), inset 0 0 20px rgba(110, 255, 160, 0.1);
  z-index: 10;
  position: relative;
  animation: floatCenter 6s ease-in-out infinite;
}

@keyframes floatCenter {
  0% { transform: translateY(0px) scale(1); box-shadow: 0 0 30px rgba(110, 255, 160, 0.2), inset 0 0 20px rgba(110, 255, 160, 0.1); }
  50% { transform: translateY(-10px) scale(1.05); box-shadow: 0 0 50px rgba(110, 255, 160, 0.4), inset 0 0 30px rgba(110, 255, 160, 0.2); }
  100% { transform: translateY(0px) scale(1); box-shadow: 0 0 30px rgba(110, 255, 160, 0.2), inset 0 0 20px rgba(110, 255, 160, 0.1); }
}

.tech-group {
  position: absolute;
  width: 320px;
  background: rgba(17, 21, 32, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: float 7s ease-in-out infinite alternate;
  z-index: 2;
}

.tech-group h4 {
  font-family: var(--font-mono);
  color: var(--accent2);
  margin-bottom: 12px;
  text-align: center;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tech-nodes span {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--muted);
  border-radius: 8px;
  transition: 0.3s;
}

.tech-nodes span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(110, 255, 160, 0.05);
  box-shadow: 0 0 15px rgba(110, 255, 160, 0.15);
  transform: translateY(-2px);
}

.frontend {
  top: 3%;
  left: 2%;
  animation-delay: 0s;
}

.backend {
  top: 3%;
  right: 2%;
  animation-delay: 1s;
}

.db {
  bottom: 3%;
  left: 7%;
  animation-delay: 2s;
}

.cloud {
  bottom: 3%;
  right: 7%;
  animation-delay: 0.5s;
}

.ml {
  top: 34%;
  left: 3%;
  animation-delay: 1.2s;
}

.genai {
  top: 34%;
  right: 3%;
  animation-delay: 1.5s;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Architecture */
.arch-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.arch-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  transition: 0.3s;
}

.arch-box:hover {
  border-color: rgba(123, 140, 255, 0.4);
  box-shadow: 0 0 30px rgba(123, 140, 255, 0.05);
  background: var(--bg2);
}

.arch-box h3 {
  font-size: 1.5rem;
  color: var(--accent2);
  margin-bottom: 12px;
}

.arch-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-node {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 24px;
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  transition: 0.3s;
  position: relative;
}

.flow-node:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.02);
}

.flow-arrow {
  color: var(--muted);
  padding: 8px 0;
  font-size: 1.2rem;
  animation: float 3s infinite;
}

/* GitHub Section */
.github-container {
  max-width: 1000px;
  margin: 0 auto;
}

.github-chart-container {
  width: 100%;
  overflow-x: auto;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 30px 0;
  text-align: center;
}

.github-chart-container img {
  min-width: 700px;
  max-width: 100%;
  filter: invert(1) hue-rotate(90deg) brightness(1.2); /* Make the chart match the theme better */
}

@media (max-width: 768px) {
  .github-chart-container img {
    min-width: 600px;
  }
}

.github-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.g-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px;
  text-align: center;
  border-radius: 8px;
  transition: 0.3s;
}

.g-stat:hover {
  border-color: var(--accent);
  box-shadow: 0 5px 20px rgba(110, 255, 160, 0.05);
  transform: translateY(-5px);
}

.g-stat h3 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.g-stat span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.heatmap-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 8px;
  overflow-x: auto;
}

.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  min-width: 800px;
  margin-bottom: 20px;
}

.heat-cell {
  width: 14px;
  height: 14px;
  background: var(--bg);
  border-radius: 2px;
  transition: 0.2s;
  cursor: pointer;
  position: relative;
}

.heat-cell:hover {
  transform: scale(1.2);
  z-index: 10;
  box-shadow: 0 0 10px var(--accent);
}

.heat-cell[data-level="1"] {
  background: rgba(110, 255, 160, 0.2);
}

.heat-cell[data-level="2"] {
  background: rgba(110, 255, 160, 0.5);
}

.heat-cell[data-level="3"] {
  background: rgba(110, 255, 160, 0.8);
}

.heat-cell[data-level="4"] {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.legend-scale {
  display: flex;
  gap: 4px;
}

.legend-scale span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-scale .l-1 {
  background: rgba(110, 255, 160, 0.2);
}

.legend-scale .l-2 {
  background: rgba(110, 255, 160, 0.5);
}

.legend-scale .l-3 {
  background: rgba(110, 255, 160, 0.8);
}

.legend-scale .l-4 {
  background: var(--accent);
}

/* Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-code-block {
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    width: 100%;
    margin-top: 40px;
    opacity: 1;
    animation: none;
  }

  @keyframes fadeInCode {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  #hero {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  #menu-toggle {
    display: flex;
    position: relative;
    z-index: 1100; /* Ensure it's above .nav-links */
  }

  .nav-right {
    z-index: 1100;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transition: 0.5s cubic-bezier(0.8, 0, 0.2, 1);
    z-index: 1000;
  }

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

  .nav-links a {
    font-size: 2rem;
    font-family: var(--font-display);
    font-weight: 700;
  }

  .nav-right .btn {
    display: none; /* Hide 'Let's Talk' button on mobile to save space, or move to menu */
  }

  .tech-map {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: auto;
    padding: 20px;
    background: none;
    border: none;
  }

  .tech-center {
    width: 140px;
    height: 140px;
    margin: 0 auto 30px;
    animation: none;
  }

  .tech-group {
    position: static;
    width: 100%;
    max-width: 100%;
    animation: none;
    transform: none !important;
  }

  .tech-lines {
    display: none;
  }

  .two-col {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .impact-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 40px 24px;
  }

  .t-content {
    padding: 20px;
  }

  .contact-card {
    padding: 24px;
  }

  .impact-card {
    padding: 30px 15px;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 2.2rem;
  }

  .large-title {
    font-size: 2.2rem;
  }

  .stat-box h3 {
    font-size: 2rem;
  }

  .impact-card h3 {
    font-size: 2.5rem;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .hero-btns .btn {
    width: 100%;
    text-align: center;
  }
}