:root {
  --bg: #050505;
  --surface: #121212;
  --surface-alt: #0b0b0b;
  --border: rgba(0,255,136,0.2);
  --border-soft: rgba(0,255,136,0.12);
  --text-primary: #ffffff;
  --text-muted: #b5b5b5;
  --text-dim: #7d7d7d;
  --accent: #00ff88;
  --accent-strong: #00c853;
  --accent-soft: rgba(0,255,136,0.08);
  --accent-highlight: rgba(0,255,136,0.16);
  --blue: #58a6ff;
  --purple: #c18cff;
  --orange: #ffa657;
  --string: #7ee787;
  --keyword: #00ff88;
  --property: #8ce0ff;
  --punct: #9da3b0;
  --code-bg: #080808;
  --shadow: rgba(0,255,136,0.08);
}


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

/* Stops iOS/Android Safari & Chrome from auto-inflating font sizes on rotate.
   Firefox doesn't support either property, so this is scoped with @supports
   to avoid harmless-but-noisy "unknown property" console warnings there. */
@supports (-webkit-text-size-adjust: 100%) {
  html { -webkit-text-size-adjust: 100%; }
}
@supports (text-size-adjust: 100%) {
  html { text-size-adjust: 100%; }
}

body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  background: linear-gradient(180deg, #050505 0%, #0b0b0b 100%);
  color: var(--text-primary);
  font-family: 'Inter', 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@supports (-moz-osx-font-smoothing: grayscale) {
  body { -moz-osx-font-smoothing: grayscale; }
}

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

button, input, textarea {
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

a { -webkit-tap-highlight-color: transparent; }

.max-width {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

@media (min-width: 1440px) {
  .max-width { max-width: 1320px; padding: 0 32px; }
}

@media (max-width: 380px) {
  .max-width { padding: 0 16px; }
}

::selection { background: var(--accent-soft); }

input::placeholder, textarea::placeholder { color: var(--text-dim); }

.dim { color: var(--punct); }
.purple { color: var(--purple); }
.icon-accent { color: var(--accent); }
.icon-accent-blue { color: var(--blue); }
.icon-accent-green { color: var(--string); }
.icon-accent-orange { color: var(--orange); }
.icon-accent-purple { color: var(--purple); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

#top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

/* ---------------- Boot screen ---------------- */
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.7,0,0.3,1);
}
#boot-screen.leaving { opacity: 0; transform: translateY(-16px); pointer-events: none; }

.boot-box { width: 100%; max-width: 420px; font-family: 'JetBrains Mono', monospace; }

.boot-line {
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeInLine 0.35s ease forwards;
}
.boot-line.ok { color: var(--string); }

.boot-progress {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border-soft);
  margin-top: 16px;
}
#boot-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--blue);
  transition: width 0.3s ease;
}

@keyframes fadeInLine {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Cursor spotlight ---------------- */
#cursor-spotlight {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: radial-gradient(500px circle at -400px -400px, rgba(0,255,136,0.07), transparent 70%);
}
@media (max-width: 640px) { #cursor-spotlight { display: none; } }

/* ---------------- Scroll progress ---------------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 2px;
}
#scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  transition: width 0.1s linear;
}

/* ---------------- Navbar ---------------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 49;
  background: rgba(5, 5, 5, 0.74);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
#navbar.scrolled {
  background: rgba(5,5,5,0.96);
  border-bottom: 1px solid rgba(15,157,88,0.16);
}
/* Browsers without backdrop-filter support (older Firefox/Chrome) get a solid navbar instead of a see-through one */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #navbar { background: rgba(10,12,14,0.98); }
  #navbar.scrolled { background: rgba(13,17,23,0.97); }
}

.nav-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease;
}
.logo:hover {
  transform: scale(1.02);
  color: var(--accent);
}
.logo::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 6px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 8px;
  position: relative;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links button {
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  cursor: pointer;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.nav-links button:hover,
.nav-links button.active {
  color: var(--accent);
  border-color: rgba(15,157,88,0.24);
  background: rgba(15,157,88,0.08);
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#theme-toggle {
  display: none;
}

.nav-indicator {
  position: absolute;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0;
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
}

#menu-btn {
  display: flex;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary);
  cursor: pointer;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
