/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --text: #c9d1d9;
  --heading: #e6edf3;
  --accent: #00e6a0;
  --accent-dim: rgba(0, 230, 160, 0.15);
  --font-mono: 'Courier New', Courier, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  text-align: center;
}

.hero__avatar {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 1.5rem;
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--accent);
}

.hero__avatar-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 3rem;
  color: var(--accent);
}

.hero__avatar img + .hero__avatar-placeholder {
  z-index: -1;
}

.hero__name {
  font-family: inherit;
  font-weight: normal;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--heading);
  margin-bottom: 0.25rem;
}

.hero__title {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero__title::before {
  content: '> ';
  opacity: 0.5;
}

.hero__tagline {
  max-width: 700px;
  color: var(--text);
  font-size: 1.05rem;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  display: block;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  color: var(--accent);
  transform: rotate(90deg);
  animation: chevron-pulse 2s ease-in-out infinite;
}

@keyframes chevron-pulse {
  0%, 100% { opacity: 0.3; transform: rotate(90deg) translateX(0); }
  50% { opacity: 1; transform: rotate(90deg) translateX(8px); }
}

/* Sections (shared) */
.section {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section__title {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent-dim);
}

/* About */
.about__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Skills */
.skills__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--heading);
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
}

.skill-badge svg {
  color: var(--accent);
  flex-shrink: 0;
}

.badge-img {
  height: 150px;
  width: auto;
  display: block;
  transition: transform 0.2s;
}

.badge-img:hover {
  transform: scale(1.05);
}

.skill-badge:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* Experience / Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-dim);
}

.timeline__item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transform: translateX(-5px);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline__content h3 {
  font-size: 1.15rem;
  color: var(--heading);
  margin-bottom: 0.25rem;
}

.timeline__company {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.timeline__company a {
  color: white;
  text-decoration: none;
}

.timeline__company a:hover {
  color: white;
  text-decoration: underline;
}

.timeline__content > p:last-of-type {
  font-size: 0.95rem;
  line-height: 1.7;
}

.timeline__sub {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-dim);
}

.timeline__sub-item {
  padding: 0.4rem 0 0.4rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.timeline__sub-item + .timeline__sub-item {
  border-top: 1px solid var(--accent-dim);
}

.timeline__sub-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.timeline__sub-role {
  font-size: 0.9rem;
  color: var(--heading);
}

/* Links */
.links__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  color: var(--heading);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s, transform 0.2s, color 0.3s;
}

.link-btn svg {
  color: var(--accent);
  transition: color 0.3s;
}

.link-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px);
  color: var(--accent);
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 1.5rem 3rem;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.footer::before {
  content: '';
  position: absolute;
  top: 2rem;
  left: 0;
  width: 100%;
  border-top: 1px solid var(--accent-dim);
}

.footer p {
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.6;
  font-family: var(--font-mono);
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger delays for badges and links */
.skill-badge.fade-in,
.link-btn.fade-in {
  transition-delay: calc(var(--i, 0) * 0.05s);
}

/* Responsive */
@media (max-width: 600px) {
  .hero {
    padding: 3rem 1rem;
  }

  .hero__avatar {
    width: 120px;
    height: 120px;
  }

  .hero__avatar-placeholder {
    font-size: 2.5rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .skills__grid {
    gap: 0.5rem;
  }

  .skill-badge {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .links__grid {
    flex-direction: column;
    align-items: stretch;
  }

  .link-btn {
    justify-content: center;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline__item::before {
    left: -1.5rem;
  }
}
