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

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2333;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-glow: rgba(88, 166, 255, 0.15);
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* ==================== LAYOUT ==================== */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* ==================== HERO ==================== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
  padding-bottom: 40px;
}

.hero-label {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

#hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#hero h2 {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 48px;
}

/* Terminal */
.terminal {
  width: 100%;
  max-width: 620px;
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

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

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--green); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  min-height: 180px;
  color: var(--text);
}

.terminal-body .prompt {
  color: var(--green);
}

.terminal-body .command {
  color: var(--text);
}

.terminal-body .output {
  color: var(--text-muted);
}

.terminal-body .success {
  color: var(--green);
}

.terminal-body .cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

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

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  animation: bounce 2s ease-in-out infinite;
  color: var(--text-muted);
  font-size: 1.5rem;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ==================== PROJECTS ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.card-header {
  margin-bottom: 16px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge.open-source {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.badge.in-dev {
  background: rgba(210, 153, 34, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.badge.personal {
  background: rgba(188, 140, 255, 0.15);
  color: var(--purple);
  border: 1px solid rgba(188, 140, 255, 0.3);
}

.project-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.project-tagline {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.project-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-stats span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ==================== SKILLS ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s;
}

.skill-group:hover {
  border-color: var(--accent);
}

.skill-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  position: relative;
  padding-left: 16px;
}

.skill-group li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--border);
  font-weight: 700;
}

/* ==================== HIRE ME ==================== */
#hire {
  text-align: center;
}

.hire-intro {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: left;
}

.hire-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.2s;
}

.hire-card:hover {
  border-color: var(--accent);
}

.hire-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hire-rate {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.hire-rate span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.hire-entity {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.hire-card ul {
  list-style: none;
}

.hire-card li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3px 0;
  padding-left: 20px;
  position: relative;
}

.hire-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 0.8rem;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 40px;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ==================== SCROLL ANIMATIONS ==================== */
.project-card,
.skill-group,
.hire-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s, box-shadow 0.2s;
}

.project-card.visible,
.skill-group.visible,
.hire-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== NAV ==================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s, border-bottom 0.3s, backdrop-filter 0.3s;
}

#navbar.scrolled {
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-brand {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-brand:hover { opacity: 1; }

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

.nav-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

/* ==================== HERO STATS ==================== */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

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

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ==================== TICKER ==================== */
.ticker-wrap {
  width: 100%;
  background: rgba(88, 166, 255, 0.06);
  border-top: 1px solid rgba(88, 166, 255, 0.15);
  border-bottom: 1px solid rgba(88, 166, 255, 0.15);
  overflow: hidden;
  padding: 10px 0;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

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

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.ticker-sep {
  color: var(--border);
}

.ticker-dot {
  color: var(--green);
  font-size: 0.6rem;
  animation: pulse 2s ease-in-out infinite;
}

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

/* ==================== NEW BADGES ==================== */
.badge.flagship {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, 0.4);
}

.badge.active-sprint {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

/* ==================== ABOUT ==================== */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-aside {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-aside-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.aside-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.aside-value.available {
  color: var(--green);
}

.aside-value.available::before {
  content: '● ';
  font-size: 0.6rem;
}

.about-links {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.about-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.about-links a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ==================== EXPERIENCE ==================== */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.exp-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.exp-item:last-child {
  border-bottom: none;
}

.exp-left {
  padding-top: 4px;
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.exp-right h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.exp-right p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exp-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  section {
    padding: 72px 20px;
  }

  .terminal {
    max-width: 100%;
  }

  .terminal-body {
    font-size: 0.75rem;
    padding: 16px;
    min-height: 160px;
  }

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

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

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

  .about-aside {
    order: -1;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

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

  .terminal-body {
    font-size: 0.7rem;
  }

  .nav-links {
    display: none;
  }
}
