/* ================================================================
   KHUBAIB PORTFOLIO — STYLESHEET
   Architecture: Base → Tokens → Layout → Components → Pages → Utility
   
   Brand Colors:
     --blue:     #0140DD (Primary 60%)
     --lavender: #D7D6E9 (Secondary)
     --green:    #32994A (Accent)
================================================================ */


/* ----------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (Design Tokens)
---------------------------------------------------------------- */
:root {
  /* Brand palette */
  --blue:        #0140DD;
  --blue-dark:   #0132b0;
  --blue-light:  #e8eefb;
  --lavender:    #D7D6E9;
  --lavender-mid:#b8b6d4;
  --green:       #32994A;
  --green-dark:  #247a39;
  --green-light: #e8f5eb;

  /* Neutral palette */
  --white:       #ffffff;
  --off-white:   #f7f7f9;
  --grey-100:    #f0f0f4;
  --grey-200:    #e2e2e8;
  --grey-400:    #9898a8;
  --grey-600:    #555566;
  --black:       #0a0a0f;

  /* Typography */
  --font-body:   'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale (8pt grid) */
  --space-2:  0.125rem;
  --space-4:  0.25rem;
  --space-8:  0.5rem;
  --space-12: 0.75rem;
  --space-16: 1rem;
  --space-24: 1.5rem;
  --space-32: 2rem;
  --space-48: 3rem;
  --space-64: 4rem;
  --space-96: 6rem;
  --space-128:8rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 70px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);
  --shadow-blue: 0 8px 32px rgba(1,64,221,0.18);

  /* Border radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;
}


/* ----------------------------------------------------------------
   1b. DARK MODE TOKENS
   Applied when <html> has the class "dark".
   Every color in the site reads from these variables,
   so toggling the class flips the entire palette at once.
---------------------------------------------------------------- */
html.dark {
  --white:     #0d0d12;
  --off-white: #13131a;
  --grey-100:  #1c1c26;
  --grey-200:  #26263a;
  --grey-400:  #707088;
  --grey-600:  #a0a0b8;
  --black:     #f0f0f8;

  /* Slightly brighter blue so it pops on dark backgrounds */
  --blue:        #3d6ef5;
  --blue-dark:   #5a85ff;
  --blue-light:  #111a3a;

  --green:       #3db858;
  --green-dark:  #5dd67a;
  --green-light: #0d2414;

  --lavender:    #1e1e2e;
  --lavender-mid:#35354d;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.5);
  --shadow-blue: 0 8px 32px rgba(61,110,245,0.25);
}

/* Smooth palette transition on toggle */
body,
.nav,
.stat-card,
.skill-card,
.project-card,
.testimonial-card,
.contact__form input,
.contact__form textarea,
.contact__form select,
.video-modal__box,
.video-modal__header {
  transition:
    background-color var(--duration-slow) var(--ease-out),
    border-color var(--duration-slow) var(--ease-out),
    color var(--duration-slow) var(--ease-out);
}

