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

:root {
  --bg:        #0a0e17;
  --bg2:       #0d1220;
  --bg3:       #111827;
  --surface:   #131c2e;
  --surface2:  #1a2540;
  --accent:    #00ff88;
  --accent2:   #00c4ff;
  --accent3:   #ff3e6c;
  --text:      #e2e8f0;
  --text-muted:#8a9bbf;
  --border:    rgba(0,255,136,0.15);
  --border2:   rgba(0,196,255,0.12);
  --glow:      0 0 20px rgba(0,255,136,0.25);
  --glow2:     0 0 20px rgba(0,196,255,0.25);
  --radius:    10px;
  --radius-lg: 16px;
  --font-mono: 'Share Tech Mono', monospace;
  --font-main: 'Inter', sans-serif;
  --font-hdr:  'Orbitron', sans-serif;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

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

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

.section-title {
  font-family: var(--font-hdr);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 300px;
}
.section-title-sub { margin-top: 70px; }

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  letter-spacing: 0.03em;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: #00e07a;
  box-shadow: var(--glow);
  color: #000;
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover {
  background: rgba(0,255,136,0.08);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(10,14,23,0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
#navbar.scrolled {
  padding: 12px 40px;
  border-bottom-color: var(--border);
  background: rgba(10,14,23,0.95);
}
.nav-logo {
  font-family: var(--font-hdr);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.08em;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
#matrix-canvas {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1100px;
  width: 100%;
}
.hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.hero-avatar {
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: var(--glow);
  object-fit: cover;
}
.avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(0,255,136,0.35);
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-pre {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.hero-name {
  font-family: var(--font-hdr);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}
.hero-typewriter {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent2);
  margin-bottom: 20px;
  min-height: 1.6em;
}
.cursor {
  animation: blink 0.8s step-end infinite;
  color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

.hero-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-hdr);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease 2s both;
}
.mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.mouse::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-dot 1.5s ease infinite;
}
@keyframes scroll-dot {
  0%,100% { transform: translateX(-50%) translateY(0); opacity:1; }
  60% { transform: translateX(-50%) translateY(12px); opacity:0; }
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.97rem;
}
.about-text p strong { color: var(--text); }
.inline-link { color: var(--accent); border-bottom: 1px solid transparent; }
.inline-link:hover { border-bottom-color: var(--accent); }

.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tag {
  background: rgba(0,255,136,0.07);
  border: 1px solid rgba(0,255,136,0.2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.info-row:last-child { border-bottom: none; }
.info-row i { color: var(--accent); width: 16px; text-align: center; }

.about-links { display: flex; flex-direction: column; gap: 10px; }
.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
  box-shadow: var(--glow);
}
.social-btn i { font-size: 1rem; }
.social-btn.thm:hover { border-color: #ff3e6c; color: #ff3e6c; box-shadow: 0 0 15px rgba(255,62,108,0.2); }
.social-btn.med:hover { border-color: #fff; color: #fff; }
.social-btn.discord:hover { border-color: #5865f2; color: #5865f2; box-shadow: 0 0 15px rgba(88,101,242,0.25); }

/* ===== EXPERIENCE ===== */
#experience { background: var(--bg); }

.timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-dot {
  position: absolute;
  left: -32px; top: 20px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--glow);
  border: 2px solid var(--bg);
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: all var(--transition);
}
.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}
.tcard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tcard-role {
  font-family: var(--font-hdr);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.tcard-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tcard-company i { color: var(--accent); }
.tcard-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent2);
  white-space: nowrap;
  background: rgba(0,196,255,0.08);
  border: 1px solid rgba(0,196,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
}
.badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.badge-remote { background: rgba(0,255,136,0.12); color: var(--accent); border: 1px solid rgba(0,255,136,0.2); }
.badge-hybrid { background: rgba(0,196,255,0.12); color: var(--accent2); border: 1px solid rgba(0,196,255,0.2); }

.tcard-bullets { list-style: none; margin-bottom: 16px; }
.tcard-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.tcard-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.tcard-bullets li strong { color: var(--text); }

.tcard-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-sm {
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.15);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg2); }

.projects-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 7px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}
.filter-btn:hover,
.filter-btn.active {
  background: rgba(0,255,136,0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  flex-direction: column;
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-5px);
}
.project-card.hidden { display: none; }

.project-card.featured {
  border-color: rgba(0,255,136,0.3);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(0,255,136,0.04) 100%);
  grid-column: span 1;
}