#menu-btn:hover {
  transform: scale(1.02);
  background: rgba(15,157,88,0.12);
  border-color: rgba(15,157,88,0.2);
}
@media (min-width: 768px) { #menu-btn { display: none; } }

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  background: rgba(5,5,5,0.98);
  transition: max-height 0.3s ease, padding 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 20px;
}
.mobile-menu.open { max-height: 420px; padding: 12px 20px 18px; }
.mobile-menu button {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  padding: 14px 16px;
  width: 100%;
  font-size: 14px;
  border-radius: 14px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.mobile-menu.open button { opacity: 1; transform: translateX(0); }
.mobile-menu button.active { color: var(--text-primary); background: rgba(255,255,255,0.08); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: calc(100vh - 86px);
  padding: 108px 0 56px;
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, rgba(0,255,136,0.08), transparent 18%),
    radial-gradient(circle at 85% 10%, rgba(0,200,83,0.12), transparent 18%),
    linear-gradient(180deg, #050505 0%, #0b0b0b 100%);
}
@media (min-width: 640px) { .hero { padding: 140px 0 72px; } }
@media (max-height: 640px) and (orientation: landscape) { .hero { min-height: auto; padding: 76px 0 42px; } }

.hero-blobs { position: absolute; inset: 0; top: 0; height: 720px; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 999px; filter: blur(110px); }
.blob-1 { width: 420px; height: 420px; background: var(--blue); opacity: 0.2; top: -60px; left: -80px; animation: blobMove1 14s ease-in-out infinite; }
.blob-2 { width: 380px; height: 380px; background: var(--purple); opacity: 0.15; top: 120px; right: -100px; animation: blobMove2 16s ease-in-out infinite; }

@keyframes blobMove1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.15); } }
@keyframes blobMove2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,30px) scale(1.1); } }

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 42px;
  align-items: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.hero-grid.ready { opacity: 1; transform: translateY(0); }
@media (min-width: 1024px) { .hero-grid { gap: 32px; } }
@media (min-width: 768px) { .hero-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }

.hero-left,
.hero-right {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeSlideIn 0.8s ease forwards;
}
.hero-left { animation-delay: 0.2s; }
.hero-right { animation-delay: 0.35s; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-right {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 13px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.hero-left h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.04em;
  word-break: break-word;
}
@media (max-width: 480px) { .hero-left h1 { font-size: 34px; } }
@media (max-width: 360px) { .hero-left h1 { font-size: 30px; } }
@media (min-width: 640px) { .hero-left h1 { font-size: 48px; } }
@media (min-width: 768px) { .hero-left h1 { font-size: 56px; } }
@media (min-width: 1440px) { .hero-left h1 { font-size: 66px; } }

.role {
  margin-top: 16px;
  font-size: 18px;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}
@media (min-width: 640px) { .role { font-size: 20px; } }

.desc {
  margin-top: 20px;
  max-width: 460px;
  line-height: 1.7;
  font-size: 14px;
  color: var(--text-muted);
}
@media (min-width: 640px) { .desc { font-size: 16px; } }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-buttons .btn { min-width: 170px; }
@media (max-width: 640px) {
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
}
@media (max-width: 380px) {
  .hero-buttons { gap: 10px; }
}
.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.hero-socials .social-link {
  color: var(--text-muted);
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.hero-socials .social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.hero-socials .social-link {
  flex: 1 1 auto;
  min-width: 110px;
  text-align: center;
}

.btn {
  position: relative;
  overflow: hidden;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(0,255,136,0.16);
  color: var(--text-primary);
  background: rgba(0,255,136,0.1);
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(0,255,136,0.18);
  box-shadow: 0 22px 62px rgba(0,255,136,0.16);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, rgba(0,255,136,0.22), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.95);
  z-index: -1;
}
.btn:hover::before {
  opacity: 1;
  transform: scale(1.05);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #050505;
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(0,255,136,0.18);
}
.btn-outline {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  border-color: rgba(0,255,136,0.28);
}
.btn-outline:hover {
  background: rgba(0,255,136,0.1);
}
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.18);
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
@media (max-width: 380px) { .hero-stats { gap: 20px; margin-top: 32px; } }
.stat-value {
  font-size: 26px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}
@media (min-width: 640px) { .stat-value { font-size: 30px; } }
.stat-label { font-size: 13px; margin-top: 4px; color: var(--text-muted); }

.floaty { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }

