/* ============================================================
   FAZAL MAHMUD HASSAN — Personal Portfolio
   style.css — Clean, Modern, Minimal & Insightful Aesthetic
   Optimized for High Readability & Full Mobile/Tablet Responsiveness
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   CSS Custom Properties (Design System Tokens)
   ──────────────────────────────────────────────────────────── */
:root {
  /* === Core Palette (AMOLED Pure Black) === */
  --bg:              #000000;       /* True AMOLED Solid Black */
  --bg-secondary:    #060608;       /* Barely perceptible section separation */
  --surface:         #0C0C10;       /* Card backgrounds */
  --surface-hover:   #121216;       /* Card hover state */
  --surface-raised:  #161619;       /* Elevated surfaces & modals */

  /* === Text (Precision Contrast & Clarity) === */
  --text-primary:    #F4F4F9;       /* Crisp, comfortable white */
  --text-secondary:  #B0B0C8;       /* High-contrast body text */
  --text-tertiary:   #8A8AA4;       /* Metadata, captions, dates */
  --text-inverse:    #000000;       /* Dark text on light accent */

  /* === Accent: Electric Blue === */
  --accent:          #4A85FF;       /* Warm modern blue */
  --accent-hover:    #6FA2FF;       /* Hover state of accent */
  --accent-glow:     rgba(74, 133, 255, 0.18);
  --accent-light:    rgba(74, 133, 255, 0.10);
  --accent-border:   rgba(74, 133, 255, 0.30);

  /* === Gold: Awards & Recognition === */
  --gold:            #F5A623;
  --gold-light:      rgba(245, 166, 35, 0.10);
  --gold-border:     rgba(245, 166, 35, 0.25);

  /* === Green: Status Badge === */
  --green:           #34D399;
  --green-light:     rgba(52, 211, 153, 0.08);
  --green-border:    rgba(52, 211, 153, 0.22);

  /* === Borders === */
  --border:          rgba(255, 255, 255, 0.06);   /* Ultra-clean borders */
  --border-hover:    rgba(255, 255, 255, 0.12);   /* Subtle hover borders */
  --border-accent:   rgba(74, 133, 255, 0.35);

  /* === Typography === */
  --font-display:    'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:       'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:       'JetBrains Mono', 'Courier New', monospace;

  /* === Spacing Scale (8px Grid) === */
  --space-xs:        0.25rem;   /* 4px */
  --space-sm:        0.5rem;    /* 8px */
  --space-md:        1rem;      /* 16px */
  --space-lg:        1.5rem;    /* 24px */
  --space-xl:        2rem;      /* 32px */
  --space-2xl:       3rem;      /* 48px */
  --space-3xl:       4rem;      /* 64px */
  --space-4xl:       6rem;      /* 96px */

  /* === Layout Geometry === */
  --max-width:       1080px;
  --nav-height:      60px;
  --page-pad:        2rem;
  --card-radius:     8px;
  --card-radius-lg:  12px;

  /* === Transitions === */
  --ease:            cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:        cubic-bezier(0, 0, 0.2, 1);

  /* === Shadows === */
  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:       0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-modal:    0 24px 64px rgba(0, 0, 0, 0.65);

  /* === Layer Stacking (Z-Index Tokens) === */
  --z-canvas:        -1;
  --z-base:          1;
  --z-grain:         10;
  --z-nav:           100;
  --z-drawer:        200;
  --z-modal:         1000;
  --z-toast:         2000;
}

