/* Khondokar Yuvraz — Portfolio Stylesheet
   Royal Red / Cadmium Orange theme with hover glows */

:root {
  --ink: #232019;
  --paper: #ece7dd;
  --paper-raised: #e2dcce;
  --stone: #8c8574;
  --slate: #514c42;
  --brass: #6e1423;
  --brass-light: #8f2233;
  --line: rgba(35, 32, 25, 0.14);
  --line-strong: rgba(35, 32, 25, 0.3);
  --bg: var(--paper);
  --bg-raised: var(--paper-raised);
  --text: var(--ink);
  --text-soft: var(--slate);
  --text-mute: var(--stone);
  --text-invert: var(--paper);
}
[data-theme="dark"] {
  --ink: #ece6d9;
  --paper: #1a1812;
  --paper-raised: #221f17;
  --stone: #9c9584;
  --slate: #c6bfaf;
  --brass: #e2751a;
  --brass-light: #f0924b;
  --line: rgba(236, 230, 217, 0.12);
  --line-strong: rgba(236, 230, 217, 0.26);
  --bg: var(--paper);
  --bg-raised: var(--paper-raised);
  --text: var(--ink);
  --text-soft: var(--slate);
  --text-mute: var(--stone);
  --text-invert: #14181f;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.35s ease,
    color 0.35s ease;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 720px) {
  .wrap {
    padding: 0 20px;
  }
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
.mono {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.01em;
}
.label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}
.section-num {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text-mute);
  font-size: 13px;
}
section {
  padding: 96px 0;
}
@media (max-width: 720px) {
  section {
    padding: 56px 0;
  }
  .section-head {
    margin-bottom: 32px;
    padding-bottom: 14px;
  }
}

/* ---------- Nav ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
@media (max-width: 720px) {
  .nav-inner {
    padding: 0 20px;
  }
}
.brand {
  font-family: "Fraunces", serif;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
nav.links {
  display: flex;
  gap: 30px;
  align-items: center;
}
nav.links a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--text-soft);
  position: relative;
  padding: 4px 0;
}
nav.links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
nav.links a:hover {
  color: var(--text);
}
nav.links a:hover::after {
  transform: scaleX(1);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--brass);
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid var(--ink);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
  cursor: pointer;
}
[data-theme="dark"] .cta-btn {
  background: var(--brass);
  color: #14181f;
  border-color: var(--brass);
}
.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -12px
    color-mix(in srgb, var(--brass) 65%, transparent);
}
.cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  padding: 11px 21px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.cta-ghost:hover {
  border-color: var(--brass);
  box-shadow: 0 0 18px -6px color-mix(in srgb, var(--brass) 40%, transparent);
}
.nav-cta {
  display: none;
}
@media (min-width: 860px) {
  .nav-cta {
    display: inline-flex;
  }
}
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}
@media (max-width: 860px) {
  nav.links {
    display: none;
  }
  .menu-btn {
    display: block;
  }
}
.mobile-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding: 18px 20px 26px;
  background: var(--bg);
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  padding: 12px 0;
  text-decoration: none;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  transform: translateY(-2rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero {
    padding: 44px 0 64px;
  }
  .hero-grid {
    transform: none;
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  flex-shrink: 0;
}
.kicker span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--text-mute);
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.12;
  font-weight: 500;
  max-width: 760px;
}
.hero h1 em {
  font-style: italic;
  color: var(--brass);
  font-weight: 500;
}
.hero p.sub {
  margin-top: 24px;
  max-width: 640px;
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  width: 100%;
}
@media (min-width: 640px) {
  .hero-ctas {
    width: auto;
    flex-wrap: nowrap;
  }
  .hero-ctas .cta-btn,
  .hero-ctas .cta-ghost {
    white-space: nowrap;
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media (max-width: 639px) {
  .hero-ctas .cta-btn,
  .hero-ctas .cta-ghost {
    width: 100%;
  }
}
.stats-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 14px;
}
@media (max-width: 540px) {
  .stats-wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Hero right — ledger card */