/* ---------------- Code window ---------------- */
.code-window {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0e14;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.code-glow {
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  z-index: -1;
  opacity: 0.4;
  filter: blur(24px);
  background: linear-gradient(135deg, rgba(0,255,136,0.25), rgba(193,140,255,0.18));
}
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.dot { width: 12px; height: 12px; border-radius: 999px; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.code-filename { margin-left: 12px; font-size: 12px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }

.code-body {
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.9;
  font-family: 'JetBrains Mono', monospace;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
@media (min-width: 640px) { .code-body { font-size: 14px; padding: 24px; } }
@media (max-width: 380px) { .code-body { font-size: 11.5px; padding: 16px; } }

.code-line { white-space: pre; display: flex; width: max-content; min-width: 100%; }
.line-num { user-select: none; padding-right: 16px; min-width: 22px; color: var(--text-dim); }
.tok-keyword { color: var(--keyword); }
.tok-property { color: var(--property); }
.tok-string { color: var(--string); }
.tok-punct { color: var(--punct); }
.tok-base { color: var(--text-primary); }

.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  vertical-align: middle;
  margin-left: 1px;
  background: var(--blue);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  color: var(--text-dim);
}
.scroll-indicator span {
  display: block;
  width: 18px;
  height: 32px;
  border: 1px solid rgba(0,255,136,0.45);
  border-radius: 999px;
  position: relative;
}
.scroll-indicator span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scroll-bounce 1.5s infinite;
}
.scroll-indicator small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}
@keyframes scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------------- Marquee ---------------- */
.marquee-wrap {
  position: relative;
  overflow: hidden;
  padding: 28px 0;
  border-top: 1px solid rgba(15,157,88,0.18);
  border-bottom: 1px solid rgba(15,157,88,0.18);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
}
.marquee-wrap::before, .marquee-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 96px;
  z-index: 2;
  pointer-events: none;
}
.marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  min-width: 200%;
  animation: marquee 18s linear infinite reverse;
  will-change: transform;
}
.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  font-size: 15px;
  white-space: nowrap;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.92;
}
.marquee-item .purple { color: var(--purple); }

@keyframes marquee-dot {
  0% { left: 0%; }
  100% { left: 100%; }
}

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ---------------- Sections ---------------- */
.section {
  padding: 80px 0;
}
@media (min-width: 640px) { .section { padding: 112px 0; } }

.section-heading { margin-bottom: 48px; }
@media (min-width: 640px) { .section-heading { margin-bottom: 64px; } }

.section-heading h2 {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
}
@media (min-width: 640px) { .section-heading h2 { font-size: 36px; } }
@media (min-width: 768px) { .section-heading h2 { font-size: 44px; } }

.section-sub { margin-top: 16px; max-width: 520px; font-size: 15px; line-height: 1.7; color: var(--text-muted); }

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------------- About ---------------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 768px) { .about-grid { grid-template-columns: 3fr 2fr; } }

.about-text p { line-height: 1.7; font-size: 14px; color: var(--text-muted); margin: 0 0 16px; }
@media (min-width: 640px) { .about-text p { font-size: 15px; } }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  border: 1px solid rgba(0,255,136,0.25);
  background: rgba(0,255,136,0.08);
  transition: transform 0.2s ease;
}
.tag:hover { transform: translateY(-2px); }

.project-style,
.project-card,
.about-card,
.timeline-item,
.edu-card,
.contact-form,
.contact-card,
.resume-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(0,255,136,0.14);
  background: rgba(10,10,10,0.80);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 46px rgba(0,255,136,0.08);
  padding: 26px;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.project-style:hover,
.project-card:hover,
.about-card:hover,
.timeline-item:hover,
.edu-card:hover,
.contact-form:hover,
.contact-card:hover,
.resume-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,255,136,0.30);
  box-shadow: 0 26px 72px rgba(0,255,136,0.16);
  background: rgba(10,10,10,0.90);
}

.info-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 14px; color: var(--text-muted); }
.info-row:last-child { margin-bottom: 0; }

