:root {
  --bg-dark: #070a12;
  --bg-card: #0e1424;
  --bg-card-hover: #141d33;
  --border-subtle: #1e293b;
  --border-accent: rgba(16, 185, 129, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

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

/* Header & Navbar */
.nav-wrapper {
  position: sticky;
  top: 0;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  padding: 16px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-code);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-code {
  color: var(--accent-emerald);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

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

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #022c22;
  padding: 12px 24px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

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

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

.btn-outline-sm {
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 16px;
  font-size: 0.88rem;
}

.btn-outline-sm:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

/* Hero Section */
.hero {
  padding: 110px 0 80px;
  text-align: center;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 900px;
}

.gradient-text {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cursor {
  color: var(--accent-emerald);
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-bio {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 740px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-bio strong {
  color: var(--text-main);
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 44px;
}

.tech-pills-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 800px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--font-code);
}

/* Sections */
.section {
  padding: 90px 0;
}

.section-dark {
  background: #090e1a;
}

.section-header {
  margin-bottom: 48px;
}

.section-subtitle {
  color: var(--accent-emerald);
  font-family: var(--font-code);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Experience Card */
.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.exp-role {
  font-size: 1.4rem;
  font-weight: 700;
}

.exp-client {
  color: var(--accent-emerald);
  font-size: 1rem;
  margin-top: 4px;
}

.exp-badge {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-code);
}

.exp-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.exp-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
  font-size: 0.95rem;
}

/* Flagship Project */
.flagship-project {
  background: linear-gradient(160deg, #10192e 0%, #0c1220 100%);
  border: 1px solid var(--border-accent);
  border-radius: 18px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.flagship-ribbon {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

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

.flagship-title {
  font-size: 1.9rem;
  font-weight: 800;
}

.flagship-tagline {
  color: var(--accent-cyan);
  font-size: 1.02rem;
  margin-top: 4px;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.flagship-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.flagship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.feat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px;
}

.feat-box h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.feat-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-icon {
  font-size: 1.8rem;
}

.project-badge {
  font-size: 0.78rem;
  font-family: var(--font-code);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
  color: #cbd5e1;
}

.project-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-text {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.link-arrow {
  color: var(--accent-emerald);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* Tags */
.tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: var(--font-code);
}

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

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 26px;
  transition: border-color 0.2s ease;
}

.skill-category:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.cat-icon {
  font-size: 1.4rem;
}

.skill-cat-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-list li {
  color: #cbd5e1;
  font-size: 0.92rem;
  position: relative;
  padding-left: 18px;
}

.skill-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-emerald);
}

/* Contact */
.contact-section {
  text-align: center;
}

.contact-card {
  background: linear-gradient(180deg, #111a2f 0%, #0d1322 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 50px 30px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 12px 0 16px;
}

.contact-text {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

.contact-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-dark);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 12px;
}

.back-to-top {
  color: var(--accent-emerald);
  text-decoration: none;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #090e1a;
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 16px;
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .flagship-project {
    padding: 24px;
  }
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta .btn {
    width: 100%;
  }
}
