:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --text: #e0e0e8;
  --text-muted: #8888a0;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.1);
  --accent-glow: rgba(0, 212, 170, 0.3);
  --border: #1e1e2e;
  --radius: 8px;
  --font: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent {
  color: var(--accent);
}

.section-title {
  font-family: var(--font);
  font-size: 1.75rem;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}

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

/* ---- NAV ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

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

.nav-logo {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

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

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

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* ---- HERO ---- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 70% 30%, var(--accent-dim) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 20% 80%, rgba(80, 60, 200, 0.06) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

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

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font);
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.25s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

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

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

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

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-muted);
  border-radius: 10px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { top: 6px; opacity: 1; }
  50% { top: 16px; opacity: 0.3; }
}

/* ---- ABOUT ---- */

.about {
  padding: 120px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font);
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font);
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- TERMINAL ---- */

.terminal {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font);
  font-size: 0.85rem;
}

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

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

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

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

.terminal-body {
  padding: 16px;
  line-height: 1.8;
}

.terminal-body .prompt {
  color: var(--accent);
  margin-right: 8px;
}

.terminal-body pre {
  color: var(--text-muted);
  white-space: pre-wrap;
  margin-top: 8px;
}

/* ---- EXPERIENCE ---- */

.experience {
  padding: 120px 0;
  background: var(--bg-card);
}

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

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

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

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

.timeline-marker {
  position: absolute;
  left: -38px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.timeline-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s;
}

.timeline-content:hover {
  border-color: var(--accent);
}

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

.timeline-header h3 {
  font-family: var(--font);
  font-size: 1.1rem;
}

.timeline-company {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 4px;
}

.timeline-date {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-details {
  list-style: none;
  margin-bottom: 16px;
}

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

.timeline-details li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
}

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

.timeline-tags span {
  padding: 4px 10px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.75rem;
  border-radius: 4px;
}

/* ---- EDUCATION ---- */

.education {
  padding: 120px 0;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

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

.edu-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.edu-card h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.edu-school {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.edu-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font);
}

.edu-honors {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ---- SKILLS ---- */

.skills {
  padding: 120px 0;
  background: var(--bg-card);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

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

.skill-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.skill-card h3 {
  font-family: var(--font);
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--accent);
}

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

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

.skill-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
}

/* ---- CERTIFICATIONS ---- */

.certs {
  margin-top: 48px;
}

.certs-title {
  font-family: var(--font);
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--text);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color 0.3s;
}

.cert-item:hover {
  border-color: var(--accent);
}

.cert-badge {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- PROJECTS ---- */

.projects {
  padding: 120px 0;
  position: relative;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  cursor: pointer;
  display: grid;
  grid-template-columns: 360px 1fr;
}

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

.project-image {
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, #0a0a14 0%, #141428 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-svg {
  width: 100%;
  height: 100%;
}

.project-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-info h3 {
  font-family: var(--font);
  font-size: 1.15rem;
  margin-bottom: 12px;
}

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

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

.project-tags span {
  padding: 4px 10px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.75rem;
  border-radius: 4px;
}

/* ---- PROJECT DETAIL PANEL ---- */

.project-wrapper {
  display: flex;
  flex-direction: column;
}

.project-wrapper.active .project-card {
  border-color: var(--accent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.project-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.project-wrapper.active .project-detail {
  grid-template-rows: 1fr;
}

.project-detail-inner {
  overflow: hidden;
}

.project-detail-content {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 32px 36px;
}

.project-detail-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.project-detail-section {
  margin-bottom: 20px;
}

.project-detail-section h4 {
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-detail-section ul {
  list-style: none;
}

.project-detail-section li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 5px 0;
  padding-left: 16px;
  position: relative;
}

.project-detail-section li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
}

.project-detail-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.project-detail-links:empty {
  display: none;
}

.project-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.25s;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.project-detail-link:hover {
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ---- CONTACT ---- */

.contact {
  padding: 120px 0;
  background: var(--bg-card);
  text-align: center;
}

.contact-desc {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 48px;
}

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

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.3s, transform 0.3s;
}

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

.contact-icon {
  font-size: 1.5rem;
}

/* ---- FOOTER ---- */

.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- ANIMATIONS ---- */

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

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

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-toggle {
    display: flex;
  }

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

  .about-stats {
    justify-content: flex-start;
  }

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

  .project-card {
    grid-template-columns: 1fr;
  }

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

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

  .timeline-header {
    flex-direction: column;
  }

  .hero-name {
    font-size: 2.5rem;
  }
}