/* ────────────────────────────────────────────────────────────
   Light Mode Theme Overrides
   ──────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:              #FFFFFF;
  --bg-secondary:    #F6F6F8;
  --surface:         #F0F0F3;
  --surface-hover:   #E8E8EC;
  --surface-raised:  #FFFFFF;

  --text-primary:    #1A1A2E;
  --text-secondary:  #4A4A68;
  --text-tertiary:   #8888A0;
  --text-inverse:    #FFFFFF;

  --accent:          #3B6FE0;
  --accent-hover:    #2D5CC8;
  --accent-glow:     rgba(59, 111, 224, 0.15);
  --accent-light:    rgba(59, 111, 224, 0.08);
  --accent-border:   rgba(59, 111, 224, 0.25);

  --gold:            #D48A0A;
  --gold-light:      rgba(212, 138, 10, 0.08);
  --gold-border:     rgba(212, 138, 10, 0.20);

  --green:           #0F9B6E;
  --green-light:     rgba(15, 155, 110, 0.06);
  --green-border:    rgba(15, 155, 110, 0.18);

  --border:          rgba(0, 0, 0, 0.08);
  --border-hover:    rgba(0, 0, 0, 0.14);
  --border-accent:   rgba(59, 111, 224, 0.30);

  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md:       0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-modal:    0 24px 64px rgba(0, 0, 0, 0.15);

  color-scheme: light;
}

/* ────────────────────────────────────────────────────────────
   Typography / Font Pair Theme Overrides
   ──────────────────────────────────────────────────────────── */
:root[data-font-pair="sleek"] {
  --font-display:    'Outfit', system-ui, -apple-system, sans-serif;
  --font-body:       'Inter', system-ui, -apple-system, sans-serif;
}

