/* ==========================================================================
   Barkat Bashir — Modern Minimalist Design System
   Theme: Refined Dark Slate / Editorial Light Mode (Single Seamless Flow)
   ========================================================================== */

:root, [data-theme="dark"] {
  /* Color Palette — Deep Midnight Cosmic Sky */
  --bg-primary: #07090e;
  --bg-secondary: #0d1017;
  --bg-card: rgba(13, 17, 26, 0.72);
  --bg-card-hover: rgba(18, 24, 38, 0.9);
  --bg-elevated: #131824;
  --bg-glass: rgba(7, 9, 14, 0.82);

  /* Borders & Hairlines */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.13);
  --border-focus: rgba(141, 164, 196, 0.4);

  /* Typography Colors — Crisp Starlight Contrast */
  --text-primary: #edf2f9;
  --text-secondary: #9da8be;
  --text-muted: #647087;
  --text-faint: #3d4658;

  /* Accent Tones */
  --accent-slate: #8da4c4;
  --accent-blue: #6484b2;
  --accent-emerald: #5ea88e;
  --accent-star: #e2e8f5;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Layout & Spacing */
  --container-max: 920px;
  --header-height: 62px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* Easing */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s var(--ease-smooth);
}

[data-theme="light"] {
  /* Color Palette — Warm Golden Sunrise & Dawn Light */
  --bg-primary: #fcf8f2;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: #ffffff;
  --bg-elevated: #f5ebe0;
  --bg-glass: rgba(252, 248, 242, 0.88);

  --border-subtle: rgba(190, 150, 110, 0.14);
  --border-medium: rgba(190, 150, 110, 0.24);
  --border-focus: rgba(217, 119, 54, 0.4);

  --text-primary: #1e1b18;
  --text-secondary: #534c44;
  --text-muted: #7d746a;
  --text-faint: #aba195;

  --accent-slate: #cf6d2b;
  --accent-blue: #2c5999;
  --accent-emerald: #247558;
  --accent-star: #f59e0b;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Sky Canvas (Night Stars & Shooting Comets) */
.sky-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.5s ease;
}

[data-theme="light"] .sky-canvas {
  opacity: 0;
}

/* Ambient Glow — Night Nebula (Dark) / Sunrise Dawn (Light) */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  transition: background 0.4s ease;
}

[data-theme="dark"] .ambient-glow {
  background: 
    radial-gradient(circle 800px at 50% -10%, rgba(35, 52, 85, 0.28), transparent 70%),
    radial-gradient(circle 650px at 85% 45%, rgba(60, 42, 80, 0.2), transparent 65%),
    radial-gradient(circle 700px at 15% 75%, rgba(20, 38, 62, 0.22), transparent 70%);
}

[data-theme="light"] .ambient-glow {
  background: 
    radial-gradient(ellipse 900px 520px at 50% -60px, rgba(255, 179, 71, 0.24), transparent 70%),
    radial-gradient(circle 700px at 10% 20%, rgba(255, 120, 80, 0.13), transparent 60%),
    radial-gradient(circle 800px at 90% 45%, rgba(255, 209, 128, 0.16), transparent 65%),
    linear-gradient(180deg, #fdf8f1 0%, #f9f2e7 50%, #f5ece0 100%);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.75rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Navigation Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background-color: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-logo:hover {
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
  line-height: 1;
}

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

.btn-primary:hover {
  background-color: #1f2536;
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-subtle {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-subtle:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.775rem;
  padding: 0.35rem 0.75rem;
}

.btn-icon-theme {
  padding: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.btn-icon-theme:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Theme Icon Visibility */
[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

[data-theme="light"] .sun-icon {
  display: none;
}

[data-theme="light"] .moon-icon {
  display: block;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 3.5rem 0 2.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.775rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(94, 168, 142, 0.6);
}

.hero-title {
  font-size: clamp(2rem, 3.8vw, 2.55rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  max-width: 820px;
}

.hero-title .highlight {
  color: var(--text-primary);
}

.hero-title .accent-subtle {
  color: var(--accent-slate);
}

.hero-bio {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 740px;
  margin-bottom: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Section Layouts
   ========================================================================== */
.section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 1.35rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-slate);
  display: block;
  margin-bottom: 0.4rem;
}

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

/* ==========================================================================
   Projects Grid
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
}

.clean-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.clean-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.card-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-slate);
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all var(--transition-fast);
}

.card-badge.live-link {
  color: var(--accent-slate);
  background: rgba(141, 164, 196, 0.08);
  border-color: rgba(141, 164, 196, 0.2);
}

.card-badge.live-link:hover {
  color: var(--text-primary);
  background: rgba(141, 164, 196, 0.2);
  border-color: var(--accent-slate);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.35rem;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card-tags span {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Experience Section
   ========================================================================== */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.exp-item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.exp-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.exp-meta-col {
  display: flex;
  flex-direction: column;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-slate);
}

.exp-org {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.exp-heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.exp-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.exp-points li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  position: relative;
  padding-left: 1.25rem;
}

.exp-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-slate);
  font-weight: 400;
}

.exp-project {
  margin-bottom: 1.5rem;
}

.exp-project:last-child {
  margin-bottom: 0;
}

.project-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.project-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--accent-slate);
  background: var(--bg-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.exp-bullets li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  position: relative;
  padding-left: 1.15rem;
}