.ledger-card {
  position: relative;
  width: min(100%, 450px);
  justify-self: end;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 24px 24px;
  transition:
    box-shadow 0.5s ease,
    transform 0.5s ease;
}
.ledger-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -30px
    color-mix(in srgb, var(--brass) 45%, transparent);
}
.stat-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.stat-row:last-of-type {
  border-bottom: none;
}
.stat-row .num {
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 3.5vw, 42px);
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.stat-row .num .accent {
  color: var(--brass);
}
.stat-row .desc {
  font-size: 13px;
  color: var(--text-soft);
  max-width: 220px;
  line-height: 1.4;
}
.ledger-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ledger-foot .label {
  font-size: 11.5px;
}
.ledger-foot .pulse {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f9d63;
  box-shadow: 0 0 0 0 rgba(63, 157, 99, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(63, 157, 99, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(63, 157, 99, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(63, 157, 99, 0);
  }
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
}
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.about-lede {
  font-family: "Fraunces", serif;
  font-size: clamp(20px, 2.6vw, 28px);
  text-align: left;
  line-height: 1.45;
  font-weight: 400;
}
.about-body p {
  color: var(--text-soft);
  margin: 0 0 16px;
  max-width: 60ch;
  text-align: left;
}
.philosophy-list {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}
@media (max-width: 860px) {
  .philosophy-list {
    grid-template-columns: 1fr;
  }
}
.phil-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.phil-item .m {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(2.2rem, 3vw, 3rem);
  color: var(--brass);
  padding-top: 3px;
  white-space: nowrap;
}
.phil-item .t {
  font-size: 15px;
  color: var(--text-soft);
}
.phil-item .t b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
}
.t-item {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--line);
  padding-bottom: 56px;
}
.t-item:last-child {
  padding-bottom: 0;
}
.t-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--brass);
  transition:
    box-shadow 0.35s ease,
    transform 0.35s ease;
}
.t-item:hover::before {
  transform: scale(1.35);
  box-shadow:
    0 0 0 1px var(--brass),
    0 0 14px 3px color-mix(in srgb, var(--brass) 55%, transparent);
}
.t-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.t-head h3 {
  font-size: clamp(19px, 2.5vw, 22px);
}
.t-head .co {
  color: var(--brass);
  font-weight: 500;
}
.t-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--text-mute);
  white-space: nowrap;
  padding-top: 4px;
}
.t-item ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
}
.t-item li {
  margin-bottom: 9px;
  padding-left: 4px;
}
.t-item li::marker {
  color: var(--brass);
}
.t-metrics {
  display: flex;
  gap: 28px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.t-metric .v {
  font-family: "Fraunces", serif;
  font-size: 22px;
  color: var(--text);
}
.t-metric .l {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
}

/* ---------- Brand marquee ---------- */
.marquee-wrap {
  overflow: hidden;
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scrollX 18s linear infinite;
}
@keyframes scrollX {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.brand-chip {
  font-family: "Fraunces", serif;
  font-size: 21px;
  color: var(--text-soft);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  gap: 10px;
  letter-spacing: 0.01em;
  transition: color 0.3s ease;
}
.brand-chip:hover {
  color: var(--brass);
}
.brand-chip img {
  display: block;
  width: 96px;
  height: 40px;
  max-width: 96px;
  flex: 0 0 96px;
  object-fit: contain;
}

/* ---------- Projects ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (max-width: 1024px) {
  .proj-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .proj-grid {
    grid-template-columns: 1fr;
    border-left: none;
    border-right: none;
  }
}
.proj-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition:
    background 0.25s ease,
    box-shadow 0.4s ease,
    transform 0.35s ease;
}
@media (max-width: 640px) {
  .proj-card {
    padding: 24px 18px;
    border-left: 1px solid var(--line);
  }
}
.proj-card:hover {
  background: var(--bg-raised);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px var(--brass),
    0 20px 40px -24px color-mix(in srgb, var(--brass) 55%, transparent);
}
.proj-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}
.proj-card p {
  color: var(--text-soft);
  font-size: 14.5px;
  margin: 0;
}
.proj-card .out {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--text-mute);
}

/* ---------- Services ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 6px;
}
@media (max-width: 990px) {
  .svc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .svc-grid {
    grid-template-columns: 1fr;
  }
}
.svc-card {
  background: var(--bg);
  padding: 38px 34px;
  position: relative;
  overflow: hidden;
  transition:
    background 0.3s ease,
    box-shadow 0.4s ease;
}
@media (max-width: 640px) {
  .svc-card {
    padding: 26px 20px;
  }
}
.svc-card:hover {
  background: var(--bg-raised);
  box-shadow:
    inset 0 0 0 1px var(--brass),
    0 0 34px -12px color-mix(in srgb, var(--brass) 45%, transparent);
}
.svc-card .ic {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  padding: 10px;
  box-sizing: border-box;
  color: var(--brass);
  background: color-mix(in srgb, var(--brass) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brass) 28%, transparent);
  border-radius: 10px;
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}
.svc-card:hover .ic {
  transform: translateY(-3px) scale(1.05);
  background: color-mix(in srgb, var(--brass) 18%, transparent);
  border-color: color-mix(in srgb, var(--brass) 55%, transparent);
}
.svc-card h3 {
  font-size: 19.5px;
  margin-bottom: 10px;
}
.svc-card p {
  color: var(--text-soft);
  font-size: 14.5px;
  margin: 0;
  max-width: 38ch;
}

/* ---------- Certifications & Badges ---------- */
.cert-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.cert-subhead--first {
  margin-top: 44px;
}
.cert-subhead h3 {
  font-size: 21px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
@media (max-width: 480px) {
  .badge-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}
.badge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raised);
  text-decoration: none;
  color: var(--text);
  transition:
    transform 0.3s ease,
    box-shadow 0.35s ease,
    border-color 0.3s ease;
}
.badge-tile:hover {
  transform: translateY(-5px);
  border-color: var(--brass);
  box-shadow: 0 22px 44px -22px
    color-mix(in srgb, var(--brass) 60%, transparent);
}
.badge-media {
  width: 100px;
  height: 100px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.badge-tile h4 {
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 6px;
}
.badge-tile .cert-meta {
  font-size: 11.5px;
}
.badge-tile .cert-link {
  margin-top: 10px;
}
.badge-tile--template {
  opacity: 0.8;
}

/* Certificates */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 32px;
}
@media (max-width: 1024px) {
  .cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 580px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}
.cert-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-raised);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.35s ease,
    border-color 0.3s ease;
}
.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--brass);
  box-shadow: 0 14px 28px -20px
    color-mix(in srgb, var(--brass) 45%, transparent);
}
.cert-media {
  width: 100%;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cert-media img {
  width: 100%;
  height: 100%;
  padding-top: 6px;
  object-fit: contain;
  display: block;
}
.cert-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cert-body h4 {
  font-size: 15px;
  line-height: 1.35;
}
.cert-meta {
  font-size: 12px;
  color: var(--brass);
  font-family: "IBM Plex Mono", monospace;
}
.cert-body p {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}
.cert-link {
  margin-top: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--text-mute);
  transition: color 0.25s ease;
}
.cert-card:hover .cert-link {
  color: var(--brass);
}