/* ----------------------------------------------------------------
   2. RESET & BASE
---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

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

input, textarea, select {
  font: inherit;
}

::selection {
  background: var(--blue);
  color: var(--white);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}


/* ----------------------------------------------------------------
   3. TYPOGRAPHY
---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--black);
}

h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: 1.25rem; }

p { line-height: 1.7; color: var(--grey-600); }

em { font-style: italic; }

strong { font-weight: 600; color: var(--black); }

.dot {
  color: var(--green);
  display: inline-block;
}


/* ----------------------------------------------------------------
   4. LAYOUT UTILITIES
---------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-24);
}

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

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--space-16);
}

.section-title {
  margin-bottom: var(--space-48);
}


/* ----------------------------------------------------------------
   5. SCROLL ANIMATIONS
---------------------------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }


/* ----------------------------------------------------------------
   6. BUTTONS
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(1,64,221,0.25);
}
.btn--primary:hover {
  background: var(--blue-dark);
  box-shadow: var(--shadow-blue);
}

.btn--ghost {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn--ghost:hover {
  background: var(--blue-light);
}

.btn--small {
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
}

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


/* ----------------------------------------------------------------
   7. TAGS
---------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--grey-100);
  color: var(--grey-600);
}

.tag--blue { background: var(--blue-light); color: var(--blue); }
.tag--green { background: var(--green-light); color: var(--green-dark); }


/* ----------------------------------------------------------------
   8. NAVIGATION
---------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.nav.scrolled {
  border-color: var(--grey-200);
  box-shadow: var(--shadow-sm);
}

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

.nav__logo {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--black);
  transition: opacity var(--duration-fast);
}
.nav__logo:hover { opacity: 0.7; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-32);
}

.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--grey-600);
  transition: color var(--duration-fast);
}
.nav__links a:hover { color: var(--black); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--blue);
  color: var(--white) !important;
  font-weight: 600 !important;
  transition: background var(--duration-base) !important;
}
.nav__cta:hover { background: var(--blue-dark) !important; }


/* ----------------------------------------------------------------
   CASE STUDY MODAL
---------------------------------------------------------------- */
.case-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.case-modal.open { display: flex; }
.case-modal__backdrop {
  position: absolute; inset: 0; background: rgba(10,10,15,0.55);
}
.case-modal__box {
  position: relative;
  width: min(1000px, 96%);
  max-height: 90vh;
  overflow: auto;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-32);
  z-index: 10;
}
.case-modal__header { display:flex; align-items:center; justify-content:space-between; gap:var(--space-16); margin-bottom:var(--space-16); }
.case-modal__niche { display:inline-block; font-size:0.875rem; font-weight:700; color:var(--blue); margin-right:var(--space-12); }
.case-modal__tools .tag { margin-right:var(--space-8); margin-bottom:var(--space-8); }
.case-modal__title { margin-bottom:var(--space-12); }
.case-modal__excerpt { color: var(--grey-600); margin-bottom:var(--space-16); }
.case-modal__hero { margin-bottom: var(--space-20); overflow: hidden; border-radius: var(--radius-md); }
.case-modal__hero img { width: 100%; height: auto; display: block; object-fit: cover; }
.case-highlights { display:grid; grid-template-columns: 1fr; gap:var(--space-12); margin-bottom:var(--space-16); }
.case-highlight { padding:var(--space-16); border-radius:var(--radius-sm); }
.case-highlight--problem { background: var(--grey-100); color: var(--grey-600); }
.case-highlight--solution { background: var(--blue-light); color: var(--blue); }
.case-highlight--result { background: var(--green-light); color: var(--green-dark); }
.case-modal__embed iframe { width:100%; height:420px; border-radius:8px; margin-bottom:var(--space-16); }
.case-modal__video-placeholder { width:100%; padding:var(--space-16); border-radius:var(--radius-sm); background: var(--grey-100); color: var(--grey-600); text-align:center; font-weight:600; margin-bottom:var(--space-16); }
.case-modal__cta { margin-top: var(--space-16); display:flex; flex-direction:column; align-items:center; text-align:center; gap:var(--space-12); }
.case-modal__cta .btn { width: auto; min-width: 180px; }
.case-modal__cta .btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  color: var(--grey-400);
  border-color: var(--grey-200);
}
.case-modal__cta p { max-width: 640px; }


/* Dark mode toggle button */
.nav__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--grey-200);
  color: var(--grey-600);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
  flex-shrink: 0;
}
.nav__theme:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* Show the right icon based on mode */
.nav__theme .icon-moon { display: block; }
.nav__theme .icon-sun  { display: none; }
html.dark .nav__theme .icon-moon { display: none; }
html.dark .nav__theme .icon-sun  { display: block; }

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-8);
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-base);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  padding: var(--space-24);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--duration-slow) var(--ease-out),
              opacity var(--duration-slow) var(--ease-out);
}
.nav__mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav__mobile ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.nav__mobile a {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--black);
  transition: color var(--duration-fast);
}
.nav__mobile a:hover { color: var(--blue); }


/* ----------------------------------------------------------------
   9. HERO
---------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-64));
  padding-bottom: var(--space-96);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(215,214,233,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(1,64,221,0.06) 0%, transparent 70%),
    var(--white);
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-24);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-64);
  align-items: center;
}

.hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--space-16);
}

.hero__name {
  margin-bottom: var(--space-16);
  background: linear-gradient(135deg, var(--black) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--grey-600);
  margin-bottom: var(--space-24);
  line-height: 1.5;
}

.hero__tagline strong { color: var(--black); font-weight: 600; }

.hero__bio {
  max-width: 520px;
  font-size: 1.0625rem;
  margin-bottom: var(--space-40);
  color: var(--grey-600);
}

.hero__actions {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
  margin-top: var(--space-32);
}

/* Hero image */
.hero__image { position: relative; }

.hero__image-wrap {
  position: relative;
  width: 340px;
  height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--lavender);
  box-shadow: var(--shadow-lg);
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Placeholder when no image is uploaded */
.hero__image-wrap--placeholder::before {
  content: 'Add your photo\A(see README.md)';
  white-space: pre;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lavender-mid);
  text-align: center;
  padding: var(--space-24);
}
.hero__image-wrap--placeholder img { display: none; }