.project-card-inner { padding: 26px; display: flex; flex-direction: column; height: 100%; }
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.project-icon {
  font-size: 1.8rem;
  color: var(--accent);
  opacity: 0.8;
}
.project-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 4px;
  transition: color var(--transition);
}
.project-links a:hover { color: var(--accent); }

.project-featured-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  border: 1px solid rgba(0,255,136,0.3);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-name {
  font-family: var(--font-hdr);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.project-sub {
  font-size: 0.78rem;
  color: var(--accent2);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}
.project-desc {
  font-size: 0.87rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 18px;
  line-height: 1.6;
}
.project-tech { display: flex; flex-wrap: wrap; gap: 7px; }
.project-tech span {
  background: rgba(0,196,255,0.08);
  border: 1px solid rgba(0,196,255,0.18);
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 20px;
}

.projects-more { text-align: center; margin-top: 44px; }

/* ===== SKILLS ===== */
#skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(16px);
}
.skill-category.visible { opacity: 1; transform: translateY(0); }
.skill-category:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
}
.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.skill-cat-header i {
  color: var(--accent);
  font-size: 1.2rem;
  width: 22px;
  text-align: center;
}
.skill-cat-header h3 {
  font-family: var(--font-hdr);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pills span {
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.15);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 13px;
  border-radius: 20px;
  cursor: default;
  transition: all var(--transition);
}
.skill-pills span:hover {
  background: rgba(0,255,136,0.12);
  color: var(--accent);
  border-color: rgba(0,255,136,0.3);
}

/* ===== CERTIFICATIONS ===== */
#certifications { background: var(--bg2); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(14px);
}
.cert-card.visible { opacity: 1; transform: translateY(0); }
.cert-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}
.cert-card.highlight {
  border-color: rgba(0,255,136,0.35);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(0,255,136,0.06) 100%);
}
.cert-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.cert-info h3 {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.cert-issuer {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.cert-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent2);
}

/* Achievements */
.achievements-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.achievement-card {
  flex: 1;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(14px);
}
.achievement-card.visible { opacity: 1; transform: translateY(0); }
.achievement-card:hover {
  border-color: var(--accent3);
  box-shadow: 0 0 20px rgba(255,62,108,0.15);
}
.ach-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(255,62,108,0.1);
  border: 1px solid rgba(255,62,108,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent3);
  font-size: 1.4rem;
  flex-shrink: 0;
}
.achievement-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.achievement-card p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== CONTACT ===== */
#contact { background: var(--bg); }

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.7;
}
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text-muted);
  font-size: 0.87rem;
  transition: all var(--transition);
}
.contact-item i {
  color: var(--accent);
  font-size: 1rem;
  width: 18px;
  text-align: center;
}
.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(5px);
  box-shadow: var(--glow);
}
.contact-item.discord-item:hover {
  border-color: #5865f2;
  color: #5865f2;
  box-shadow: 0 0 15px rgba(88,101,242,0.2);
}
.contact-item.discord-item i { color: #5865f2; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: all var(--transition);
  resize: vertical;
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-note {
  text-align: center;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  min-height: 1.2em;
  color: var(--accent);
}
.form-note.error { color: var(--accent3); }

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 50px 24px;
}
.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.footer-name {
  font-family: var(--font-hdr);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 6px;
}
.footer-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 24px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}
.footer-links a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition);
}
.footer-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}
.footer-copy { font-size: 0.75rem; color: var(--text-muted); }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 42px; height: 42px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: var(--glow); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content { flex-direction: column; text-align: center; gap: 36px; }
  .hero-summary { margin: 0 auto 28px; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  section { padding: 70px 0; }
  #navbar { padding: 16px 24px; }
  #navbar.scrolled { padding: 12px 24px; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 70%; max-width: 300px;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.05rem; }
  .nav-toggle { display: flex; z-index: 1000; }

  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .timeline { padding-left: 26px; }
  .tcard-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-avatar { width: 150px; height: 150px; }
  .hero-name { font-size: 2rem; }
  .btn { padding: 10px 20px; font-size: 0.82rem; }
  .achievements-row { flex-direction: column; }
}

/* ===== BOOT LOADER ===== */
#boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  overflow: hidden;
}
#boot-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* matrix canvas behind everything */
#boot-matrix {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  pointer-events: none;
}

.boot-inner {
  position: relative;
  z-index: 1;
  width: min(620px, 90vw);
  font-family: var(--font-mono);
  color: var(--accent);
  text-align: center;
}

/* phases */
.boot-phase { transition: opacity 0.5s ease; }
.boot-phase-hidden { display: none; }

