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

:root {
  --bg:         #060606;
  --bg-alt:     #0c0c0c;
  --surface:    #111111;
  --surface-2:  #1a1a1a;
  --border:     #282828;
  --accent:     #f0f0f0;
  --accent-2:   #c0c0c0;
  --accent-3:   #888888;
  --purple:     #e8e8e8;
  --orange:     #aaaaaa;
  --text:       #f0f0f0;
  --text-muted: #909090;
  --text-dim:   #555555;
  --font-mono:  'JetBrains Mono', monospace;
  --font-sans:  'Inter', system-ui, sans-serif;
  --nav-height: 64px;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 8px 32px rgba(0,0,0,0.7);
  --glow:       0 0 20px rgba(255,255,255,0.10);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

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

::selection { background: rgba(255,255,255,.2); color: var(--text); }

/* ============================================
   CANVAS BACKGROUND
   ============================================ */
#bg-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 clamp(1rem, 5vw, 3rem);
  background: rgba(6,6,6,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

.navbar.scrolled { border-color: var(--border); }

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}
.nav-prefix { color: var(--accent-2); }
.nav-name   { color: var(--text); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  justify-self: end;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 4rem;
  overflow: hidden;
}

/* -------  Custom Magnetic Cursor  ------- */
@media (pointer: fine) {
  *,
  *::before,
  *::after { cursor: none !important; }
}
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.2s;
  will-change: left, top;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
  opacity: 0.6;
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s, opacity 0.2s;
  will-change: left, top;
}
.cursor-ring.is-hovered {
  width: 52px; height: 52px;
  border-color: var(--purple);
  opacity: 1;
}
.cursor-ring.is-clicked {
  width: 16px; height: 16px;
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  max-width: 700px;
}

.hero-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}
.hero-avatar {
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: var(--glow);
}
.avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.2);
  animation: spin 12s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: .95rem;
  letter-spacing: .12em;
  margin-bottom: .5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-typing-wrap {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--accent-3);
  margin-bottom: 1.2rem;
  min-height: 2rem;
}
.typing-prefix { color: var(--text-muted); }
.cursor {
  animation: blink .7s step-end infinite;
  color: var(--accent-2);
}
@keyframes blink { 50% { opacity: 0; } }

/* Terminal Block (K) */
.terminal-block {
  background: rgba(8,8,8,0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  max-width: 500px;
  margin: 0 auto 1.8rem;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.7);
  text-align: left;
}
.t-bar {
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.t-dot--red    { background: #ff5f57; }
.t-dot--yellow { background: #febc2e; }
.t-dot--green  { background: #28c840; }
.t-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 auto;
}
.terminal-body {
  padding: 0.9rem 1.2rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 120px;
  line-height: 1.85;
  display: flex;
  flex-direction: column;
}
.t-line   { display: block; white-space: pre; }
.t-prompt { color: #6ee7b7; }
.t-output { color: var(--text-muted); padding-left: 1rem; }
.t-caret {
  display: inline-block;
  width: 7px; height: 0.9em;
  background: var(--accent);
  animation: blink .7s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}
.star { animation: pulse 2s ease-in-out infinite; display: inline-block; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: .25s;
  border: 2px solid transparent;
}
.btn-primary {
  background: #ffffff;
  color: #060606;
  box-shadow: 0 0 16px rgba(255,255,255,.18);
}
.btn-primary:hover {
  background: #e0e0e0;
  color: #060606;
  box-shadow: 0 0 24px rgba(255,255,255,.30);
  transform: translateY(-2px);
}
.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline:hover {
  background: rgba(255,255,255,.07);
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.hero-badges {
  margin-top: .5rem;
}
.hero-badges img { display: inline-block; }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-indicator span {
  display: block;
  width: 20px; height: 32px;
  border: 2px solid var(--text-dim);
  border-radius: 10px;
  position: relative;
}
.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce { 0%,100% { transform: translateX(-50%) translateY(0); opacity:1; } 80% { transform: translateX(-50%) translateY(10px); opacity:0; } }

/* ============================================
   SECTIONS
   ============================================ */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem clamp(1rem, 5vw, 2rem);
}
.section-alt {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.container { max-width: 1100px; margin: 0 auto; will-change: transform; }

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.section-title::after {
  content: '';
  flex: 1;
  max-width: 300px;
  height: 1px;
  background: var(--border);
  margin-left: .5rem;
}
.section-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: .9em;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-text strong { color: var(--text); }
.about-text em { color: var(--accent-2); font-style: normal; }

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.about-list li {
  color: var(--text-muted);
  font-size: .95rem;
  padding-left: .5rem;
  border-left: 2px solid var(--accent);
  transition: border-color .2s, color .2s;
}
.about-list li:hover { color: var(--text); border-color: var(--accent-2); }

.about-meta { font-size: .9rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: .5rem; }
.about-meta a { color: var(--accent-2); }

.about-banners {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.banner-img {
  border-radius: var(--radius-sm);
  width: 100%;
}
.stats-card { border-radius: var(--radius-sm); }

/* ============================================
   TECH STACK
   ============================================ */
.stack-group { margin-bottom: 2.5rem; }
.stack-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}
.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.badge-grid img {
  height: 28px;
  transition: transform .2s, filter .2s;
  cursor: default;
}
.badge-grid img:hover { transform: translateY(-3px) scale(1.05); filter: brightness(1.15); }

.trophy-wrap { margin-top: 1rem; text-align: center; }
.trophy-img { max-width: 100%; border-radius: var(--radius-sm); margin-top: .75rem; }

/* ============================================
   STATS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.stats-card-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1rem .8rem;
  transition: transform .25s, box-shadow .25s;
  min-height: 230px;
}
.stats-card-wrap:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--glow);
}
.stats-card-wrap:last-child {
  grid-column: 1 / -1;
}
.stats-card-title {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.stats-error { opacity: .4; }
.stats-error::after {
  content: 'Temporarily unavailable';
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .8rem;
  padding: .5rem;
}
.stats-img { width: 100%; border-radius: var(--radius-sm); display: block; height: 175px; object-fit: contain; }
.stats-img-wide { width: 100%; }

/* ============================================
   REPOSITORIES
   ============================================ */
.repos-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.repos-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.repos-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.repos-search-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .35rem .9rem;
  flex: 1;
  max-width: 280px;
  color: var(--text-dim);
  transition: border-color .25s, color .25s;
}
.repos-search-wrap:focus-within {
  border-color: var(--accent);
  color: var(--accent-3);
}
.repos-search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .8rem;
  width: 100%;
}
.repos-search-wrap input::placeholder { color: var(--text-dim); }
.repos-sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .8rem;
  padding: .35rem 2.2rem .35rem 1rem;
  cursor: pointer;
  transition: border-color .25s, color .25s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  outline: none;
}
.repos-sort-select:hover,
.repos-sort-select:focus {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn {
  padding: .4rem 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .8rem;
  cursor: pointer;
  transition: .25s;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(255,255,255,.10);
  border-color: var(--accent);
  color: var(--accent);
}

.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  min-height: 200px;
}

.repos-loading {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  padding: 3rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.repo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
  overflow: hidden;
}
.repo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.7), rgba(180,180,180,0.35));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
  z-index: 1;
}
.repo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow), var(--glow);
  border-color: var(--accent);
}
.repo-card:hover::before { transform: scaleX(1); }