.hero__ring {
  position: absolute;
  inset: -12px;
  border-radius: calc(var(--radius-xl) + 12px);
  border: 2px solid rgba(1,64,221,0.15);
  pointer-events: none;
}

/* Floating tool badges */
.hero__badges {
  max-width: var(--max-width);
  margin: var(--space-48) auto 0;
  padding: 0 var(--space-24);
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
  pointer-events: none;
  user-select: none;
}

.badge {
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--grey-200);
  color: var(--grey-600);
  background: var(--white);
  animation: float 4s ease-in-out infinite;
}

.badge--1 { animation-delay: 0s; }
.badge--2 { animation-delay: 0.8s; }
.badge--3 { animation-delay: 1.6s; }
.badge--4 { animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}


/* ----------------------------------------------------------------
   10. ABOUT
---------------------------------------------------------------- */
.about { background: var(--off-white); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-64);
  align-items: start;
}

.about__content .section-title { margin-bottom: var(--space-24); }

.about__text {
  margin-bottom: var(--space-16);
  font-size: 1.0625rem;
}

/* If you want to make the Download Resume button visible remove the comment tags below also delete the display: none; */
/* .about__content .btn { margin-top: var(--space-32); } */
.about__content a.btn--primary {
  display: none;
}

/* Stat cards */
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card--accent { background: var(--blue); border-color: var(--blue); }
.stat-card--accent .stat-card__num,
.stat-card--accent .stat-card__label { color: var(--white); }

.stat-card__num {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--blue);
  line-height: 1;
}

.stat-card--accent .stat-card__num { color: var(--white); }

.stat-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--grey-400);
  line-height: 1.3;
}


/* ----------------------------------------------------------------
   11. SKILLS
---------------------------------------------------------------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-16);
}

.skill-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: var(--space-32) var(--space-24);
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.skill-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
  transform: translateY(-4px);
}

.skill-card--wide {
  grid-column: 1 / -1;
}

.skill-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-card__icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.skill-card__emoji { font-size: 2.25rem; line-height: 1; }

.skill-card h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-8);
}

.skill-card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-16);
}


/* ----------------------------------------------------------------
   12. PROJECTS
---------------------------------------------------------------- */
.projects { background: var(--off-white); }

.projects__subtitle {
  margin-top: -2.5rem;
  margin-bottom: var(--space-48);
  font-size: 1.0625rem;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-24);
}

.project-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

/* Project image */
.project-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--lavender);
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.project-card:hover .project-card__image img { transform: scale(1.04); }

/* Placeholder when no image uploaded */
.project-card__image--placeholder::before {
  content: 'Add project screenshot\A(see README.md)';
  white-space: pre;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lavender-mid);
  text-align: center;
  padding: var(--space-16);
}
.project-card__image--placeholder img { display: none; }

/* Project body */
.project-card__body {
  padding: var(--space-24);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.project-card__tags { display: flex; gap: var(--space-8); flex-wrap: wrap; }

.project-card__title { font-size: 1.125rem; }

/* Case study rows */
.project-card__case {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  border-top: 1px solid var(--grey-100);
  padding-top: var(--space-16);
}

.case-row { display: flex; flex-direction: column; gap: var(--space-4); }

.case-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-400);
}

.case-row p { font-size: 0.875rem; line-height: 1.55; }

.case-row--result p { color: var(--green-dark); }
.case-row--result .case-label { color: var(--green); }

/* More projects */
.projects__more {
  margin-top: var(--space-64);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}
.projects__more p { font-size: 1.0625rem; }


/* ----------------------------------------------------------------
   13. TESTIMONIALS
---------------------------------------------------------------- */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-24);
}

.testimonial-card {
  background: var(--off-white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: var(--space-32);
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.testimonial-card:hover { box-shadow: var(--shadow-md); }

.testimonial-card--featured {
  background: var(--blue);
  border-color: var(--blue);
}
.testimonial-card--featured .testimonial-card__quote,
.testimonial-card--featured strong,
.testimonial-card--featured span { color: var(--white) !important; }

.testimonial-card__quote {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--black);
  font-style: italic;
  flex: 1;
}

.testimonial-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--lavender);
}

.testimonial-card__footer strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--black);
}

.testimonial-card__footer span {
  font-size: 0.8125rem;
  color: var(--grey-400);
}


/* ----------------------------------------------------------------
   14. CREDENTIALS
---------------------------------------------------------------- */
.credentials { background: var(--off-white); }

.credentials__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-64);
}

.credentials__col .section-label { margin-bottom: var(--space-24); }

.cred-list { display: flex; flex-direction: column; gap: var(--space-32); }