/* ---------------- Skills ---------------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px 48px;
}
@media (min-width: 640px) { .skills-grid { grid-template-columns: 1fr 1fr; } }

.skill-group h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: 0.02em;
  font-family: 'JetBrains Mono', monospace;
}

.skill-bar-row { margin-bottom: 20px; }
.skill-bar-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; font-family: 'JetBrains Mono', monospace; }
.skill-bar-top .name { color: var(--text-primary); }
.skill-bar-top .pct { color: var(--text-dim); }

.skill-bar-track { height: 8px; border-radius: 999px; overflow: hidden; background: var(--border-soft); }
.skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  position: relative;
  overflow: hidden;
  transition: width 1.1s cubic-bezier(0.16,1,0.3,1);
}
.skill-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-100%);
}
.skill-bar-fill.animate::after { animation: shimmer 1.8s ease-in-out 0.3s; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------------- Experience timeline ---------------- */
.timeline { position: relative; border-left: 1px solid rgba(255,255,255,0.08); padding-left: 32px; }

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -38px;
  top: 22px;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 4px solid var(--accent);
  animation: floaty 4s ease-in-out infinite;
}

.timeline-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }
.timeline-item h3 { font-size: 18px; font-weight: 700; margin: 0; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
@media (min-width: 640px) { .timeline-item h3 { font-size: 20px; } }
.timeline-org { font-size: 14px; margin: 4px 0 14px; color: var(--accent); }
.timeline-item ul { margin: 0; padding: 0; list-style: none; }
.timeline-item li { font-size: 14px; line-height: 1.75; display: flex; gap: 9px; color: var(--text-muted); margin-bottom: 10px; }
.timeline-item li span { color: var(--text-dim); }

/* ---------------- Projects ---------------- */
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
.project-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(0,255,136,0.14);
  background: rgba(10,10,10,0.80);
  backdrop-filter: blur(16px);
  padding: 28px;
  height: 100%;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,255,136,0.30);
  box-shadow: 0 26px 72px rgba(0,255,136,0.16);
}
.project-card:hover .project-glow {
  opacity: 1;
}
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.project-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card .project-inner { position: relative; z-index: 1; }

.project-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.project-head h3 { font-size: 20px; font-weight: 700; margin: 0; font-family: 'JetBrains Mono', monospace; }
.project-tagline { font-size: 14px; margin-bottom: 16px; font-family: 'JetBrains Mono', monospace; }
.project-desc { font-size: 14px; line-height: 1.7; margin-bottom: 20px; color: var(--text-muted); }

.project-highlights { list-style: none; margin: 0 0 20px; padding: 0; }
.project-highlights li { font-size: 12px; display: flex; gap: 8px; align-items: flex-start; color: var(--text-muted); margin-bottom: 6px; }

.project-stack { display: flex; flex-wrap: wrap; gap: 8px; }

.note { font-size: 12px; margin-top: 24px; color: var(--text-dim); }

/* ---------------- Resume card ---------------- */
.resume-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.9fr 1.1fr;
  gap: 24px;
  border: 1px solid rgba(0,255,136,0.14);
  background: rgba(10,10,10,0.80);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.resume-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,255,136,0.30);
  box-shadow: 0 26px 72px rgba(0,255,136,0.16);
}
.resume-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 25%, rgba(0,255,136,0.08), transparent 18%), radial-gradient(circle at 85% 80%, rgba(0,200,83,0.07), transparent 16%);
  pointer-events: none;
}
.resume-copy,
.resume-preview {
  position: relative;
  z-index: 1;
}
.resume-copy h3 {
  margin: 12px 0 18px;
  font-size: 28px;
  line-height: 1.2;
}
.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}
.resume-preview {
  display: grid;
  align-items: center;
}
.resume-sheet {
  position: relative;
  padding: 28px;
  border-radius: 22px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.resume-chip {
  display: inline-block;
  width: 52px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  margin-bottom: 20px;
}
.resume-line {
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  margin-bottom: 14px;
}
.resume-line.short { width: 42%; }
.resume-line.medium { width: 64%; }

/* ---------------- Education cards ---------------- */
.edu-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .edu-grid { grid-template-columns: 1fr 1fr; } }

.edu-card { display: block; }
.edu-card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.edu-card-title h3 { font-size: 15px; font-weight: 600; margin: 0; font-family: 'JetBrains Mono', monospace; }

.edu-item { margin-bottom: 20px; }
.edu-item:last-child { margin-bottom: 0; }
.edu-item-title { font-size: 14px; font-weight: 600; margin: 0; }
.edu-item-sub { font-size: 14px; margin: 2px 0 0; color: var(--text-muted); }
.edu-item-time { font-size: 12px; margin: 4px 0 0; color: var(--text-dim); }

