/* --------------------------------------------------
 * CSS Variables & Theme Configuration
 * -------------------------------------------------- */
:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dark Theme (Default) */
  --bg-primary: #0a0f1d;
  --bg-secondary: #10182c;
  --bg-card: rgba(19, 29, 53, 0.7);
  --bg-card-hover: rgba(28, 41, 75, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.15);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------
 * Reset & Base Styles
 * -------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* --------------------------------------------------
 * Header & Navbar
 * -------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: rgba(10, 15, 29, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.85);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-symbol {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-weight: 700;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  transform: rotate(15deg);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition);
}

/* --------------------------------------------------
 * Buttons
 * -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

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

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

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------
 * Hero Section
 * -------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 130px;
  padding-bottom: 60px;
  display: flex;
  align-items: center;
}

.hero-bg-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(168, 85, 247, 0.08) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

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

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

.typed-text {
  color: var(--accent-primary);
}

.cursor {
  display: inline-block;
  background-color: var(--accent-primary);
  width: 3px;
  animation: blink 1s infinite;
}

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

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2rem;
}

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

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

.hero-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.hero-socials a:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

/* Code visual card */
.code-card {
  background: #0d1322;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

[data-theme="light"] .code-card {
  background: #1e293b;
  color: #f8fafc;
}

.card-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.circle.red { background: #ef4444; }
.circle.yellow { background: #eab308; }
.circle.green { background: #22c55e; }

.card-filename {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
  margin-left: auto;
}

.card-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-x: auto;
}

.code-keyword { color: #ec4899; }
.code-var { color: #60a5fa; }
.code-prop { color: #34d399; }
.code-str { color: #fde047; }

/* --------------------------------------------------
 * Section Generic
 * -------------------------------------------------- */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

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

/* --------------------------------------------------
 * About Section
 * -------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(8px);
}

.about-bio h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.about-bio p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.stats-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-content: center;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.stat-plus {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

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

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 16px;
  transition: var(--transition);
}

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

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-header i {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.category-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

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

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
}

[data-theme="light"] .skill-badge {
  background: rgba(0, 0, 0, 0.04);
}

.skill-badge:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.project-banner {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.banner-1 {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

.banner-2 {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

.banner-3 {
  background: linear-gradient(135deg, #701a75 0%, #86198f 100%);
}

.banner-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #ffffff;
}

.project-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.project-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.project-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.project-link.demo-link {
  color: var(--accent-primary);
}

/* --------------------------------------------------
 * Contact Section
 * -------------------------------------------------- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.25rem;
}

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

.item-value {
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.form-status.success {
  color: #22c55e;
}

/* --------------------------------------------------
 * Footer
 * -------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  background: var(--bg-primary);
}

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

/* --------------------------------------------------
 * Responsive Styles
 * -------------------------------------------------- */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions,
  .hero-socials {
    justify-content: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 72px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 72px);
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    gap: 1.75rem;
    transition: left 0.3s ease;
  }
  .nav-links.open {
    left: 0;
  }
  .nav-cta {
    display: none;
  }
}
