:root {
  --bg: #0a0e17;
  --bg-2: #0f1524;
  --card: #121a2e;
  --border: #1e2a45;
  --text: #d7e2f0;
  --text-dim: #7d8db0;
  --cyan: #00e5ff;
  --purple: #8b5cf6;
  --green: #4ade80;
  --glow-cyan: rgba(0, 229, 255, 0.35);
  --glow-purple: rgba(139, 92, 246, 0.35);
  --mono: "JetBrains Mono", "Fira Code", "Consolas", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 60%, transparent 100%);
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.12) 4px
  );
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 12px var(--glow-cyan);
}

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

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.25s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
}

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

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--green);
  letter-spacing: 0.1em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
}

.hero-inner {
  max-width: 800px;
  text-align: center;
}

.hero-kicker {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
}

.hero-kicker::before {
  content: "// ";
  color: var(--purple);
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  min-height: 1.2em;
  background: linear-gradient(120deg, var(--cyan) 20%, var(--purple) 60%, var(--cyan) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.cursor {
  color: var(--cyan);
  animation: blink 0.8s step-end infinite;
}

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

.hero-sub {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

.highlight {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--glow-cyan);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
}

.btn {
  padding: 12px 28px;
  font-family: var(--mono);
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: linear-gradient(120deg, var(--cyan), var(--purple));
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 0 20px var(--glow-purple);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px var(--glow-cyan);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px var(--glow-cyan);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}

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

.stat-num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 16px var(--glow-cyan);
}

.stat-suffix {
  font-size: 2rem;
  color: var(--cyan);
}

.stat-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

.section {
  padding: 100px 24px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 48px;
  position: relative;
  padding-left: 20px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 28px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px var(--glow-cyan);
}

.hash {
  color: var(--purple);
  margin-right: 8px;
}

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

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity 0.3s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.08);
}

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

.skill-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.skill-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 1.1rem;
}

.skill-head h3 {
  font-size: 1.05rem;
}

.skill-bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.skill-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 10px var(--glow-cyan);
  font-size: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.skill-bar-fill::after {
  content: attr(data-level) "%";
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 0.72rem;
  color: var(--cyan);
}

.skill-desc {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tag {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: all 0.25s;
}

.tag:hover {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 0 0 12px var(--glow-purple);
  transform: translateY(-2px);
}

.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 720px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}

.timeline-dot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  animation: ripple 2s infinite;
}

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  transition: all 0.3s;
}

.timeline-card:hover {
  border-color: var(--purple);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.08);
}

.timeline-date {
  display: inline-block;
  color: var(--cyan);
  font-size: 0.8rem;
  margin-bottom: 8px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.timeline-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.timeline-card p {
  color: var(--text-dim);
  font-size: 0.88rem;
}

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

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.08);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.blog-tag {
  color: var(--purple);
  font-size: 0.75rem;
  padding: 3px 10px;
  border: 1px solid var(--purple);
  border-radius: 4px;
}

.blog-date {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.blog-title {
  font-size: 1.05rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.blog-excerpt {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 18px;
  flex: 1;
}

.blog-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.85rem;
  transition: letter-spacing 0.25s;
}

.blog-link:hover {
  letter-spacing: 0.08em;
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 40px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-label {
  color: var(--purple);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-right: 12px;
}

.footer-contact {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-contact a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.25s;
}

.footer-contact a:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--glow-cyan);
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .nav-links {
    gap: 16px;
  }
  .nav-status {
    display: none;
  }
  .hero-stats {
    gap: 24px;
  }
  .section {
    padding: 70px 16px;
  }
}