/* Phase 1 — welcome */
.boot-greeting {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 18px;
  min-height: 1.4em;
}

.boot-title {
  font-family: var(--font-hdr);
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 28px;
  letter-spacing: 0.06em;
  min-height: 1.3em;
  /* green text glow */
  text-shadow: 0 0 30px rgba(0,255,136,0.2);
}
.boot-title .boot-accent { color: var(--accent); }

.boot-tagline {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3vw, 1.35rem);
  color: var(--accent);
  letter-spacing: 0.06em;
  min-height: 1.6em;
  text-shadow: 0 0 20px rgba(0,255,136,0.5);
  border-right: 2px solid var(--accent);
  display: inline-block;
  padding-right: 4px;
  animation: caretBlink 0.8s step-end infinite;
  white-space: nowrap;
  overflow: hidden;
}
@keyframes caretBlink { 50% { border-color: transparent; } }

/* divider line between phases */
.boot-divider {
  width: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  margin: 32px auto;
  transition: width 0.8s ease;
}
.boot-divider.full { width: 100%; }

/* Phase 2 — loading */
.boot-logo-sm {
  font-family: var(--font-hdr);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}
.boot-lines {
  min-height: 130px;
  margin-bottom: 18px;
  font-size: 0.75rem;
  line-height: 1.9;
  color: #7effc4;
  text-align: left;
}
.boot-lines .boot-line {
  display: block;
  opacity: 0;
  animation: bootFadeIn 0.15s ease forwards;
}
.boot-lines .boot-ok   { color: var(--accent); }
.boot-lines .boot-warn { color: #ffd700; }
.boot-lines .boot-err  { color: var(--accent3); }
@keyframes bootFadeIn { to { opacity: 1; } }

.boot-bar-wrap {
  height: 3px;
  background: rgba(0,255,136,0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.boot-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.1s linear;
}
.boot-skip {
  font-size: 0.65rem;
  color: rgba(0,255,136,0.35);
  text-align: center;
  letter-spacing: 0.1em;
  margin-top: 22px;
  animation: blink 1.4s step-end infinite;
}

/* ===== CV BUTTON ===== */
.btn-cv {
  background: transparent;
  border: 1.5px solid var(--accent2);
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-cv:hover {
  background: rgba(0,196,255,0.1);
  box-shadow: var(--glow2);
  transform: translateY(-2px);
  color: var(--accent2);
}

/* ===== THM CARD & GITHUB STATS ===== */
.thm-badge-wrap, .gh-graph-wrap {
  margin-top: 28px;
}
.thm-badge-label, .gh-graph-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.thm-badge-label i { color: var(--accent3); }
.gh-graph-label i  { color: var(--text); }

/* THM profile card */
.thm-card {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(255,62,108,0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
}
.thm-card:hover {
  border-color: var(--accent3);
  box-shadow: 0 0 20px rgba(255,62,108,0.2);
  transform: translateY(-2px);
}
.thm-card-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}
.thm-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent3);
  flex-shrink: 0;
  object-fit: cover;
}
.thm-card-right { flex: 1; }
.thm-username {
  font-family: var(--font-hdr);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.thm-platform {
  font-size: 0.75rem;
  color: var(--accent3);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.thm-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.thm-stat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.thm-stat i { color: var(--accent3); font-size: 0.65rem; }
.thm-view-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent3);
  letter-spacing: 0.04em;
}

.gh-graph-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: block;
  transition: all var(--transition);
}
.gh-graph-img:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

@media (max-width: 600px) {
  .gh-stats-grid { grid-template-columns: 1fr; }
  .thm-card-inner { flex-direction: column; text-align: center; }
  .thm-stats-row { justify-content: center; }
}

/* ===== BLOG SECTION ===== */
#blog { background: var(--bg); }

.blog-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
  margin-top: -28px;
}

.blog-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 40px 0;
}
.blog-loading i { color: var(--accent); font-size: 1.1rem; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 36px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(18px);
}
.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.blog-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

.blog-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg3);
  display: block;
}
.blog-card-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--surface2) 0%, rgba(0,255,136,0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(0,255,136,0.2);
}

.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent2);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}
.blog-card-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}
.blog-card-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
  align-self: flex-start;
}
.blog-card-link:hover { gap: 10px; }

.blog-error {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 20px 0;
  text-align: center;
}
.blog-error a { color: var(--accent); }

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