.cred-item {
  padding-left: var(--space-16);
  border-left: 2px solid var(--grey-200);
  transition: border-color var(--duration-base);
}
.cred-item:hover { border-color: var(--blue); }

.cred-item__year {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--space-4);
}

.cred-item__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.cred-item__sub {
  font-size: 0.9rem;
  color: var(--grey-400);
}


/* ----------------------------------------------------------------
   15. CONTACT
---------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-96);
  align-items: start;
}

.contact__info .section-title { margin-bottom: var(--space-24); }

.contact__text {
  font-size: 1.0625rem;
  margin-bottom: var(--space-40);
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.contact__link {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  font-size: 1rem;
  font-weight: 500;
  color: var(--grey-600);
  transition: color var(--duration-fast);
}
.contact__link:hover { color: var(--blue); }

.contact__link--static { cursor: default; }
.contact__link--static:hover { color: var(--grey-600); }

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8125rem 1rem;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  color: var(--black);
  background: var(--white);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1,64,221,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--grey-400); }

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

/* Select arrow */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239898a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-success {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green);
  text-align: center;
  min-height: 1.5rem;
}


/* ----------------------------------------------------------------
   16. FOOTER
---------------------------------------------------------------- */
.footer {
  background: var(--black);
  padding: var(--space-48) 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-16);
}

.footer__brand {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
}

.footer__copy {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.4);
}

.footer__nav {
  display: flex;
  gap: var(--space-24);
}

.footer__nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--duration-fast);
}
.footer__nav a:hover { color: var(--white); }


/* ----------------------------------------------------------------
   17. VIDEO WALKTHROUGH BUTTON
---------------------------------------------------------------- */
.btn-video {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-8);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-light);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  font-family: var(--font-body);
}

.btn-video svg { flex-shrink: 0; }

.btn-video:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-video:active { transform: translateY(0); }


/* ----------------------------------------------------------------
   18. VIDEO MODAL
---------------------------------------------------------------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

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

/* Dark backdrop */
.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

/* Modal box */
.video-modal__box {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  width: 100%;
  max-width: 860px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.3);
  transform: scale(0.95) translateY(16px);
  transition: transform var(--duration-slow) var(--ease-out);
}

.video-modal.open .video-modal__box {
  transform: scale(1) translateY(0);
}

/* Modal header */
.video-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-16) var(--space-24);
  border-bottom: 1px solid var(--grey-200);
}

.video-modal__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--black);
}

.video-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--grey-400);
  background: var(--grey-100);
  transition: background var(--duration-fast), color var(--duration-fast);
  flex-shrink: 0;
}
.video-modal__close:hover { background: var(--grey-200); color: var(--black); }

/* 16:9 embed container */
.video-modal__embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  background: var(--black);
}

.video-modal__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}


html.dark .hero {
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(30,30,46,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(61,110,245,0.08) 0%, transparent 70%),
    var(--white);
}

html.dark .nav {
  background: rgba(13, 13, 18, 0.85);
}

html.dark .stat-card--accent {
  background: var(--blue);
  border-color: var(--blue);
}

html.dark .testimonial-card--featured {
  background: var(--blue);
  border-color: var(--blue);
}

/* ----------------------------------------------------------------
   19. RESPONSIVE
---------------------------------------------------------------- */

/* Tablet: ≤ 1024px */
@media (max-width: 1024px) {
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .skills__grid .skill-card--wide { grid-column: 1 / -1; }

  .projects__grid { grid-template-columns: repeat(2, 1fr); }

  .hero__image-wrap { width: 280px; height: 340px; }
}

/* Medium: ≤ 900px */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: repeat(4, 1fr); }

  .testimonials__grid { grid-template-columns: 1fr 1fr; }
  .credentials__grid { grid-template-columns: 1fr; gap: var(--space-48); }

  .contact__grid { grid-template-columns: 1fr; gap: var(--space-48); }
}

/* Mobile: ≤ 768px */
@media (max-width: 768px) {
  :root { --space-96: 4rem; }

  /* Nav */
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__mobile { display: block; }

  /* Hero */
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__image { order: -1; justify-self: center; }
  .hero__image-wrap { width: 220px; height: 270px; }
  .hero__bio { margin: 0 auto; }
  .hero__actions { justify-content: center; }
  .hero__badges { justify-content: center; }

  /* About stats */
  .about__stats { grid-template-columns: 1fr 1fr; }

  /* Skills */
  .skills__grid { grid-template-columns: 1fr 1fr; }

  /* Projects */
  .projects__grid { grid-template-columns: 1fr; }

  /* Testimonials */
  .testimonials__grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Small mobile: ≤ 480px */
@media (max-width: 480px) {
  .skills__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 3rem; }
}