/* Leadership & involvement */
.leadership-strip {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.leadership-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.leadership-list li {
  font-size: 14.5px;
  color: var(--text-soft);
  padding-left: 18px;
  position: relative;
}
.leadership-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--brass);
}
.leadership-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Testimonials ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 50px;
}
@media (max-width: 900px) {
  .quote-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.quote-card {
  border-top: 2px solid var(--brass);
  padding-top: 22px;
  transition: transform 0.3s ease;
}
.quote-card:hover {
  transform: translateY(-3px);
}
.quote-card p {
  font-family: "Fraunces", serif;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 22px;
  text-align: left;
}
.quote-who {
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quote-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
}
.quote-who .n {
  font-weight: 600;
}
.quote-who .r {
  color: var(--text-mute);
  font-size: 12.5px;
  margin-top: 2px;
}

/* ---------- Education ---------- */
.edu-list {
  display: flex;
  flex-direction: column;
  margin-top: 44px;
}
.edu-row {
  display: grid;
  grid-template-columns: 120px 1fr 110px;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition:
    background 0.3s ease,
    padding-left 0.3s ease;
}
.edu-row:hover {
  background: var(--bg-raised);
  padding-left: 10px;
}
@media (max-width: 640px) {
  .edu-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
.edu-row .yr {
  font-family: "IBM Plex Mono", monospace;
  color: var(--brass);
  font-size: 14px;
}
.edu-row h3 {
  font-size: 18.5px;
  margin-bottom: 4px;
}
.edu-row .inst {
  color: var(--text-soft);
  font-size: 14px;
}
.edu-row .gpa {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--text-mute);
  text-align: right;
}
@media (max-width: 640px) {
  .edu-row .gpa {
    text-align: left;
    margin-top: 4px;
  }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
}
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.contact-info p {
  color: var(--text-soft);
  max-width: 42ch;
}
.contact-links {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  word-break: break-all;
}
.contact-link .ic-box {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    color 0.3s ease;
}
.contact-link:hover .ic-box {
  border-color: var(--brass);
  color: var(--brass);
  box-shadow: 0 0 16px -5px color-mix(in srgb, var(--brass) 50%, transparent);
}
.contact-link .ic-box svg {
  width: 16px;
  height: 16px;
}
.contact-link .txt small {
  display: block;
  color: var(--text-mute);
  font-size: 12px;
  margin-top: 2px;
}
form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-mute);
  margin-bottom: 8px;
  font-family: "IBM Plex Mono", monospace;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 2px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--brass);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
}
.submit-btn {
  align-self: flex-start;
  margin-top: 6px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px 30px;
  border-radius: 3px;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease;
}
@media (max-width: 560px) {
  .submit-btn {
    width: 100%;
    text-align: center;
  }
}
[data-theme="dark"] .submit-btn {
  background: var(--brass);
  color: #14181f;
  border-color: var(--brass);
}
.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -12px
    color-mix(in srgb, var(--brass) 60%, transparent);
}
.form-note {
  font-size: 12.5px;
  color: var(--text-mute);
  margin-top: -6px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
}
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.foot-row .mono {
  font-size: 12.5px;
  color: var(--text-mute);
}
.back-top {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.back-top:hover {
  color: var(--brass);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.brand .bouncing-dot {
  display: inline-block;
  width: 0.25em;
  height: 0.25em;
  margin-left: -0.4em;
  vertical-align: baseline;
  line-height: 0;
  border-radius: 50%;
  background: currentColor;
  animation: brand-dot-bounce 1s ease-in-out infinite;
}
@keyframes brand-dot-bounce {
  0%, 100% { transform: translateY(0); }
  16% { transform: translateY(-0.6em); }
  34% { transform: translateY(-0.46em); }
  52% { transform: translateY(-0.2em); }
  66% { transform: translateY(0.18em); }
  78% { transform: translateY(-0.1em); }
  90% { transform: translateY(0.03em); }
}

#projects {
  --brands-label-color: var(--brass);
  --brands-label-shadow: rgba(138, 95, 22, 0.18);
}
#projects .brands-marquee--dark {
  display: none;
}
[data-theme="dark"] #projects .brands-marquee--light {
  display: none;
}
[data-theme="dark"] #projects .brands-marquee--dark {
  display: block;
}

