/* ========= RESET ========= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', Arial, sans-serif;
}

/* ========= THEME TOKENS ========= */

:root {
  --nav-height: 58px;
  --bg: #EFFAFD;
  --text: #1f2933;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --brand: #4A8BDF;
  --link: #4A8BDF;
  --shadow: 0 10px 20px rgba(0,0,0,0.10);
}

/* ========= BODY BACKGROUND ========= */

body {
  padding-top: var(--nav-height);
  background:
    radial-gradient(circle at 12% 18%, rgba(74, 139, 223, 0.18), transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(80, 0, 0, 0.10), transparent 48%),
    radial-gradient(circle at 50% 92%, rgba(74, 139, 223, 0.12), transparent 55%),
    linear-gradient(
      120deg,
      #EFFAFD,
      #e4f4fc,
      #ddeefb,
      #EFFAFD
    );
  background-size: 100% 100%;
  color: var(--text);
  line-height: 1.7;
}

/* Noise texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

/* ========= GLOBAL LINK STYLE ========= */

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  opacity: 0.95;
}

/* ========= HEADERS / HERO ========= */

header {
  background-size: cover;
  background-position: center;
  background-color: #07070f;
  color: white;
  padding: 2rem 1rem 2.25rem;
  text-align: center;
}

header h1,
header h2,
header h3,
header p {
  color: white;
}

/* Header buttons */
header .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

header .btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

/* Button color variants */
.btn-white {
  background: black;
  color: white;
  border: 1px solid #ccc;
}

.btn-maroon {
  background: #500000;
  color: white;
  border: 1px solid #ccc;
}

.btn-blue-black {
  background: #000080;
  color: white;
  border: 1px solid #ccc;
}

.btn-black {
  background: black;
  color: white;
  border: 1px solid #ccc;
}

/* Header button layout */
.header-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ========= HERO AURORA BACKGROUND ========= */

.aurora-container {
  position: relative;
  overflow: hidden;
}

.aurora {
  position: absolute;
  inset: -40%;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(74, 139, 223, 0.35), transparent 45%),
    radial-gradient(circle at 75% 40%, rgba(80, 0, 0, 0.20), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(74, 139, 223, 0.15), transparent 55%);
  filter: blur(90px);
  opacity: 0.5;
  animation: auroraMove 48s ease-in-out infinite;
  pointer-events: none;
}

.aurora-container > *:not(.aurora):not(canvas) {
  position: relative;
  z-index: 5;
}

@keyframes auroraMove {
  0%   { transform: translate(0%, 0%); }
  25%  { transform: translate(6%, -5%); }
  50%  { transform: translate(10%, 4%); }
  75%  { transform: translate(3%, -8%); }
  100% { transform: translate(0%, 0%); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; }
}

/* ========= PAGE HEADER (SUB-PAGES) ========= */