/* Repo card body */
.repo-body {
  padding: .85rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}
.repo-header-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.repo-icon-svg { color: var(--text-dim); flex-shrink: 0; }
.repo-open-btn {
  margin-left: auto;
  color: var(--text-dim);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .2s, color .2s;
}
.repo-card:hover .repo-open-btn { opacity: 1; color: var(--accent); }

.repo-name {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.repo-name:hover { color: var(--accent-2); text-decoration: underline; }

.repo-desc {
  color: var(--text-muted);
  font-size: .855rem;
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-topics {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.repo-footer {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: auto;
  padding-top: .4rem;
  border-top: 1px solid var(--border);
}
.repo-lang {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.lang-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.repo-stat { display: flex; align-items: center; gap: .3rem; }
.repo-updated { margin-left: auto; }
.repo-topic {
  background: rgba(255,255,255,.06);
  color: var(--accent);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: .15rem .7rem;
  font-size: .72rem;
  font-family: var(--font-mono);
}

.repos-cta { text-align: center; margin-top: 2.5rem; }

/* ============================================
   CONTACT
   ============================================ */
.contact-wrap { text-align: center; }
.contact-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  color: var(--text-muted);
  min-width: 130px;
  transition: .3s;
}
.contact-card:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}
.contact-card span { font-family: var(--font-mono); font-size: .85rem; }
.contact-card svg { transition: transform .3s; }
.contact-card:hover svg { transform: scale(1.15); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .85rem;
}
.footer a { color: var(--accent-2); }
.footer-sub { margin-top: .4rem; font-family: var(--font-mono); color: var(--text-dim); }

/* ============================================
   REVEAL ANIMATIONS (G — clip-path wipe)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  clip-path: inset(0 0 20px 0);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.16,1,0.3,1), clip-path 0.65s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
}

/* ============================================
   TIMELINE SECTION (A)
   ============================================ */
.timeline {
  position: relative;
  padding: 0.5rem 0 0.5rem 2.5rem;
  max-width: 700px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
}
.tl-item {
  position: relative;
  padding: 0.3rem 0 2rem 1.5rem;
}
.tl-dot {
  position: absolute;
  left: -2.5rem; top: 0.45rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: var(--bg);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.tl-item:hover .tl-dot,
.tl-active .tl-dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(240,240,240,0.1);
}
.tl-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.tl-active .tl-year::after {
  content: ' — now';
  color: #6ee7b7;
}
.tl-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.tl-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.tl-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.3);
  transition: text-decoration-color 0.2s;
}
.tl-content a:hover { text-decoration-color: var(--accent); }

/* ============================================
   CURRENTLY BUILDING SECTION (B)
   ============================================ */
