:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent: #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.1);
  --border: #2a2a2a;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.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-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
}

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

.hero-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  max-width: 540px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-outline {
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-dim);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent-dim);
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
}

/* About */
.about-content {
  max-width: 640px;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s;
}

.project-links a:hover {
  color: var(--accent);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

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

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
}

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

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

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2.35rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.timeline-role {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-company {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.timeline-period {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.timeline-highlights {
  color: var(--text-secondary);
  font-size: 0.9rem;
  list-style: none;
  padding: 0;
}

.timeline-highlights li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.timeline-highlights li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Uses page */
.hero-short {
  min-height: auto;
  padding: 8rem 0 3rem;
}

.uses-list {
  list-style: none;
  padding: 0;
  max-width: 640px;
}

.uses-list li {
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.uses-list li:last-child {
  border-bottom: none;
}

.uses-list li strong {
  color: var(--text-primary);
}

/* Contact */
#contact {
  text-align: center;
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--accent);
}

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

/* Animations */

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children (skill tags, project cards) */
.reveal-stagger .skill-tag,
.reveal-stagger .project-card,
.reveal-stagger .timeline-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal-stagger.visible .skill-tag,
.reveal-stagger.visible .project-card,
.reveal-stagger.visible .timeline-item {
  opacity: 1;
  transform: translateY(0);
}

/* Hero entrance */
.hero-greeting,
.hero-name,
.hero-tagline,
.hero-sub,
.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-in 0.6s ease forwards;
}

.hero-greeting { animation-delay: 0.1s; }
.hero-name { animation-delay: 0.3s; }
.hero-tagline { animation-delay: 0.5s; }
.hero-sub { animation-delay: 0.7s; }
.hero-cta { animation-delay: 0.9s; }

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing cursor on tagline */
.hero-tagline {
  border-right: 2px solid var(--accent);
  animation: hero-fade-in 0.6s ease forwards, blink-cursor 0.8s step-end infinite;
  animation-delay: 0.5s, 1.1s;
  width: fit-content;
  padding-right: 4px;
}

.hero-tagline.typed {
  border-right-color: transparent;
  animation: hero-fade-in 0.6s ease forwards;
}

@keyframes blink-cursor {
  50% { border-right-color: transparent; }
}

/* Project card enhanced hover */
.project-card {
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(100, 255, 218, 0.08);
}

/* Skill tag hover */
.skill-tag {
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

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

/* Timeline marker pulse */
.timeline-item.visible .timeline-marker {
  animation: pulse-dot 0.6s ease;
}

@keyframes pulse-dot {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.4); }
  100% { transform: scale(1); opacity: 1; }
}

/* Active nav link */
.nav-links a.active {
  color: var(--accent);
}

/* Social link hover */
.social-links a {
  transition: color 0.2s, transform 0.2s;
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* Button hover enhance */
.btn {
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(100, 255, 218, 0.15);
}

/* Section title underline animate */
.reveal .section-title::after {
  width: 0;
  transition: width 0.5s ease 0.3s;
}

.reveal.visible .section-title::after {
  width: 60px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.95);
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .section {
    padding: 4rem 0;
  }
}