header.page-header {
  background-color: #07070f;
  padding: 3.5rem 2rem 3.25rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

header.page-header h1 {
  animation: pageHeaderIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

header.page-header p {
  animation: pageHeaderIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.page-header-avatar {
  --accent-rgb: 74 139 223;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  border: 3px solid rgb(var(--accent-rgb));
  box-shadow: 0 0 0 5px rgb(var(--accent-rgb) / 18%), 0 12px 28px rgba(0, 0, 0, 0.35);
  animation: pageHeaderIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========= INTRO BLOCK (About / Philosophy sections) ========= */

.intro-block {
  --accent-rgb: 74 139 223;
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid rgb(var(--accent-rgb));
}

.intro-block .intro-quote {
  display: block;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: rgb(var(--accent-rgb) / 35%);
  margin-bottom: -0.6rem;
}

.intro-block h2 {
  margin-top: 0;
}

.intro-lead {
  font-weight: 600;
  color: #1f2933;
}

.intro-split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: stretch;
}

.intro-photo {
  flex-shrink: 0;
  height: 100%;
}

.intro-photo img {
  width: 220px;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

@media (max-width: 760px) {
  .intro-split {
    grid-template-columns: 1fr;
  }

  .intro-photo {
    order: -1;
    display: flex;
    justify-content: center;
  }

  .intro-photo img {
    width: 180px;
    height: 220px;
  }
}

@keyframes pageHeaderIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  header.page-header h1,
  header.page-header p {
    animation: none;
  }
  .project li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========= SPLIT HERO (INDEX PAGE) ========= */

header.hero-split {
  background-color: #07070f;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: 2rem 0;
  text-align: left;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  width: 100%;
}

.hero-greeting {
  font-size: 1.1rem;
  color: #9ca3af;
  font-weight: 400;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

header.hero-split h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 700;
  color: #bfdbfe;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.hero-role {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f3f4f6;
  margin-bottom: 0.4rem;
}

.hero-sub {
  color: #9ca3af;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-hero-primary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: #4A8BDF;
  color: white;
  border: 2px solid #4A8BDF;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-hero-primary:hover {
  background: #3a7acc;
  border-color: #3a7acc;
  transform: translateY(-2px);
  opacity: 1;
}

.btn-hero-outline {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: #e5e7eb;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn-hero-outline:hover {
  border-color: rgba(255, 255, 255, 0.65);
  color: white;
  transform: translateY(-2px);
  opacity: 1;
}

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

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.hero-social a:hover {
  background: rgba(74, 139, 223, 0.35);
  color: #bfdbfe;
  transform: translateY(-2px);
  opacity: 1;
}

.hero-photo-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-photo-wrap img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 16px;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

@media (max-width: 800px) {
  header.hero-split {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-photo-wrap {
    order: -1;
    justify-content: center;
  }

  .hero-photo-wrap img {
    max-width: 260px;
    height: auto;
  }

  .hero-cta,
  .hero-social {
    justify-content: center;
  }
}

/* ========= STICKY NAV ========= */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.nav-brand {
  font-family: 'DM Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #4A8BDF;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.nav-active {
  background: rgba(74, 139, 223, 0.10);
  color: #4A8BDF;
}

.nav-links a.nav-active {
  font-weight: 600;
}

@media (max-width: 600px) {
  .site-nav { padding: 0 1rem; }
  .nav-links { display: none; }
}

/* ========= SECTIONS (FLOATING PANELS) ========= */

section {
  position: relative;
  max-width: 900px;
  margin: 4rem auto;
  padding: 3rem 2.5rem;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.88),
      rgba(255,255,255,0.82)
    );
  border-radius: 16px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

section::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background:
    linear-gradient(
      120deg,
      rgba(74,139,223,0.15),
      rgba(255,255,255,0),
      rgba(80,0,0,0.10)
    );
  pointer-events: none;
  z-index: -1;
}

section::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 19px;
  background: linear-gradient(
    135deg,
    rgba(74, 139, 223, 0.55) 0%,
    transparent 45%,
    rgba(80, 0, 0, 0.35) 100%
  );
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: -2;
}

section:hover::after {
  opacity: 1;
}

section {
  transition: box-shadow 0.3s ease;
}

/* ========= HEADINGS ========= */

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #4A8BDF;
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #500000;
  margin-top: 0.5rem;
}

/* ========= PROJECT SECTIONS ========= */

.project {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.project h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.project em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project p {
  max-width: 750px;
  margin-bottom: 1rem;
}

.project ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.project li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.project li.li-visible {
  opacity: 1;
  transform: none;
}

.project li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #4A8BDF;
  font-size: 1.2rem;
  line-height: 1;
}

/* ========= GENERIC UL (for places not in .project) ========= */

ul {
  margin-left: 1.5rem;
}

/* ========= HOME PAGE CARDS / GRID ========= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  --accent-rgb: 74 139 223;
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: none;
  transition: box-shadow 0.25s ease, transform 0.08s ease, border-color 0.25s ease;
}

[data-accent="purple"] { --accent-rgb: 139 92 246; }
[data-accent="green"]  { --accent-rgb: 16 185 129; }
[data-accent="amber"]  { --accent-rgb: 245 158 11; }
[data-accent="rose"]   { --accent-rgb: 236 72 153; }
[data-accent="cyan"]   { --accent-rgb: 6 182 212; }
[data-accent="maroon"] { --accent-rgb: 80 0 0; }
[data-accent="orange"] { --accent-rgb: 249 115 22; }

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgb(var(--accent-rgb));
  opacity: 0.8;
  pointer-events: none;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(
    circle 180px at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgb(var(--accent-rgb) / 18%),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover {
  border-color: rgb(var(--accent-rgb) / 40%);
  box-shadow: 0 16px 30px -8px rgb(var(--accent-rgb) / 32%), 0 4px 10px rgba(0,0,0,0.06);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 40px;
  height: 40px;
  background: rgb(var(--accent-rgb) / 12%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: rgb(var(--accent-rgb));
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), background 0.25s ease;
}

.card:hover .card-icon {
  transform: scale(1.08) rotate(-4deg);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: #1f2933;
}

.card p {
  color: #4b5563;
  margin-bottom: 0.75rem;
}

.card a {
  color: rgb(var(--accent-rgb));
  text-decoration: none;
  font-weight: 600;
}

.card a:hover {
  text-decoration: underline;
}

/* Resume callout (experience/index.html) */
.resume-callout {
  background: var(--card);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.resume-callout-text {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: #374151;
}

.resume-section {
  text-align: left;
  background: #f9f9f9;
  color: #1f2933;
  padding: 2rem 1rem;
  border-radius: 8px;
  margin: 2rem auto;
  max-width: 900px;
}

/* ========= STAT ROW (education) ========= */

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.stat-item {
  flex: 1 1 140px;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  background: rgba(74, 139, 223, 0.08);
  border: 1px solid var(--border);
}

.stat-value {
  display: block;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #4A8BDF;
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ========= COURSE PILLS (education) ========= */

.course-pills {
  --accent-rgb: 74 139 223;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.course-pill {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  background: rgb(var(--accent-rgb) / 10%);
  color: rgb(var(--accent-rgb));
  border: 1px solid rgb(var(--accent-rgb) / 22%);
  transition: transform 0.15s ease, background 0.15s ease;
}

.course-pill:hover {
  background: rgb(var(--accent-rgb) / 18%);
  transform: translateY(-2px);
}

/* ========= CREDENTIAL CARDS (education) ========= */

.credential-grid {
  --accent-rgb: 74 139 223;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.credential-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px -14px rgb(var(--accent-rgb) / 32%);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.credential-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -14px rgb(var(--accent-rgb) / 42%);
}

.credential-card img {
  width: 100%;
  display: block;
  border-bottom: 3px solid rgb(var(--accent-rgb));
}

.credential-label {
  display: block;
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1f2933;
  text-align: center;
}

/* ========= CERTIFICATION CARDS ========= */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.cert-card {
  --accent-rgb: 74 139 223;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 16px 32px -18px rgb(var(--accent-rgb) / 30%);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -16px rgb(var(--accent-rgb) / 40%);
}

.cert-card-media {
  position: relative;
  overflow: hidden;
}

.cert-card-media::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgb(var(--accent-rgb));
  z-index: 1;
}

.cert-card-media img {
  display: block;
  width: 100%;
}

.cert-card-body {
  padding: 1.25rem 1.4rem 1.5rem;
}

.cert-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: #1f2933;
}

.cert-card-body p {
  color: #4b5563;
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
}

/* ========= TINKER CARDS (small, just-for-fun projects) ========= */

.tinker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.tinker-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 12px 26px -18px rgb(var(--accent-rgb) / 30%);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tinker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -16px rgb(var(--accent-rgb) / 38%);
}

.tinker-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f3f4f6;
}