:root[data-font-pair="elegant"] {
  --font-display:    'Playfair Display', Georgia, serif;
  --font-body:       'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

:root[data-font-pair="editorial"] {
  --font-display:    'Syne', system-ui, -apple-system, sans-serif;
  --font-body:       'Manrope', system-ui, -apple-system, sans-serif;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

/* Animated subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  width: 200%;
  height: 200%;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.025;
  animation: grainShift 8s steps(10) infinite;
}

[data-theme="light"] body::before {
  opacity: 0.015;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent-light);
  color: #FFFFFF;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ────────────────────────────────────────────────────────────
   Navigation
   ──────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: var(--z-nav);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.90);
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.96);
  border-bottom-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 1px;
  transition: color 0.15s;
}

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

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

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

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  transition: color 0.15s;
  padding: 0.35rem 0;
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Right-side nav group (Theme toggle + Mobile hamburger) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1rem;
  transition: background 0.15s, border-color 0.15s, transform 0.2s var(--ease);
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--surface);
  border-color: var(--border-hover);
}

.theme-toggle .theme-icon-sun {
  display: none;
}
.theme-toggle .theme-icon-moon {
  display: inline-block;
}

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

/* Mobile Nav Toggle Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.nav-toggle:hover {
  background: var(--surface);
  border-color: var(--border-hover);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.25s var(--ease);
  border-radius: 2px;
  transform-origin: center;
}

/* ────────────────────────────────────────────────────────────
   Page Layout & Sections
   ──────────────────────────────────────────────────────────── */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  padding-top: var(--nav-height);
  width: 100%;
}

.section {
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.section-label::before {
  content: '—';
  opacity: 0.6;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.section-subtext {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

/* ────────────────────────────────────────────────────────────
   Hero Section
   ──────────────────────────────────────────────────────────── */
.hero {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  word-break: break-word;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 1.5rem; /* Prevents text shifts when the typewriter changes text */
}

.hero-bio {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

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

/* ────────────────────────────────────────────────────────────
   Buttons
   ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  min-height: 40px;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

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

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

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
  background: transparent;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
  font-size: 0.875rem;
}

.btn-ghost:hover {
  color: var(--accent-hover);
}
.btn-ghost .arrow {
  transition: transform 0.2s var(--ease);
  display: inline-block;
}
.btn-ghost:hover .arrow {
  transform: translateX(3px);
}

/* ────────────────────────────────────────────────────────────
   Availability Status Badge
   ──────────────────────────────────────────────────────────── */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--green);
  margin-bottom: var(--space-md);
  width: fit-content;
}

.availability-badge.consulting {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #FBBF24;
}

.availability-badge.busy {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #F87171;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   1. Metric Counter Cards — RECTANGULAR ROW
   ──────────────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin: var(--space-xl) 0 var(--space-lg);
}

.metric-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.metric-number-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.05rem;
  flex-shrink: 0;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.metric-suffix {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

.metric-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.metric-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.metric-subtext {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}

/* ────────────────────────────────────────────────────────────
   2. Expertise Cards — 2-COLUMN ICON + DETAILS
   ──────────────────────────────────────────────────────────── */
.expertise-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.expertise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: start;
  gap: 1rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.expertise-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.expertise-card h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

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

/* ────────────────────────────────────────────────────────────
   3. Award Cards — SUBTLE GOLD ACCENT
   ──────────────────────────────────────────────────────────── */
.awards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: var(--card-radius);
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.award-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  border-left-color: var(--gold);
}

.award-icon-box {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.award-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.award-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.award-org {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.award-year-inline {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* ────────────────────────────────────────────────────────────
   4. Article Cards — TWO-COLUMN RECTANGULAR ROW
   ──────────────────────────────────────────────────────────── */
.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.article-card:hover {
  background: var(--surface-hover);
}

.article-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.1rem;
  flex-wrap: wrap;
}

.article-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.article-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.article-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 100px;
}

.article-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.article-tag {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding: 0.1rem 0.4rem;
}

.article-read-btn {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.15s, color 0.15s;
}

.article-card:hover .article-read-btn {
  gap: 0.45rem;
  color: var(--accent-hover);
}

/* ────────────────────────────────────────────────────────────
   5. Projects — TABLE-ROW GROUPED CONTAINER
   ──────────────────────────────────────────────────────────── */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--card-radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.project-card {
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--ease);
}

.project-card:last-child {
  border-bottom: none;
}

.project-card:hover {
  background: var(--surface-hover);
}

.project-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.project-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Tags / Pills */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

/* ────────────────────────────────────────────────────────────
   6. Experience Timeline
   ──────────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 1.75rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

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

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.05rem;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
  transition: transform 0.2s var(--ease);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  background: var(--accent-hover);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.timeline-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green-border);
  font-family: var(--font-mono);
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.timeline-company {
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: inline-block;
  transition: color 0.15s;
}

.timeline-company:hover {
  color: var(--accent-hover);
}

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

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

.timeline-bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  top: 0.15rem;
}

/* ────────────────────────────────────────────────────────────
   7. Education & Skills
   ──────────────────────────────────────────────────────────── */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.edu-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
}

.edu-degree {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.edu-institution {
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.edu-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.edu-gpa {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  text-align: right;
  white-space: nowrap;
}

.skill-group {
  margin-bottom: var(--space-lg);
}

.skill-group-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

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

.skill-tag {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: color 0.15s, border-color 0.15s;
  cursor: default;
}

.skill-tag:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ────────────────────────────────────────────────────────────
   8. Contact Section
   ──────────────────────────────────────────────────────────── */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
  align-items: start;
}

.contact-card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius-lg);
  padding: 1.75rem;
}

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

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

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 0.875rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}

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

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34D399;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #F87171;
}

.contact-details-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.contact-detail-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-detail-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.contact-detail-value.accent {
  color: var(--accent);
  font-weight: 600;
}

.contact-social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.contact-social-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.15s;
}

.contact-social-link:hover {
  color: var(--accent-hover);
}

/* ────────────────────────────────────────────────────────────
   9. Article Reading Modal
   ──────────────────────────────────────────────────────────── */
.portfolio-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 6, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

