:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: rgba(20, 20, 35, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.06);
  --text-primary: #e8e8ed;
  --text-secondary: #9898a8;
  --text-muted: #686878;
  --accent: #5b8c2a;
  --accent-light: #7ec93e;
  --accent-dark: #3d6b1e;
  --gradient-1: linear-gradient(135deg, #5b8c2a, #7ec93e);
  --gradient-2: linear-gradient(135deg, #5865F2, #9b59b6);
  --gradient-3: linear-gradient(135deg, #f12711, #f5af19);
  --gradient-4: linear-gradient(135deg, #2ecc71, #3498db);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1200px;
  --nav-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent-light);
  border-radius: 50%;
  opacity: 0;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-10vh) scale(1.5);
    opacity: 0;
  }
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  transition: var(--transition);
}

.nav-logo:hover {
  color: var(--accent-light);
}

.logo-bracket {
  color: var(--accent-light);
}

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

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px 24px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(91, 140, 42, 0.1);
  border: 1px solid rgba(91, 140, 42, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  margin-bottom: 20px;
}

.greeting {
  display: block;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 8px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.name {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.name-gradient {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cursor {
  color: var(--accent-light);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 36px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.stat-card {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-plus {
  font-size: 1.2rem;
  color: var(--accent-light);
  font-weight: 600;
}

.stat-label {
  display: block;
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: -4px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.5s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91, 140, 42, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(91, 140, 42, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  border-color: var(--accent-light);
  background: rgba(91, 140, 42, 0.05);
  color: var(--accent-light);
}

.hero-visual {
  flex: 0 0 420px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-card {
  background: rgba(15, 15, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.card-dot.red { background: #ff5f56; }
.card-dot.yellow { background: #ffbd2e; }
.card-dot.green { background: #27c93f; }

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

.hero-card-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
}

.terminal-prompt {
  color: var(--accent-light);
  font-weight: 600;
}

.terminal-cmd {
  color: var(--text-primary);
}

.terminal-output {
  color: var(--text-secondary);
  padding-left: 12px;
  margin-bottom: 2px;
}

.terminal-cursor {
  color: var(--accent-light);
  animation: blink 1s step-end infinite;
}

section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}

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

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-light);
  display: block;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.glass {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.about-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
  opacity: 0;
  transition: var(--transition);
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 140, 42, 0.3);
  box-shadow: var(--shadow-md);
}

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

.about-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 140, 42, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  margin-bottom: 20px;
  transition: var(--transition);
}

.about-card:hover .about-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.about-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.about-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 30px;
}

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

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

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

.timeline-dot {
  position: absolute;
  left: -35px;
  top: 24px;
  width: 12px;
  height: 12px;
  background: var(--accent-light);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(91, 140, 42, 0.2);
  z-index: 2;
}

.timeline-content {
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: rgba(91, 140, 42, 0.3);
  transform: translateX(4px);
}

.timeline-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  background: rgba(91, 140, 42, 0.1);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 0.9rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 10px;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.timeline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  padding: 6px 14px;
  background: rgba(91, 140, 42, 0.08);
  border-radius: 6px;
  transition: var(--transition);
}

.timeline-link:hover {
  background: rgba(91, 140, 42, 0.15);
}

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

.service-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(91, 140, 42, 0.3);
  box-shadow: var(--shadow-md);
}

.service-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  display: block;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
}

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

.service-tags li {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  background: rgba(91, 140, 42, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
}

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

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

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(91, 140, 42, 0.3);
}

.project-image {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-info {
  padding: 24px;
}

.project-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-weight: 500;
  transition: var(--transition);
}

.project-link:hover {
  gap: 10px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 140, 42, 0.3);
}

.contact-card.main-contact {
  border-color: rgba(88, 101, 242, 0.3);
}

.contact-card.main-contact:hover {
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 0 40px rgba(88, 101, 242, 0.1);
}

.contact-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-glass);
  color: var(--accent-light);
}

.contact-card.main-contact .contact-icon {
  color: #5865F2;
}

.contact-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-username {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-card.main-contact .contact-username {
  color: #5865F2;
}

.contact-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-card .btn {
  display: inline-flex;
  justify-content: center;
}

.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 24px 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

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

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
    gap: 48px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-visual {
    flex: 0 0 auto;
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: rgba(15, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 4px;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border-color);
  }

  .nav-links.open {
    right: 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-stats {
    gap: 24px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  section {
    padding: 70px 20px;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

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

  .btn {
    width: 100%;
    justify-content: center;
  }

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