/* ─── VARIABLES & RESET ────────────────────────── */
:root {
  --bg-color: #05050a;
  --bg-surface: #11111a;
  --bg-surface-hover: #1a1a2e;
  
  --text-main: #f8f8f2;
  --text-muted: #a0a0b0;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #0ea5e9;
  
  --gradient-text: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
  --gradient-border: linear-gradient(135deg, rgba(167,139,250,0.3) 0%, rgba(56,189,248,0.3) 100%);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(17, 17, 26, 0.7);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
}

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

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

.section {
  padding: 100px 0;
  position: relative;
}

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

.section-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
}

/* ─── NAVBAR ───────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 12px 48px;
  background: var(--glass-bg);
  border-bottom-color: var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-logo {
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-text);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

/* ─── HERO ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 24px;
  /* Include the generated image as background fallback, though canvas handles particles */
  background-image: url('assets/hero_bg.jpg');
  background-size: cover;
  background-position: center;
}

/* Dark overlay to make text readable over the background */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(5, 5, 10, 0.4) 0%, rgba(5, 5, 10, 0.9) 100%);
  z-index: 1;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin-top: 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

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

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-tech-stack span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-dot {
  width: 4px;
  height: 4px;
  background: var(--text-main);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 20px); opacity: 0; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* ─── ABOUT ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.about-avatar-wrap {
  position: relative;
}

.about-avatar {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-avatar::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--gradient-text);
  z-index: 0;
  opacity: 0.2;
  border-radius: inherit;
  transition: opacity 0.3s;
}

.about-avatar:hover::before {
  opacity: 0.5;
}

.avatar-inner {
  position: absolute;
  inset: 2px;
  background: var(--bg-surface);
  border-radius: calc(var(--radius-lg) - 2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.avatar-emoji {
  font-size: 8rem;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: -30px;
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.about-lead {
  font-size: 1.25rem;
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 24px;
}

.about-text p {
  margin-bottom: 20px;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-weight: 500;
}

.highlight-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  font-size: 1.2rem;
}

/* ─── SKILLS ───────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.skill-category {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--bg-surface-hover);
}

.skill-cat-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-pill {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.skill-pill::before {
  content: '▹';
  color: var(--primary);
  margin-right: 8px;
  font-size: 1.1rem;
}

/* ─── PROJECTS ─────────────────────────────────────── */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.project-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

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

.project-card-reverse .project-visual {
  order: 2;
}

.project-card-reverse .project-info {
  order: 1;
}

.project-number {
  position: absolute;
  top: -40px;
  left: -20px;
  font-size: 8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.02);
  z-index: 0;
  pointer-events: none;
}

.project-card-reverse .project-number {
  left: auto;
  right: -20px;
}

.project-visual {
  position: relative;
  z-index: 1;
  perspective: 1000px;
}

.project-mock {
  background: #1e1e24;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  transition: transform 0.5s ease;
  transform: rotateY(-5deg) rotateX(5deg);
}

.project-card-reverse .project-mock {
  transform: rotateY(5deg) rotateX(5deg);
}

.project-card:hover .project-mock {
  transform: rotateY(0) rotateX(0);
}

.mock-header {
  background: #2d2d3b;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.2);
}

.mock-dots {
  display: flex;
  gap: 6px;
}

.mock-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f56;
}
.mock-dots span:nth-child(2) { background: #ffbd2e; }
.mock-dots span:nth-child(3) { background: #27c93f; }

.mock-url {
  margin: 0 auto;
  background: #1e1e24;
  padding: 4px 16px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mock-body {
  height: 350px;
  background: var(--bg-surface);
  position: relative;
  display: flex;
  flex-direction: column;
}

.mock-nav-bar {
  height: 40px;
  background: var(--proj-color, #333);
  opacity: 0.8;
}

.mock-hero-banner {
  height: 120px;
  background: linear-gradient(135deg, var(--proj-color), var(--proj-accent));
  opacity: 0.7;
}

.mock-cards {
  display: flex;
  gap: 10px;
  padding: 20px;
  flex: 1;
}

.mock-card {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

.project-info {
  position: relative;
  z-index: 1;
}

.project-tags {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}

.tag-featured {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.project-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-main);
}

.project-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

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

.ph-item span {
  color: var(--secondary);
}

.project-links {
  display: flex;
  gap: 16px;
}

.proj-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.proj-btn-primary {
  background: var(--text-main);
  color: var(--bg-color);
}

.proj-btn-primary:hover {
  background: #d4d4d8;
  transform: translateY(-2px);
}

.proj-btn-ghost {
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.proj-btn-ghost:hover {
  background: rgba(255,255,255,0.05);
}

/* ─── CERTIFICATES ─────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.cert-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.cert-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.cert-icon-wrap {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

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

.cert-issuer {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.cert-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.cert-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.cert-date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-verify-btn {
  display: inline-flex;
  align-items: center;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.9rem;
}

.cert-verify-btn:hover {
  color: var(--primary);
}

/* ─── CONTACT ──────────────────────────────────────── */
.contact-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateX(5px);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-card h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.contact-card a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-card a:hover {
  color: var(--primary);
}

.contact-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-success {
  margin-top: 20px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  color: #10b981;
  font-weight: 500;
  text-align: center;
}

/* ─── FOOTER ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background: var(--bg-surface);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-copy {
  color: #555;
  font-size: 0.85rem;
}

/* ─── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 992px) {
  .about-grid, .project-card, .project-card-reverse {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .project-card-reverse .project-visual {
    order: 1;
  }
  
  .project-card-reverse .project-info {
    order: 2;
  }
  
  .project-number {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 16px 24px;
  }
  
  .navbar.scrolled {
    padding: 12px 24px;
  }
  
  .hamburger {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s ease;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 80px 0;
  }
  
  .contact-form {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .project-links {
    flex-direction: column;
  }
  
  .about-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  
  .certs-grid {
    grid-template-columns: 1fr;
  }
  
  .project-highlights {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .about-avatar {
    max-width: 280px;
    margin: 0 auto;
  }
}