/* ===== GITHUB STATS CARD ===== */
.gh-stats-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  text-decoration: none;
  transition: all var(--transition);
}
.gh-stats-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.gh-stats-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.gh-stats-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.gh-stats-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.gh-stats-handle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
}
.gh-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.gh-stat-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  transition: all var(--transition);
}
.gh-stats-card:hover .gh-stat-item {
  border-color: rgba(0,255,136,0.2);
}
.gh-stat-num {
  display: block;
  font-family: var(--font-hdr);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}
.gh-stat-lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gh-langs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.gh-lang {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 20px;
}
.gh-lang-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gh-stats-cta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  text-align: right;
  letter-spacing: 0.04em;
}

/* ===== CYLAB ACADEMY CARD ===== */
.cylab-card {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(0,196,255,0.2);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  text-decoration: none;
  transition: all var(--transition);
}
.cylab-card:hover {
  border-color: var(--accent2);
  box-shadow: var(--glow2);
  transform: translateY(-2px);
}
.cylab-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,196,255,0.12);
}
.cylab-avatar-circle {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(0,196,255,0.15);
  border: 1px solid rgba(0,196,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hdr);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent2);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.cylab-username {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.cylab-since {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}
.cylab-logo {
  width: 20px; height: 20px;
  margin-left: auto;
  opacity: 0.6;
  flex-shrink: 0;
}

.cylab-challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.cylab-challenge-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-hdr);
  letter-spacing: 0.03em;
}
.cylab-total-num {
  font-family: var(--font-hdr);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.cylab-total-lbl {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.cylab-bar-wrap {
  margin-bottom: 14px;
}
.cylab-bar-fill {
  height: 8px;
  border-radius: 4px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
}
.cylab-bar-easy {
  height: 100%;
  background: #22c55e;
  border-radius: 4px 0 0 4px;
  transition: width 1s ease;
}
.cylab-bar-medium {
  height: 100%;
  background: #eab308;
  border-radius: 0 4px 4px 0;
  transition: width 1s ease;
}

.cylab-breakdown {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}
.cylab-diff {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cylab-diff-num {
  font-family: var(--font-hdr);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.cylab-diff-num.easy   { color: #22c55e; }
.cylab-diff-num.medium { color: #eab308; }
.cylab-diff-num.hard   { color: #ef4444; }

.cylab-diff-bar {
  display: block;
  height: 3px;
  width: 32px;
  border-radius: 2px;
}
.cylab-diff-bar.easy   { background: #22c55e; }
.cylab-diff-bar.medium { background: #eab308; }
.cylab-diff-bar.hard   { background: #ef4444; }

.cylab-diff-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== CYLAB SOCIAL BUTTON ===== */
.social-btn.cylab:hover {
  border-color: #00c4ff;
  color: #00c4ff;
  box-shadow: 0 0 15px rgba(0,196,255,0.2);
}

/* ===== CUSTOM CURSOR ===== */
/* Hide default cursor globally */
*, *::before, *::after { cursor: none !important; }

#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(0,255,136,0.4);
  will-change: transform;
}

#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(0,255,136,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease,
              border-color 0.25s ease, opacity 0.2s ease;
  will-change: transform;
}

/* Crosshair tick marks on the ring */
#cursor-ring::before,
#cursor-ring::after {
  content: '';
  position: absolute;
  background: rgba(0,255,136,0.5);
}
#cursor-ring::before {
  /* horizontal ticks */
  width: 6px; height: 1px;
  top: 50%;
  left: -8px;
  transform: translateY(-50%);
  box-shadow: calc(36px + 2px) 0 0 rgba(0,255,136,0.5);
}
#cursor-ring::after {
  /* vertical ticks */
  width: 1px; height: 6px;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  box-shadow: 0 calc(36px + 2px) 0 rgba(0,255,136,0.5);
}

/* Hover state — expand ring, shrink dot */
body.cursor-hover #cursor-dot {
  width: 4px; height: 4px;
  background: var(--accent2);
  box-shadow: 0 0 10px var(--accent2), 0 0 20px rgba(0,196,255,0.5);
}
body.cursor-hover #cursor-ring {
  width: 52px; height: 52px;
  border-color: rgba(0,196,255,0.7);
}

/* Click state */
body.cursor-click #cursor-dot {
  width: 14px; height: 14px;
  background: var(--accent);
  opacity: 0.6;
}
body.cursor-click #cursor-ring {
  width: 22px; height: 22px;
  border-color: var(--accent);
}

/* Hide on mobile — touch devices don't need it */
@media (hover: none) and (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
  *, *::before, *::after { cursor: auto !important; }
}
