:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #101522;
  --bg-card: rgba(22, 28, 45, 0.7);
  --bg-card-hover: rgba(30, 41, 67, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(56, 189, 248, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #38bdf8;
  --accent-secondary: #818cf8;
  --accent-emerald: #34d399;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 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: #ffffff;
  --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-color-hover: rgba(14, 165, 233, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-primary: #0284c7;
  --accent-secondary: #6366f1;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

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

/* Glassmorphism Card Style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

/* Typography & Utilities */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 0.8rem;
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

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

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

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}

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

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

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

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

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

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

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-primary);
  color: #04101e;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
}

.btn-outline {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
}

.btn-glass {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

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

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 92vh;
  padding: 8rem 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.15;
}

.glow-1 {
  background: #38bdf8;
  top: -100px;
  left: -100px;
}

.glow-2 {
  background: #818cf8;
  bottom: 0px;
  right: -100px;
}

.hero-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-header-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hero-avatar-wrapper {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: var(--accent-gradient);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
  flex-shrink: 0;
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 14px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 50px;
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-metrics-pill {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 2.2rem;
  width: fit-content;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.metric-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-div {
  width: 1px;
  height: 28px;
  background: var(--border-color);
}

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

/* Terminal Card */
.hero-terminal {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-header {
  background: #161b22;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  position: relative;
}

.terminal-buttons {
  display: flex;
  gap: 6px;
}

.t-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.t-close { background: #ff5f56; }
.t-min { background: #ffbd2e; }
.t-max { background: #27c93f; }

.terminal-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #8b949e;
}

.terminal-body {
  padding: 1.25rem;
  color: #c9d1d9;
}

.t-prompt {
  color: #58a6ff;
  font-weight: 600;
}

.code-block {
  margin: 0.75rem 0;
  line-height: 1.5;
}

.json-key { color: #79c0ff; }
.json-str { color: #a5d6ff; }
.t-comment { color: #8b949e; font-style: italic; margin-top: 0.75rem; }

/* Sections General */
.section {
  padding: 6rem 1.5rem;
}

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

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

.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.8rem;
}

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

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.about-card {
  padding: 2rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.about-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

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

.skill-category-card {
  padding: 1.85rem;
}

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

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

.category-header h3 {
  font-size: 1.15rem;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-tag:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.08);
}

/* Projects Section */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-primary);
  color: #04101e;
  border-color: var(--accent-primary);
}

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

.project-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

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

.project-type {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
}

.project-links a {
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: var(--transition);
}

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

.project-name {
  font-size: 1.4rem;
  margin-bottom: 0.85rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.project-highlights {
  list-style: none;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-highlights li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.project-highlights i {
  color: var(--accent-emerald);
  font-size: 0.75rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.project-tags span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.project-footer {
  margin-top: auto;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  top: 6px;
  left: -2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-date {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.timeline-content {
  padding: 1.5rem 1.8rem;
}

.role-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 0.4rem;
}

.timeline-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.timeline-content h4 {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 2.5rem;
}

.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-right: 1.2rem;
}

.contact-card-text {
  display: flex;
  flex-direction: column;
}

.contact-card-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.contact-card-val {
  font-size: 0.95rem;
  font-weight: 600;
}

.external-icon {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.copy-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
}

.copy-btn:hover {
  color: var(--accent-primary);
}

.contact-form-container {
  padding: 2.2rem;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.05);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(150%);
  opacity: 0;
  transition: var(--transition);
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-right {
  display: flex;
  gap: 1.25rem;
}

.footer-right a {
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.footer-right a:hover {
  color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-metrics-pill {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }
}
