/*
  Personal Folio Profile
  Qaimali Baloch (@Zarriod)
  Clean, modern, responsive static portfolio
  Optimized for Cloudflare Pages
*/

@font-face {
  font-family: 'Outfit';
  src: url('../webfonts/outfit/Outfit-VariableFont_wght.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../webfonts/Inter/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  /* Color Palette - Light Mode (Default, matching zarriod_website elegance) */
  --bg-body: #f8f9fb;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f3f7;
  --bg-pill: #eef2f8;
  
  --border-light: #e6e9ef;
  --border-medium: #d4d9e2;
  --border-focus: #5170FF;
  
  --text-main: #14171f;
  --text-secondary: #4b5262;
  --text-muted: #747d8f;
  --text-inverse: #ffffff;

  /* Signature Brand Color */
  --primary: #5170FF;
  --primary-hover: #3d5de8;
  --primary-pressed: #2c4ac7;
  --primary-soft: rgba(81, 112, 255, 0.08);
  --primary-soft-hover: rgba(81, 112, 255, 0.14);
  --primary-border: rgba(81, 112, 255, 0.25);
  
  /* Status Colors */
  --status-active-bg: rgba(34, 197, 94, 0.12);
  --status-active-text: #16a34a;
  --status-active-dot: #22c55e;
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: var(--font-body);
  
  /* Shadows & Elevation */
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-card: 0 2px 10px rgba(16, 24, 40, 0.03), 0 1px 2px rgba(16, 24, 40, 0.02);
  --shadow-hover: 0 12px 28px rgba(16, 24, 40, 0.08), 0 4px 10px rgba(81, 112, 255, 0.04);
  --shadow-toast: 0 12px 32px rgba(16, 24, 40, 0.12);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;
  
  /* Layout sizing */
  --max-width: 860px;
  --header-height: 70px;
  --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Support */
[data-theme="dark"] {
  --bg-body: #0d1017;
  --bg-surface: #141824;
  --bg-surface-elevated: #1a2030;
  --bg-subtle: #1c2234;
  --bg-pill: #21293e;
  
  --border-light: #242c3f;
  --border-medium: #323d57;
  --border-focus: #6985ff;
  
  --text-main: #f3f5f9;
  --text-secondary: #a3adc2;
  --text-muted: #6f7b92;
  --text-inverse: #0d1017;

  --primary: #5f7eff;
  --primary-hover: #7b94ff;
  --primary-pressed: #4a6bf5;
  --primary-soft: rgba(95, 126, 255, 0.16);
  --primary-soft-hover: rgba(95, 126, 255, 0.24);
  --primary-border: rgba(95, 126, 255, 0.35);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(95, 126, 255, 0.1);
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  letter-spacing: -0.01em;
  min-height: 100vh;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  overflow-x: hidden;
}

/* Selection */
::selection {
  background-color: var(--primary-soft-hover);
  color: var(--primary);
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.site-container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Sticky Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: rgba(248, 249, 251, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

[data-theme="dark"] .site-header {
  background-color: rgba(13, 16, 23, 0.85);
}

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

.brand-monogram {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
}

.brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

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

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

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

.footer-contact-link {
  color: var(--text-secondary);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer-contact-link:hover {
  color: var(--primary);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

[data-theme="dark"] .theme-toggle-btn img {
  filter: invert(1);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--status-active-bg);
  color: var(--status-active-text);
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-active-dot);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-profile-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.hero-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
  background-color: var(--bg-surface);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 2rem;
}

.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(81, 112, 255, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(81, 112, 255, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* Quick Channels Pill Bar */
.social-pills-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-pill:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background-color: var(--primary-soft);
  transform: translateY(-1px);
}

.social-pill img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

[data-theme="dark"] .social-pill img,
[data-theme="dark"] .tech-icon-wrap img,
[data-theme="dark"] .connect-icon img,
[data-theme="dark"] .principle-title-icon img,
[data-theme="dark"] .education-icon {
  filter: invert(1);
}

/* ==========================================================================
   Section Layouts & Styling
   ========================================================================== */
.content-section {
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
  border-top: 1px solid var(--border-light);
}

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

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

/* ==========================================================================
   About Section ("Who I Am")
   ========================================================================== */
.about-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.about-text {
  font-size: 1.025rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.about-text:last-of-type {
  margin-bottom: 1.5rem;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-light);
}

.principle-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.principle-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.principle-title-icon {
  color: var(--primary);
}

.principle-title-icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.principle-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.about-meta {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.education-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.education-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.education-pill strong {
  color: var(--text-main);
  font-weight: 600;
}


/* ==========================================================================
   What I Do / Interactive Tech Radar
   ========================================================================== */
.tech-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-main);
}

.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.tech-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.tech-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.tech-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tech-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-icon-wrap img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.tech-category-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.tech-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.tech-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Projects Section (Matching zarriod_website app-card feel)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.project-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.project-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

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

.project-icon-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-subtle);
}

.project-icon-graphic {
  object-fit: contain;
  padding: 0.65rem;
}

[data-theme="dark"] .project-icon-graphic {
  filter: invert(1);
}

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-pill);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-primary {
  background-color: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

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

.project-platforms {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.platform-tag {
  font-weight: 600;
  color: var(--text-secondary);
}

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

.project-link-btn {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.project-link-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   "Now" Log Section
   ========================================================================== */
.now-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.now-timestamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.now-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.now-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.now-bullet {
  color: var(--primary);
  font-weight: 700;
  line-height: 1.6;
}

/* ==========================================================================
   Connect & Contact Section
   ========================================================================== */
.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-section-link {
  margin-top: 1rem;
}

.connect-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all var(--transition-smooth);
}

.connect-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.connect-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.connect-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.connect-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.connect-info {
  display: flex;
  flex-direction: column;
}

.connect-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.connect-handle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.copy-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.825rem;
  font-weight: 600;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.copy-action-btn:hover {
  background-color: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

.footer-clock {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--text-main);
  color: var(--text-inverse);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-toast);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 220ms ease, transform 220ms ease;
}

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

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
  .hero-profile-wrap {
    flex-direction: column-reverse;
    gap: 1.25rem;
  }
  
  .hero-avatar-large {
    width: 76px;
    height: 76px;
    border-radius: 18px;
  }
  
  .nav-links {
    display: none; /* Keep clean on small mobile */
  }
  
  .hero-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-section-link {
    width: auto;
  }
}