.tinker-card-media::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgb(var(--accent-rgb));
  z-index: 1;
}

.tinker-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tinker-card-body {
  padding: 1.1rem 1.25rem 1.3rem;
}

.tinker-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  color: #1f2933;
}

.tinker-card-body p {
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.tinker-card .tech-pills {
  margin: 0 0 0.85rem;
}

.tinker-card .tech-pill {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
}

.tinker-card .case-study-link {
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
}

/* ========= IMAGES ========= */

.image-container {
  display: flex;
  gap: 1rem;
  overflow: hidden;
  border-radius: 8px;
  margin: 0.75rem 0;
  max-width: 100%;
}

.image-container img {
  flex: 1;
  border-radius: 6px;
  object-fit: contain;
  max-height: 300px;
  transition: transform 0.18s ease;
}

.image-container img:hover {
  transform: scale(1.05);
}

.image-container--stack {
  flex-direction: column;
  overflow: visible;
}

.image-container--stack img {
  width: 100%;
  max-height: none;
  height: auto;
}

.image-container--wrap {
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
}

.image-container--wrap img {
  flex: 0 1 calc(50% - 0.5rem);
}

/* ========= CASE STUDY LAYOUT (alternating project split) ========= */

.section-wide {
  max-width: 1100px;
}

.case-study-grid {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
  margin-top: 2rem;
}

.case-study {
  --accent-rgb: 74 139 223;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.75rem;
  align-items: center;
}

.case-study--reverse .case-study-media {
  order: 2;
}

.case-study--reverse .case-study-content {
  order: 1;
}

.case-study-media {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -16px rgb(var(--accent-rgb) / 32%), 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s ease;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-study-media::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgb(var(--accent-rgb));
  z-index: 1;
}

.case-study-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.85rem;
}

.case-study:hover .case-study-media {
  transform: translateY(-6px);
  box-shadow: 0 30px 55px -16px rgb(var(--accent-rgb) / 42%), 0 8px 20px rgba(0,0,0,0.08);
}

.case-study-media--dual {
  width: 100%;
  height: 100%;
  gap: 0.6rem;
  padding: 0.85rem;
}

.case-study-media--dual img {
  width: auto;
  height: 100%;
  max-height: none;
  object-fit: contain;
  flex: 1;
  border-radius: 8px;
  padding: 0;
}

.case-study-media--placeholder {
  width: 100%;
  height: 100%;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(160deg, rgb(var(--accent-rgb) / 14%), rgb(var(--accent-rgb) / 4%));
}

.case-study-media--placeholder svg {
  width: 44px;
  height: 44px;
  color: rgb(var(--accent-rgb) / 65%);
}