.portfolio-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.portfolio-modal-box {
  background: var(--surface-raised);
  border: 1px solid var(--border-hover);
  border-radius: var(--card-radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2rem;
  box-shadow: var(--shadow-modal);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s var(--ease);
}

.portfolio-modal-overlay.open .portfolio-modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.modal-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.modal-body p {
  margin-bottom: 1.15rem;
}

.modal-body h2, .about-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal-body h3, .about-body h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.modal-body ul, .modal-body ol, .about-body ul, .about-body ol {
  margin-bottom: 1.15rem;
  padding-left: 1.5rem;
}

.modal-body li, .about-body li {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}

.modal-body blockquote, .about-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1.25rem 0;
  background: var(--accent-light);
  color: var(--text-primary);
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

.modal-body code, .about-body code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--accent-hover);
}

.modal-body pre, .about-body pre {
  background: #0D0D12;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.15rem;
}

.modal-body pre code, .about-body pre code {
  background: transparent;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.modal-body a, .about-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.modal-body a:hover, .about-body a:hover {
  color: var(--accent-hover);
}

.modal-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ────────────────────────────────────────────────────────────
   10. Sub-Pages Hero & Bio
   ──────────────────────────────────────────────────────────── */
.page-hero {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.page-hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.65;
}

.about-lead {
  font-size: 1.125rem;
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.about-body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
}

.about-body p + p {
  margin-top: 1rem;
}

/* ────────────────────────────────────────────────────────────
   11. Footer
   ──────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--page-pad) 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.5rem;
}

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

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  max-width: 320px;
}

.footer-links-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-list a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links-list a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--page-pad);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ────────────────────────────────────────────────────────────
   Fade Animation
   ──────────────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ────────────────────────────────────────────────────────────
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   ──────────────────────────────────────────────────────────── */

/* Tablet Landscape & Medium Desktops (up to 1024px) */
@media (max-width: 1024px) {
  :root {
    --page-pad: 1.75rem;
  }
}

/* Tablet Portrait & Large Phablets (up to 880px) */
@media (max-width: 880px) {
  :root {
    --page-pad: 1.5rem;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .hero {
    padding-top: 4.5rem;
    padding-bottom: 3rem;
  }

  /* Mobile Navigation Drawer */
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem var(--page-pad) 2rem;
    border-bottom: 1px solid var(--border-hover);
    gap: 0.5rem;
    z-index: var(--z-drawer);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    animation: drawerSlideDown 0.2s var(--ease);
  }

  @keyframes drawerSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav-links.open a {
    font-size: 1.125rem;
    padding: 0.75rem 0;
    display: block;
    width: 100%;
  }

  .nav-links.open a.active::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Metrics Grid (2x2) */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Articles Grid (Stacked) */
  .article-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .article-card-right {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
  }

  .article-tags {
    justify-content: flex-start;
  }

  /* Project Cards (Stacked) */
  .project-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .project-card-right {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
  }

  /* Contact Section */
  .contact-container {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-inner > div:first-child {
    grid-column: 1 / -1;
  }
}

/* Small Tablets & Mobile Phones (up to 640px) */
@media (max-width: 640px) {
  :root {
    --page-pad: 1.25rem;
  }

  .hero-bio {
    max-width: 100%;
  }

  .timeline {
    padding-left: 1.25rem;
  }

  .timeline-dot {
    left: -1.55rem;
    width: 7px;
    height: 7px;
  }

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

  .edu-gpa {
    text-align: left;
    align-self: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .portfolio-modal-box {
    padding: 1.5rem 1.25rem;
    border-radius: 10px;
  }
}

/* Extra Small Phones (up to 480px) */
@media (max-width: 480px) {
  :root {
    --page-pad: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .metric-card {
    padding: 1rem;
  }

  .metric-val {
    font-size: 1.65rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .contact-card-box {
    padding: 1.25rem 1rem;
  }

  .expertise-card,
  .award-card,
  .article-card,
  .project-card,
  .edu-item {
    padding: 1rem;
  }

  .article-card-right,
  .project-card-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ────────────────────────────────────────────────────────────
   Accessibility: Reduced Motion Preference
   ──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body::before {
    animation: none !important;
  }

  .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }
}