#projects .section-head {
  margin-bottom: 14px;
}

.brands-label {
  text-align: center;
  margin: 0 auto 0.5rem;
  color: var(--brands-label-color);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px var(--brands-label-shadow);
}
.brands-label span {
  display: inline-block;
  margin: 0 auto 0.5rem;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  margin: 0 auto 1.5rem;
  background: transparent;
}
@media (max-width: 600px) {
  .project-filters {
    justify-content: flex-start;
  }
  .project-filter {
    font-size: 13px;
    padding: 8px 14px;
  }
}

#projects .marquee-wrap {
  padding: 14px 0;
  border-top: none;
  border-bottom: none;
}
#projects .proj-grid {
  margin-top: 14px;
}

.proj-logo-wrap {
  margin-bottom: 16px;
  height: 38px;
  display: flex;
  align-items: center;
}
.proj-logo-wrap img {
  max-height: 38px;
  width: auto;
  object-fit: contain;
}
.proj-logo--dark {
  display: none;
}
[data-theme="dark"] .proj-logo--light {
  display: none;
}
[data-theme="dark"] .proj-logo--dark {
  display: block;
}

/* ---------- Hero Photo Card & Social Bar Alignment ---------- */
.hero-card-column {
  width: min(100%, 420px);
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-card-column .ledger-card {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  border-radius: 6px;
}
.hero-card-column .ledger-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 3.7;
}
.hero-card-column .ledger-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-card-column .ledger-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.85rem 1.1rem;
  background: rgba(14, 16, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-card-column .ledger-foot .label {
  color: rgba(255, 255, 255, 0.65);
}
.hero-card-column .ledger-foot .pulse {
  color: #fff;
}

.hero-card-socials {
  display: flex;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-raised);
}
.card-social-btn {
  flex: 1 1 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  text-decoration: none;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.card-social-btn:last-child {
  border-right: none;
}
.card-social-btn svg {
  width: 18px;
  height: 18px;
}
.card-social-btn:hover {
  background: color-mix(in srgb, var(--brass) 12%, transparent);
  color: var(--brass);
}

@media (max-width: 900px) {
  .hero-card-column {
    justify-self: center;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }
}
.project-filter.active,
.project-filter[aria-pressed="true"] {
  background-color: var(--brass);
  border-color: var(--brass);
  color: var(--text-invert);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 600px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .wrap,
  .nav-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-inner {
    height: 60px;
  }

  .brand {
    font-size: 17px;
    min-width: 0;
  }

  .nav-right {
    gap: 10px;
  }

  .nav-cta {
    display: none !important;
  }

  .hero {
    padding: 40px 0 52px;
  }

  .hero-grid {
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(32px, 10vw, 46px);
    overflow-wrap: anywhere;
  }

  .hero p.sub {
    font-size: 15.5px;
  }

  .hero-actions,
  .hero-ctas {
    gap: 10px;
  }

  .hero-ctas .cta-btn,
  .hero-ctas .cta-ghost,
  .submit-btn {
    min-height: 46px;
  }

  .section-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 26px;
  }

  .section-head h2 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .section-num {
    flex-shrink: 0;
    padding-top: 4px;
  }

  .about-lede {
    font-size: 22px;
  }

  .about-body p,
  .contact-info p {
    font-size: 15px;
  }

  .phil-item {
    gap: 12px;
    padding: 14px;
  }

  .phil-item .m {
    font-size: 2rem;
  }

  .t-item {
    padding-left: 22px;
    padding-bottom: 40px;
  }

  .t-head {
    display: block;
  }

  .t-date {
    display: block;
    margin-top: 5px;
  }

  .marquee-wrap {
    padding: 18px 0;
  }

  .brand-chip {
    width: 112px;
    font-size: 17px;
  }

  .brand-chip img {
    width: 78px;
    max-width: 78px;
    flex-basis: 78px;
    height: 32px;
  }

  .proj-card {
    min-height: 0;
    padding: 24px 16px;
  }

  .svc-card {
    padding: 26px 18px;
  }

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

  .badge-tile {
    min-width: 0;
    padding: 18px 10px 16px;
  }

  .badge-media {
    width: 76px;
    height: 76px;
  }

  .badge-tile h4 {
    overflow-wrap: anywhere;
  }

  .cert-body {
    padding: 16px;
  }

  .quote-grid {
    margin-top: 30px;
  }

  .edu-row {
    padding: 18px 0;
  }

  .contact-grid {
    gap: 30px;
  }

  .contact-link {
    font-size: 14px;
    word-break: break-word;
  }

  .form-row {
    gap: 16px;
  }

  .foot-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-filters {
    gap: 8px;
    margin-bottom: 1rem;
  }

  .project-filter {
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .wrap,
  .nav-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand {
    font-size: 16px;
  }

  .badge-grid {
    grid-template-columns: 1fr;
  }

  .section-num {
    font-size: 11px;
  }
}