/* ---------------- Contact ---------------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 3fr 2fr; } }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 640px) { .contact-form { padding: 32px; } }

.contact-card {
  padding: 20px;
}

.field label { font-size: 12px; display: block; margin-bottom: 4px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
  resize: none;
}
/* 16px stops iOS Safari from zooming the whole page in when a field is focused */
.field input:focus, .field textarea:focus { border-color: var(--blue); }

#cf-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #050505;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
#cf-submit:hover { transform: scale(1.01); box-shadow: 0 18px 40px rgba(0,255,136,0.18); }
#cf-submit:active { transform: scale(0.98); }
#cf-submit.sent { background: rgba(0,255,136,0.24); color: var(--text-primary); }

.form-note {
  font-size: 12px;
  text-align: center;
  margin: 0;
  color: var(--text-dim);
  min-height: 18px;
}
.form-note.success { color: var(--accent); }
.form-note.error { color: #ff6b6b; }
.contact-form.shake { animation: shake 0.35s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.contact-side { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
a.contact-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,255,136,0.28);
  box-shadow: 0 28px 60px rgba(0,255,136,0.12);
}
.contact-icon { padding: 10px; border-radius: 12px; display: flex; }
.contact-label { font-size: 12px; margin: 0; color: var(--text-dim); }
.contact-value { font-size: 14px; margin: 2px 0 0; word-break: break-all; }

.hero-left h1 {
  text-shadow: 0 30px 80px rgba(0,255,136,0.06);
}
.hero-right .code-window {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-right .code-window:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 40px 80px rgba(0,255,136,0.18);
}

.contact-side {
  position: relative;
}
.contact-side::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  background: radial-gradient(circle at top right, rgba(0,255,136,0.08), transparent 35%);
  pointer-events: none;
}

@keyframes popInSmooth {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.contact-form.reveal,
.contact-side.reveal {
  animation: popInSmooth 0.7s ease forwards;
}

.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .stat {
  min-width: 140px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(0,255,136,0.14);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.hero-stats .stat:hover {
  transform: translateY(-2px);
  border-color: rgba(0,255,136,0.28);
}
.hero-stats .stat-value { font-size: 28px; }

.social-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.social-btn {
  min-height: 64px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 14px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-primary);
  transition: transform 0.22s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(14px);
}
.social-btn:hover {
  transform: translateY(-4px);
  background: rgba(15,157,88,0.24);
  border-color: rgba(15,157,88,0.45);
  box-shadow: 0 20px 36px rgba(0,255,136,0.18);
}
.social-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}
#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 24px 44px rgba(0,0,0,0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 60;
}
#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--accent-soft);
}

.role-text {
  display: inline-block;
  transition: opacity 0.25s ease;
}
.role-text.fade {
  opacity: 0.2;
}
/* ---------------- Extra-small phones (≤380px) ---------------- */
@media (max-width: 768px) {
  .resume-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-inner { gap: 10px; }
  .hero-buttons { gap: 10px; }
  .hero-socials .social-link { min-width: auto; }
  .hero-socials { gap: 10px; }
  .hero-grid { gap: 32px; }
  .hero-right { max-width: 100%; }
  .project-card { padding: 22px; }
  .resume-card { padding: 24px; }
  .about-card { padding: 22px; }
  .edu-card { padding: 22px; }
  .contact-form { padding: 22px; }
}

@media (max-width: 380px) {
  .section { padding: 56px 0; }
  .section-heading { margin-bottom: 32px; }
  .section-heading h2 { font-size: 26px; }
  .timeline { padding-left: 24px; }
  .timeline-dot { left: -33px; }
  .project-card { padding: 20px; }
  .edu-card { padding: 18px; }
  .contact-form { padding: 18px; }
  .marquee-item { font-size: 13px; }
  .social-row { flex-wrap: wrap; }
  .code-line { font-size: 11px; }
}

/* ---------------- Ultra-wide screens (≥1440px) ---------------- */
@media (min-width: 1440px) {
  .section-heading h2 { font-size: 48px; }
  .code-body { font-size: 15px; }
  .desc { max-width: 500px; }
}

/* ---------------- Landscape phones (short viewport height) ---------------- */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding: 96px 0 48px; }
  #boot-screen .boot-box { max-width: 340px; }
}

/* ---------------- Footer ---------------- */
footer { border-top: 1px solid var(--border); }
.footer-inner {
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; } }
.footer-right { font-family: 'Inter', sans-serif; }
