@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #3b82f6 50%, #8b5cf6 100%);
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow: 0 0 35px rgba(56, 189, 248, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Background Glowing Orbs */
.bg-glow-1, .bg-glow-2 {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: rgba(56, 189, 248, 0.12);
  top: -100px;
  left: -100px;
}
.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: rgba(139, 92, 246, 0.12);
  bottom: -150px;
  right: -150px;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-card-border);
  z-index: 1000;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}
.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-cta {
  background: var(--accent-gradient);
  color: #fff !important;
  padding: 0.55rem 1.3rem;
  border-radius: 50px;
  font-weight: 600 !important;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  transition: var(--transition-smooth);
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
}
.hero-content {
  max-width: 800px;
}
.badge-tech {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 50px;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}
.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.4);
}
.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

/* Stats Ribbon */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 4rem 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 1.8rem;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}
.stat-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* Section Common */
.section {
  padding: 5rem 0;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

/* Projects Grid */
.filter-tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}
.project-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}
.project-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
}
.project-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.tech-stack-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* Articles Section */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 2rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}
.article-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-5px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}
.article-meta {
  color: var(--accent-purple);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.article-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}
.article-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Special Highlight Banner */
.highlight-banner {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.5) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--accent-blue);
  border-radius: 24px;
  padding: 3rem;
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
}
.highlight-banner::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 250px; height: 250px;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 50%;
  filter: blur(50px);
}
.highlight-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
}
.highlight-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.modal-backdrop.active {
  display: flex;
}
.modal-body {
  background: #0f172a;
  border: 1px solid var(--bg-card-border);
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  color: #e2e8f0;
}
.modal-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Markdown styling in modal */
.markdown-view h1, .markdown-view h2, .markdown-view h3 {
  font-family: var(--font-heading);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: #fff;
}
.markdown-view p {
  margin-bottom: 1rem;
  color: #cbd5e1;
  line-height: 1.7;
}
.markdown-view pre {
  background: #090d16;
  border: 1px solid var(--bg-card-border);
  padding: 1.2rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.2rem 0;
  font-family: monospace;
  font-size: 0.88rem;
}
.markdown-view code {
  color: var(--accent-cyan);
}

/* Footer */
footer {
  border-top: 1px solid var(--bg-card-border);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .nav-links { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .highlight-banner { padding: 1.8rem; }
  .modal-body { padding: 1.8rem; }
}