.now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.now-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s;
}
.now-card:hover {
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-4px);
}
.now-pulse {
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #28c840;
}
.now-pulse::before {
  content: '';
  position: absolute;
  inset: -4px; border-radius: 50%;
  background: rgba(40,200,64,0.4);
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}
.now-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.8rem;
  display: inline-block;
}
.now-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.now-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.1rem;
}
.btn--sm { font-size: 0.78rem; padding: 0.4rem 0.9rem; }

/* ============================================
   LANGUAGE COLORS
   ============================================ */
.lang-Python      { background: #3572A5; }
.lang-Java        { background: #b07219; }
.lang-C           { background: #555599; }
.lang-JavaScript  { background: #f1e05a; }
.lang-TypeScript  { background: #2b7489; }
.lang-HTML        { background: #e34c26; }
.lang-CSS         { background: #563d7c; }
.lang-default     { background: var(--text-dim); }

/* ============================================
   GRAIN OVERLAY
   ============================================ */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%; height: 200%;
  z-index: 9996;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: grain-shift 0.45s steps(1) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(  0%,  0%); }
  10%  { transform: translate( -4%, -5%); }
  20%  { transform: translate( -8%,  4%); }
  30%  { transform: translate(  4%, -8%); }
  40%  { transform: translate( -4%, 12%); }
  50%  { transform: translate( -8%,  4%); }
  60%  { transform: translate( 12%,  0%); }
  70%  { transform: translate(  0%,  8%); }
  80%  { transform: translate(-12%,  0%); }
  90%  { transform: translate(  8%,  4%); }
}

/* ============================================
   GLITCH NAME EFFECT
   ============================================ */
.glitch-text {
  position: relative;
  display: inline-block;
  color: #ffffff;
  /* Stacked shadows create a 3-D depth illusion */
  text-shadow:
    1px 1px 0 rgba(255,255,255,.55),
    2px 2px 0 rgba(180,180,180,.40),
    3px 3px 0 rgba(120,120,120,.30),
    4px 4px 0 rgba(70,70,70,.20),
    0 0 38px rgba(255,255,255,.18);
}
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  text-shadow: none;
}
.glitch-text::before {
  color: rgba(255,255,255,.80);
  animation: glitch-a 4s infinite;
}
.glitch-text::after {
  color: rgba(200,200,200,.65);
  animation: glitch-b 4s 0.15s infinite;
}
@keyframes glitch-a {
  0%,54%,100% { clip-path: inset(50% 0 50% 0); transform: translate(0); opacity: 0; }
  56% { clip-path: inset( 5% 0 80% 0); transform: translate(-5px, 1px); opacity: 1; }
  58% { clip-path: inset(45% 0 25% 0); transform: translate( 4px,-1px); opacity: 1; }
  60% { clip-path: inset(70% 0  8% 0); transform: translate(-3px, 2px); opacity: 1; }
  62% { clip-path: inset(20% 0 60% 0); transform: translate( 5px,-2px); opacity: 1; }
  64% { clip-path: inset(60% 0 15% 0); transform: translate(-4px, 1px); opacity: 1; }
  66% { clip-path: inset(35% 0 40% 0); transform: translate( 2px, 0px); opacity: 1; }
  68% { clip-path: inset(80% 0  5% 0); transform: translate(-2px,-1px); opacity: 1; }
  70% { clip-path: inset(10% 0 70% 0); transform: translate( 3px, 1px); opacity: 1; }
  72%,100% { clip-path: inset(50% 0 50% 0); transform: translate(0); opacity: 0; }
}
@keyframes glitch-b {
  0%,58%,100% { clip-path: inset(50% 0 50% 0); transform: translate(0); opacity: 0; }
  60% { clip-path: inset(15% 0 65% 0); transform: translate( 6px,-1px); opacity: 1; }
  62% { clip-path: inset(55% 0 18% 0); transform: translate(-6px, 2px); opacity: 1; }
  64% { clip-path: inset( 8% 0 75% 0); transform: translate( 4px,-2px); opacity: 1; }
  66% { clip-path: inset(65% 0 12% 0); transform: translate(-4px, 1px); opacity: 1; }
  68% { clip-path: inset(35% 0 35% 0); transform: translate( 3px, 0px); opacity: 1; }
  70% { clip-path: inset(78% 0  3% 0); transform: translate(-3px,-1px); opacity: 1; }
  72% { clip-path: inset(25% 0 55% 0); transform: translate( 2px, 2px); opacity: 1; }
  74% { clip-path: inset(50% 0 20% 0); transform: translate(-2px,-2px); opacity: 1; }
  76%,100% { clip-path: inset(50% 0 50% 0); transform: translate(0); opacity: 0; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: rgba(6,6,6,.97);
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-120%);
    transition: transform .35s;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); }
  .hamburger { display: flex; }

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

  .stats-grid { grid-template-columns: 1fr; }
  .stats-card-wrap:last-child { grid-column: auto; }

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

  .timeline { padding-left: 1.8rem; }
  .tl-dot   { left: -1.8rem; }

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

  .terminal-block { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; max-width: 260px; }
}
