:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.15);
  --accent-secondary: #8b5cf6;
  --gradient: linear-gradient(135deg, #06b6d4, #8b5cf6);
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(960px, 92vw);
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow 0.3s;
}

.header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  border: 2px solid var(--accent);
  padding: 4px 10px;
  border-radius: 6px;
}

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

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

.nav-links a:hover,
.nav-links a.active {
  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);
  transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
  padding-bottom: 4rem;
}

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

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.hero-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-headline {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.8vw, 0.92rem);
  line-height: 1.7;
  color: var(--accent);
  max-width: 640px;
  margin-bottom: 1.25rem;
}

.hero-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.hero-quote {
  position: relative;
  max-width: 560px;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  border-left: 3px solid transparent;
  border-image: var(--gradient) 1;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(139, 92, 246, 0.06));
  border-radius: 0 var(--radius) var(--radius) 0;
}

.hero-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.25rem;
  left: 0.75rem;
  font-size: 2.5rem;
  line-height: 1;
  font-family: Georgia, serif;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.5;
}

.hero-quote p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
  margin: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

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

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding-block: 5rem;
}

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

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 640px;
  margin: -1rem 0 2rem;
}

/* About */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

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

.about-card p:last-of-type {
  margin-bottom: 1.5rem;
}

.about-quote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: rgba(6, 182, 212, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.about-quote p {
  font-style: italic;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.about-quote cite {
  font-size: 0.85rem;
  color: var(--accent);
  font-style: normal;
}

.about-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.meta-link {
  text-decoration: none;
  transition: color 0.2s;
}

.meta-link:hover {
  color: var(--accent);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.meta-item svg {
  color: var(--accent);
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  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: -2rem;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transform: translateX(-1px);
}

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

.timeline-content:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

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

.timeline-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

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

.timeline-header time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: rgba(6, 182, 212, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.timeline-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-content li {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding-left: 1.25rem;
  position: relative;
}

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

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

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
}

.skill-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.skill-tags span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 6px;
  color: var(--accent);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.project-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-stack span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 8px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 4px;
  color: var(--accent-secondary);
}

/* Education */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

#learning .education-grid {
  margin-top: 2.5rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
}

.edu-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.edu-school {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.edu-card time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.cert-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cert-card li {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding-left: 1rem;
  position: relative;
}

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

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

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s;
}

.course-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.course-provider {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.course-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.course-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex: 1;
  margin-bottom: 1.25rem;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.course-meta time,
.course-meta span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.course-meta a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.course-meta a:hover {
  text-decoration: underline;
}

/* Interests */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.interest-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.interest-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.interest-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.2));
}

.interest-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.interest-card p {
  font-family: var(--font);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.interest-accent {
  display: block;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  margin-top: auto;
}

.interest-card[data-accent="cyan"] .interest-accent { background: #06b6d4; }
.interest-card[data-accent="orange"] .interest-accent { background: #f97316; }
.interest-card[data-accent="green"] .interest-accent { background: #22c55e; }
.interest-card[data-accent="amber"] .interest-accent { background: #eab308; }
.interest-card[data-accent="purple"] .interest-accent { background: #a855f7; }
.interest-card[data-accent="blue"] .interest-accent { background: #3b82f6; }
.interest-card[data-accent="violet"] .interest-accent { background: #8b5cf6; }

.interest-card[data-accent="cyan"]:hover { border-color: rgba(6, 182, 212, 0.35); }
.interest-card[data-accent="orange"]:hover { border-color: rgba(249, 115, 22, 0.35); }
.interest-card[data-accent="green"]:hover { border-color: rgba(34, 197, 94, 0.35); }
.interest-card[data-accent="amber"]:hover { border-color: rgba(234, 179, 8, 0.35); }
.interest-card[data-accent="purple"]:hover { border-color: rgba(168, 85, 247, 0.35); }
.interest-card[data-accent="blue"]:hover { border-color: rgba(59, 130, 246, 0.35); }
.interest-card[data-accent="violet"]:hover { border-color: rgba(139, 92, 246, 0.35); }

/* Contributions */
.contributions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.contribution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contribution-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.contribution-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.contribution-icon {
  font-size: 2rem;
}

.contribution-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--accent-secondary);
  white-space: nowrap;
}

.contribution-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contribution-org {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contribution-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.contribution-note {
  font-style: italic;
  color: var(--text) !important;
  border-left: 2px solid var(--accent-secondary);
  padding-left: 1rem;
  margin-top: 0.5rem !important;
}

.contribution-card .course-meta {
  margin-top: 1.25rem;
  margin-bottom: 1rem;
}

.contribution-card .project-stack {
  margin-top: 0;
}

/* Contact */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}

.contact-card > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-link svg {
  color: var(--accent);
}

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

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

/* 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);
}

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

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

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

  .section {
    padding-block: 3.5rem;
  }
}

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