.exp-bullets li::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  color: var(--accent-slate);
}

/* ==========================================================================
   Skills & Education Section
   ========================================================================== */
.skills-edu-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.35rem;
}

.sub-heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.35rem;
  letter-spacing: -0.01em;
}

.skill-group {
  margin-bottom: 1.25rem;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-label {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-chips span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.edu-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.edu-degree {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.edu-school {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-slate);
}

.cert-chips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cert-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.cert-chip svg {
  color: var(--accent-slate);
}

/* ==========================================================================
   Contact Box & Footer
   ========================================================================== */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.contact-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
  max-width: 500px;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.back-to-top {
  color: var(--text-muted);
  text-decoration: none;
}

.back-to-top:hover {
  color: var(--text-primary);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   CTA Project Card (Homepage)
   ========================================================================== */
.cta-projects-card {
  border-style: dashed;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(141, 164, 196, 0.04) 100%);
}

.cta-projects-card:hover {
  border-style: solid;
  border-color: var(--accent-slate);
}

/* ==========================================================================
   GitHub Contribution Heatmap Section
   ========================================================================== */
.github-card {
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.github-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.github-user-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.github-avatar-icon {
  width: 38px;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-slate);
}

.github-handle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.github-subtext {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.github-chart-container {
  width: 100%;
  overflow-x: auto;
  padding: 1rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
}

.github-chart-img {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: block;
}

[data-theme="light"] .github-chart-container {
  background: #ffffff;
}

/* ==========================================================================
   Projects Page Styling (projects.html)
   ========================================================================== */
.projects-page-header {
  padding-top: 1.5rem;
  padding-bottom: 1.25rem;
}

.breadcrumb-nav {
  margin-bottom: 0.75rem;
}

.breadcrumb-link {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--accent-slate);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--text-primary);
}

.projects-page-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.6;
}

.detailed-projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.detailed-project-card {
  padding: 1.65rem;
}

.project-links-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-headline-wrap {
  margin-bottom: 0.85rem;
}

.detailed-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.project-type-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-slate);
}

.detailed-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.35rem;
}

.project-key-points {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.35rem;
}

.points-header {
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.points-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.points-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  position: relative;
  padding-left: 1.25rem;
}

.points-list li::before {
  content: "•";
  position: absolute;
  left: 0.25rem;
  color: var(--accent-slate);
  font-weight: bold;
}

.points-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.detailed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.detailed-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.projects-back-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}

.back-arrow {
  margin-right: 0.35rem;
  color: var(--accent-slate);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 840px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-edu-grid {
    grid-template-columns: 1fr;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .detailed-project-card {
    padding: 1.5rem;
  }
}

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

  .nav-links {
    display: none;
  }

  .contact-box {
    padding: 2rem 1.25rem;
  }

  .github-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .github-header .btn {
    width: 100%;
    justify-content: center;
  }
}