.case-study-media--placeholder span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

/* ========= TIMELINE (leadership) ========= */

.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.6rem;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  --accent-rgb: 74 139 223;
  position: relative;
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 3.5rem;
}

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

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb));
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px rgb(var(--accent-rgb) / 35%);
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 12%);
  color: rgb(var(--accent-rgb));
  margin-bottom: 0.6rem;
}

.timeline-body h3 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
  color: #1f2933;
}

.timeline-body .timeline-tags {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.timeline-body p {
  color: #4b5563;
  margin-bottom: 1rem;
  max-width: 640px;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.timeline-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.94rem;
  line-height: 1.6;
  color: #374151;
  max-width: 640px;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb));
}

.timeline-list li strong {
  color: #1f2933;
}

.timeline-photo {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.timeline-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-photo--logo {
  background: #fff;
}

.timeline-photo--logo img {
  object-fit: contain;
  padding: 1.1rem;
}

.timeline-photo--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(160deg, rgb(var(--accent-rgb) / 14%), rgb(var(--accent-rgb) / 4%));
  text-align: center;
  padding: 0.5rem;
}

.timeline-photo--placeholder svg {
  width: 28px;
  height: 28px;
  color: rgb(var(--accent-rgb) / 65%);
}

.timeline-photo--placeholder span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .timeline {
    padding-left: 1.75rem;
  }

  .timeline::before {
    left: 0.4rem;
  }

  .timeline-marker {
    left: -1.75rem;
  }

  .timeline-item {
    flex-direction: column;
  }

  .timeline-photo {
    width: 100%;
    height: 160px;
  }
}

.case-study-index {
  display: block;
  font-family: 'DM Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  color: rgb(var(--accent-rgb) / 22%);
  margin-bottom: -0.4rem;
}

.case-study-content h3 {
  font-size: 1.6rem;
  margin-bottom: 0.15rem;
  color: #1f2933;
}

.case-study-content p {
  color: #4b5563;
  max-width: 540px;
  margin-bottom: 1.1rem;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 1.1rem;
}

.tech-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 12%);
  color: rgb(var(--accent-rgb));
}

.case-study-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 540px;
}

.case-study-highlights li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #374151;
}

.case-study-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb));
}

.case-study-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 10%);
  color: rgb(var(--accent-rgb));
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.case-study-link:hover {
  background: rgb(var(--accent-rgb) / 20%);
  transform: translateX(2px);
  text-decoration: none;
}

.case-study-more {
  margin-top: 3.5rem;
  padding: 2rem;
  border: 1.5px dashed var(--border);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
}

.case-study-more h3 {
  color: #1f2933;
  margin-bottom: 0.5rem;
}

@media (max-width: 760px) {
  .case-study {
    grid-template-columns: 1fr;
  }

  .case-study-media,
  .case-study-content {
    order: initial !important;
  }
}

/* ========= CONTACT ========= */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: box-shadow 0.2s, transform 0.15s, color 0.15s;
}

.contact-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: #4A8BDF;
}

.contact-item svg {
  flex-shrink: 0;
  color: #4A8BDF;
}

/* ========= FOOTER ========= */

footer {
  padding: 1.5rem 2rem;
  background: #1f2933;
  color: white;
  margin-top: 2rem;
}

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

.footer-inner p {
  color: #9ca3af;
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: white;
}

#about {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* ========= HERO PARTICLES CANVAS ========= */

#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ========= TYPING CURSOR ========= */

.typing-cursor::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #4A8BDF;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ========= SCROLL REVEAL ========= */

[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="delay-1"] { transition-delay: 0.12s; }
[data-reveal="delay-2"] { transition-delay: 0.24s; }
[data-reveal="delay-3"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========= SCROLL PROGRESS BAR ========= */

.scroll-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4A8BDF 0%, #500000 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.08s linear;
  pointer-events: none;
}

/* ========= WORD REVEAL ========= */

.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.15;
}

.word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.word-inner.word-visible {
  transform: translateY(0);
}

/* ========= SKILL TAGS ========= */

.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.skill-group-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.6rem;
}

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

.skill-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: rgba(74, 139, 223, 0.08);
  border: 1px solid rgba(74, 139, 223, 0.22);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  opacity: 0;
  transform: scale(0.82) translateY(6px);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s, border-color 0.2s, color 0.2s;
}

.skill-tag.tag-visible {
  opacity: 1;
  transform: none;
}

.skill-tag:hover {
  background: rgba(74, 139, 223, 0.18);
  border-color: rgba(74, 139, 223, 0.5);
  color: #4A8BDF;
  cursor: default;
}

.skills-cta {
  margin-top: 1.5rem;
}

.skills-cta a {
  color: #4A8BDF;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.skills-cta a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .skill-tag {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .word-inner {
    transform: none;
    transition: none;
  }
}
