/* styles.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg0: #121212;
  --bg1: #121212;

  /* Neutral liquid-glass palette (dark) */
  --glassA: rgba(38, 38, 38, 0.92);
  --glassB: rgba(28, 28, 28, 0.88);
  --glassC: rgba(18, 18, 18, 0.84);
  --panelA: rgba(68, 68, 68, 0.9);
  --panelB: rgba(50, 50, 50, 0.88);
  --panelC: rgba(32, 32, 32, 0.86);
  --stroke: rgba(255, 255, 255, 0.14);
  --stroke2: rgba(255, 255, 255, 0.1);
  --outline: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.14) 25%,
    rgba(255, 255, 255, 0.2) 34%,
    rgba(255, 245, 210, 0.42) 58%,
    rgba(255, 255, 255, 0.14) 82%,
    rgba(255, 255, 255, 0.14) 100%
  );
  --outline2: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.1) 26%,
    rgba(255, 255, 255, 0.16) 34%,
    rgba(255, 245, 210, 0.34) 58%,
    rgba(255, 255, 255, 0.1) 82%,
    rgba(255, 255, 255, 0.1) 100%
  );
  --pillOutline: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.16) 26%,
    rgba(255, 255, 255, 0.28) 38%,
    rgba(255, 245, 210, 0.4) 58%,
    rgba(255, 255, 255, 0.16) 82%,
    rgba(255, 255, 255, 0.16) 100%
  );
  --pillOutlineActive: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 58%, rgba(255, 255, 255, 0.16)) 0%,
    color-mix(in srgb, var(--accent) 58%, rgba(255, 255, 255, 0.16)) 26%,
    color-mix(in srgb, var(--accent) 78%, rgba(255, 255, 255, 0.24)) 58%,
    color-mix(in srgb, var(--accent) 58%, rgba(255, 255, 255, 0.16)) 100%
  );
  --shine: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --shadow2: 0 10px 24px rgba(0, 0, 0, 0.35);

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --ascii-color: rgba(196, 192, 184, 0.634);
  --faint: rgba(255, 255, 255, 0.45);
  --line: rgba(255, 255, 255, 0.12);

  --radius: 18px;
  --radius2: 14px;
  --pad: 18px;
  --max: 1100px;

  --ring: 0 0 0 3px rgba(255, 255, 255, 0.18);
  color-scheme: dark;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --accent-glow: rgba(251, 191, 36, 0.35);
}

:root.light {
  --bg0: #f6f7f9;
  --bg1: #f6f7f9;

  /* Light glass surfaces (slightly denser than pure white) */
  --glassA: rgba(255, 255, 255, 0.94);
  --glassB: rgba(248, 249, 251, 0.91);
  --glassC: rgba(238, 240, 244, 0.88);
  --panelA: rgba(255, 255, 255, 0.95);
  --panelB: rgba(248, 249, 251, 0.92);
  --panelC: rgba(238, 240, 244, 0.9);

  /* Strokes */
  --stroke: rgba(0, 0, 0, 0.1);
  --stroke2: rgba(0, 0, 0, 0.06);
  --outline: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.1) 25%,
    rgba(255, 255, 255, 0.22) 34%,
    rgba(255, 255, 255, 0.68) 58%,
    rgba(0, 0, 0, 0.1) 82%,
    rgba(0, 0, 0, 0.1) 100%
  );
  --outline2: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.06) 26%,
    rgba(255, 255, 255, 0.18) 34%,
    rgba(255, 255, 255, 0.58) 58%,
    rgba(0, 0, 0, 0.06) 82%,
    rgba(0, 0, 0, 0.06) 100%
  );
  --pillOutline: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.08) 26%,
    rgba(255, 255, 255, 0.32) 58%,
    rgba(0, 0, 0, 0.08) 100%
  );
  --pillOutlineActive: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0.42) 26%,
    rgba(0, 0, 0, 0.22) 58%,
    rgba(0, 0, 0, 0.42) 100%
  );
  --line: rgba(0, 0, 0, 0.1);

  /* Text */
  --text: rgba(20, 20, 22, 0.92);
  --muted: rgba(20, 20, 22, 0.64);
  --ascii-color: rgba(20, 20, 22, 0.64);
  --faint: rgba(20, 20, 22, 0.44);

  /* Neutral shadows (layered) */
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.1);
  --shadow2: 0 10px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);

  /* Glass rim (specular edge) */
  --rimTop: rgba(255, 255, 255, 0.75);
  --rimBottom: rgba(0, 0, 0, 0.1);

  /* Tiny surface fill for “chips/inputs/buttons” in light mode */
  --surface: rgba(0, 0, 0, 0.035);
  --surfaceHover: rgba(0, 0, 0, 0.055);

  --ring: 0 0 0 3px rgba(0, 0, 0, 0.14);
  color-scheme: light;

  /* Accent stays neutral black (looks clean with your dark mode gold) */
  --accent: #111111;
  --accent-strong: #000000;
  --accent-glow: rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
}
html {
  background: var(--bg0);
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg0);
}

html.theme-crossfade body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: var(--themeFadeColor, var(--bg0));
  animation: themeCrossfade 420ms ease forwards;
}

@keyframes themeCrossfade {
  from {
    opacity: 0.92;
  }
  to {
    opacity: 0;
  }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  max-width: var(--max);
  margin: 28px auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bgCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.card {
  position: relative;
  background:
    radial-gradient(
      800px 220px at 20% 0%,
      rgba(255, 255, 255, 0.08),
      transparent 60%
    ),
    linear-gradient(180deg, var(--glassA), var(--glassB) 55%, var(--glassC));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0.9;
}

/* Light mode: stronger specular rim */
:root.light .card::after {
  box-shadow:
    inset 0 1px 0 var(--rimTop);
  opacity: 1;
}

.side {
  padding: var(--pad);
  position: sticky;
  top: 18px;
  height: fit-content;
}
.main {
  width: 100%;
  min-width: 0;
  align-self: start;
  padding: 12px 12px 16px;
  min-height: auto; /* or just delete the min-height line */
  position: relative;
}

.sideStack {
  display: grid;
  gap: 14px;
}
.sideTile {
  position: relative;
  border: 1px solid var(--stroke2);
  background:
    radial-gradient(
      700px 220px at 25% 0%,
      rgba(255, 255, 255, 0.1),
      transparent 62%
    ),
    linear-gradient(180deg, var(--panelA), var(--panelB) 55%, var(--panelC));
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow2);
  overflow: hidden;
}
.sideTile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  opacity: 0.9;
}

/* Light mode: a clearer rim edge */
:root.light .sideTile::after {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 1;
}
.sideTile > * {
  position: relative;
}

.sideHero {
  text-align: center;
  padding: 18px 14px 16px;
}
.avatar {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.03)
  );
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.avatar span {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.5px;
}
.avatarLarge {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin: 0 auto 14px;
}
.sideName {
  margin: 0;
  font-size: 31px;
  letter-spacing: -0.02em;
}

.contactTile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.contactTile + .contactTile {
  margin-top: 10px;
}
.cIcon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent);
}
:root.light .cIcon {
  color: rgba(10, 12, 16, 0.75);
}
.cBody {
  min-width: 0;
}
.cK {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.cV {
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cV:hover {
  text-decoration: underline;
}

.socialRow {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.socialBtn {
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  padding: 6px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition:
    transform 0.12s ease,
    filter 0.18s ease,
    color 0.18s ease;
}
:root.light .socialBtn {
  color: rgba(10, 12, 16, 0.55);
}
.socialBtn:hover {
  transform: translateY(-1px);
  color: var(--text);
}
.socialBtn:focus {
  outline: none;
  box-shadow: var(--ring);
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
}
.tabs {
  position: relative;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 9px;
}
.tab {
  position: relative;
  z-index: 1;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.tab.is-active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--stroke2));
  color: var(--accent);
}
.tabIndicator {
  position: absolute;
  left: 0;
  top: var(--tabIndicatorTop, calc(100% - 3px));
  width: var(--tabIndicatorWidth, 0);
  height: 3px;
  border-radius: 999px;
  pointer-events: none;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  opacity: var(--tabIndicatorOpacity, 0);
  transform: translateX(var(--tabIndicatorX, 0));
  transition:
    transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    top 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.18s ease;
}

.btn {
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.06);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus {
  outline: none;
  box-shadow: var(--ring);
}
.btn.subtle {
  padding: 9px 10px;
  font-size: 13px;
}
.iconBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.topActions {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

#themeToggle {
  width: 37px;
  height: 37px;
  padding: 0;
  border-radius: 14px;
  transform: none;
}

#themeToggle:hover {
  transform: translateY(-1px);
}

#themeToggle:active {
  transform: translateY(0);
}

.themeIcon {
  display: block;
}
.btn.primary {
  margin-top: 20px;
  padding-bottom: 8px;
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.08);
}

.btn.primary:hover {
  transform: translateY(-1px) ease;
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.22),
    0 4px 10px rgba(0, 0, 0, 0.32);
}

.pane {
  display: none;
  width: 100%;
  padding: 16px 14px 4px;
}

.pane.is-active {
  display: block;
  animation: paneIn 650ms ease both;
}

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

@media (prefers-reduced-motion: reduce) {
  .pane.is-active {
    animation: none;
  }
  .project.is-project-entering {
    animation: none;
    opacity: 1;
  }
  #resume .resumeStack > .tile.is-resume-entering {
    animation: none;
    opacity: 1;
  }
  .lead.is-line-animated .leadLine {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .tabIndicator {
    transition: none;
  }
  html.theme-crossfade body::before {
    animation: none;
    opacity: 0;
  }
  .card::before,
  .sideTile::before,
  .tile::before,
  .project::before {
    animation: none;
    transform: translate3d(0, 0, 0);
  }
  .card::after,
  .sideTile::after,
  .tile::after,
  .project::after,
  .projectModalCard::after {
    animation: none;
  }
  .bgCanvas {
    opacity: 0.55;
  }
}

.h2 {
  margin: 2px 0 10px;
  font-size: 30px;
  letter-spacing: -0.015em;
  position: relative;
}

.h2::after {
  content: "";
  display: block;
  width: 45px; /* line length */
  height: 4px; /* thickness */
  margin-top: 8px; /* gap from text */
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.lead {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.lead.is-line-animated .leadLine {
  display: block;
  opacity: 0;
  transform: translateY(8px);
  animation: leadLineIn 680ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(260ms + var(--line-index, 0) * 260ms);
}

@keyframes leadLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid2 {
  margin-top: 45px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.tile {
  position: relative;
  border: 1px solid var(--stroke2);
  background:
    radial-gradient(
      700px 220px at 25% 0%,
      rgba(255, 255, 255, 0.1),
      transparent 62%
    ),
    linear-gradient(180deg, var(--panelA), var(--panelB) 55%, var(--panelC));
  border-radius: var(--radius2);
  padding: 14px;
  box-shadow: var(--shadow2);
  overflow: hidden;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0.9;
}
.tile > * {
  position: relative;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.chipCard {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chipIcon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke2);
}
.chipTitle {
  font-weight: 650;
  font-size: 13px;
}
.chipText {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.45;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.timeline li {
  display: flex;
  gap: 10px;
}
.tDot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  flex: 0 0 10px;
  aspect-ratio: 1;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-glow),
    /* outer soft ring */ 0 0 16px var(--accent); /* glow */
  animation: tDotBreathe 1.6s ease-in-out infinite;
  transform-origin: center;
}
:root.light .tDot {
  background: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-glow),
    /* outer soft ring */ 0 0 16px var(--accent); /* glow */
}
.tTop {
  font-weight: 650;
  font-size: 13px;
}
.tText {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
  line-height: 1.45;
}

.callout {
  margin-top: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  border-radius: var(--radius2);
  padding: 12px;
}
.calloutTitle {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}
.calloutText {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.resumeStack {
  display: grid;
  gap: 14px;
}

.resumeBlockHead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.resumeIcon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent);
}
:root.light .resumeIcon {
  color: rgba(10, 12, 16, 0.78);
}
.resumeTitle {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.timeline2 {
  display: grid;
  gap: 12px;
}
.t2Item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
}
.t2Rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.t2Dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  flex: 0 0 10px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 0 0 4px var(--accent-glow),
    /* soft halo */ 0 0 18px var(--accent); /* glow */
  margin-top: 6px;
  animation: tDotBreathe 1.6s ease-in-out infinite;
  transform-origin: center;
}

:root.light .t2Dot {
  background: var(--accent);
  box-shadow:
    0 0 0 4px var(--accent-glow),
    /* soft halo */ 0 0 18px var(--accent); /* glow */
}
.t2Line {
  width: 2px;
  flex: 1;
  margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0.06)
  );
}

:root.light .t2Line {
  background: linear-gradient(
    180deg,
    rgba(10, 12, 16, 0.18),
    rgba(10, 12, 16, 0.06)
  );
}

.t2Card {
  border: 1px solid var(--stroke2);
  background: rgba(60, 60, 60, 0.76);
  border-radius: 14px;
  padding: 12px;
}
.t2Top {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}
.t2Role {
  font-weight: 720;
  font-size: 13px;
  color: var(--text);
}
.t2Meta {
  color: var(--faint);
  font-size: 12px;
}

.t2Bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.t2Bullets li {
  margin: 6px 0;
  line-height: 1.45;
  font-size: 13px;
}

.t2Tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.t2Tag,
.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.t2Tag {
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 6px 9px 6px 7px;
  color: var(--muted);
  font-size: 12px;
}
.t2TagIcon {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: inline-grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1;
}
.t2TagIcon svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.t2TagIcon .logoFill {
  fill: currentColor;
  stroke: none;
}
.t2TagText {
  position: relative;
  z-index: 1;
}
:root.light .t2TagIcon {
  color: rgba(20, 20, 22, 0.6);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 999px;
  padding: 7px 10px 7px 8px;
  color: var(--muted);
  font-size: 12px;
}

.projectsTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 9px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}
.filter.is-active {
  color: var(--text);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.08);
}

.projectGrid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.project {
  position: relative;
  border: 1px solid var(--stroke2);
  background:
    radial-gradient(
      700px 220px at 25% 0%,
      rgba(255, 255, 255, 0.1),
      transparent 62%
    ),
    linear-gradient(180deg, var(--panelA), var(--panelB) 55%, var(--panelC));
  border-radius: var(--radius2);
  padding: 14px;
  box-shadow: var(--shadow2);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.15s ease;
}

.project.is-project-entering {
  opacity: 0;
  animation: projectCardFadeIn 520ms ease forwards;
  animation-delay: calc(260ms + var(--project-index, 0) * 145ms);
}

@keyframes projectCardFadeIn {
  to {
    opacity: 1;
  }
}

#resume .resumeStack > .tile.is-resume-entering {
  opacity: 0;
  animation: resumeBlockFadeIn 520ms ease forwards;
  animation-delay: calc(260ms + var(--resume-index, 0) * 220ms);
}

@keyframes resumeBlockFadeIn {
  to {
    opacity: 1;
  }
}

.project::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0.9;
}
.project > * {
  position: relative;
}
.project:hover {
  transform: translateY(-2px);
  background:
    radial-gradient(
        700px 220px at 25% 0%,
        rgba(255, 255, 255, 0.12),
        transparent 62%
      )
      padding-box,
    linear-gradient(180deg, var(--panelA), var(--panelB) 55%, var(--panelC))
      padding-box,
    var(--outline2) border-box;
}
.project:focus-within {
  outline: none;
  box-shadow: var(--shadow2), var(--ring);
}
.projectDetailsBtn {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.projectDetailsBtn:focus {
  outline: none;
}
.projTitle,
.projLinks,
.projText,
.project .t2Tags {
  z-index: 1;
}
.projTitle {
  margin: 0;
  font-size: 14px;
}
.projMeta {
  color: var(--faint);
  font-size: 12px;
  margin-top: 4px;
}
.projText {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 10px 0 12px;
}
.projLinks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.link {
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
}
:root.light .link {
  border-bottom-color: rgba(10, 12, 16, 0.28);
}
.link:hover {
  border-bottom-style: solid;
}

.projectModal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}
.projectModal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.projectModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}
:root.light .projectModalBackdrop {
  background: rgba(246, 247, 249, 0.82);
}
.projectModalCard {
  position: relative;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background:
    radial-gradient(
      780px 280px at 20% 0%,
      rgba(255, 255, 255, 0.1),
      transparent 60%
    ),
    linear-gradient(180deg, var(--glassA), var(--glassB) 55%, var(--glassC));
  box-shadow: var(--shadow);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}
.projectModal.is-open .projectModalCard {
  transform: translateY(0) scale(1);
}
.projectModalCard:focus {
  outline: none;
}
.projectModalCard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0.9;
}
.modalClose {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.15s ease;
}
:root.light .modalClose {
  background: rgba(255, 255, 255, 0.74);
}
.modalClose:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}
.modalClose:focus {
  outline: none;
  box-shadow: var(--ring);
}
.modalProjectImageWrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(
      120% 100% at 24% 0%,
      color-mix(
        in srgb,
        var(--modalImageAccent, var(--accent)) 34%,
        transparent
      ),
      transparent 56%
    ),
    rgba(255, 255, 255, 0.035);
}
.modalProjectImageWrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.54);
}
.modalProjectImageBg {
  position: absolute;
  inset: -28px;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  display: block;
  object-fit: cover;
  opacity: 0.46;
  transform: scale(1.08);
  image-rendering: auto;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.modalProjectImageBg.is-loaded {
  opacity: 0.46;
}
:root.light .modalProjectImageWrap::after {
  background:
    radial-gradient(
      100% 80% at 18% 0%,
      color-mix(in srgb, var(--modalImageAccent, #fbbf24) 22%, transparent),
      transparent 58%
    ),
    rgba(255, 255, 255, 0.12);
}
:root.light .modalProjectImageBg {
  opacity: 0;
}
:root.light .modalProjectImageBg.is-loaded {
  opacity: 0.54;
}
.modalProjectImage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.modalProjectImage.is-loaded {
  opacity: 1;
}
.modalProjectBody {
  position: relative;
  padding: 18px;
}
.modalProjectTitle {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.015em;
}
.modalProjectLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.modalProjectText {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 14px 0 14px;
}
.modalProjectTags {
  margin-top: 0;
}

body.modal-open {
  overflow: hidden;
}

.form {
  width: 100%;
  max-width: none;
}
.field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
label {
  color: var(--muted);
  font-size: 12px;
}
input,
textarea {
  width: 100%;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
}
input:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--ring);
}
.hint {
  margin-top: 10px;
  color: var(--faint);
  font-size: 12px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    position: relative;
    top: 0;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .projectGrid {
    grid-template-columns: 1fr;
  }
  .resumeGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .projectModal {
    padding: 14px;
  }
  .projectModalCard {
    max-height: calc(100vh - 28px);
  }
  .modalProjectBody {
    padding: 15px;
  }
  .modalProjectTitle {
    font-size: 21px;
  }
}

/* Softer liquid glass pills */
.tag,
.t2Tag,
.filter {
  background:
    radial-gradient(
      140% 140% at 30% 20%,
      rgba(255, 255, 255, 0.1),
      transparent 45%
    ),
    linear-gradient(
      180deg,
      rgba(82, 82, 82, 0.94),
      rgba(58, 58, 58, 0.9)
    );

  border: 1px solid rgba(255, 255, 255, 0.16);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 2px 6px rgba(0, 0, 0, 0.28);

  transition:
    transform 0.12s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

/* Much gentler sheen */
.tag::after,
.t2Tag::after,
.filter::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.24),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* Subtle hover lift */
.tag:hover,
.t2Tag:hover,
.filter:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 10px rgba(0, 0, 0, 0.32);
}

/* Glass tabs */
.tab {
  --magnetX: 0px;
  --magnetY: 0px;
  --magnetGlow: 0;

  background:
    radial-gradient(
      140% 140% at 30% 20%,
      rgba(255, 255, 255, 0.1),
      transparent 45%
    ),
    linear-gradient(
      180deg,
      rgba(58, 58, 58, 0.94),
      rgba(34, 34, 34, 0.9)
    );

  border: 1px solid rgba(255, 255, 255, 0.1);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.25),
    0 calc(2px + var(--magnetGlow) * 4px)
      calc(6px + var(--magnetGlow) * 12px)
      rgba(0, 0, 0, calc(0.25 + var(--magnetGlow) * 0.14));

  transition:
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.tab > b {
  display: block;
  transform: translate3d(var(--magnetX), var(--magnetY), 0);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Soft sheen */
.tab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.22;
  pointer-events: none;
}

/* Hover */
.tab:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 calc(4px + var(--magnetGlow) * 4px)
      calc(10px + var(--magnetGlow) * 14px)
      rgba(0, 0, 0, calc(0.32 + var(--magnetGlow) * 0.16));
}

/* Active tab refinement */

.tab.is-active {
  background:
    radial-gradient(
      140% 140% at 30% 20%,
      rgba(255, 255, 255, 0.16),
      transparent 50%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 22%, transparent),
      rgba(255, 255, 255, 0.02)
    );

  border-color: color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.1));
  color: var(--accent);
}

.sideRole {
  margin: 10px auto 0;
  width: fit-content;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
}

.sideRole {
  background:
    radial-gradient(
      140% 140% at 30% 20%,
      rgba(255, 255, 255, 0.07),
      transparent 45%
    ),
    linear-gradient(
      180deg,
      rgba(58, 58, 58, 0.94),
      rgba(34, 34, 34, 0.9)
    );

  border: 1px solid rgba(255, 255, 255, 0.1);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 1px 6px rgba(0, 0, 0, 0.25);
}

.sideRole {
  letter-spacing: 0.02em;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* --- Avatar hard override: force square + face crop --- */
.avatar.avatarLarge {
  width: 120px;
  height: 120px; /* hard-force square */
  border-radius: 28px;
  overflow: hidden; /* REQUIRED: actually crops the image */
  padding: 0; /* ensure no padding interferes */
}

.avatar.avatarLarge img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* crop, don’t stretch */
  object-position: center 20%; /* move crop up to focus face */
  transform: scale(1.08); /* optional: zoom in a bit */
}

/* Avatar crop tuning */
.avatar.avatarLarge {
  overflow: hidden;
}

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

  /* 👇 Key adjustments */
  transform: scale(1.6) translateY(-18px);
}

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

  /* zoom in + move DOWN to bring face back */
  transform: scale(1.75) translateY(33px) translateX(5px);
}

/* Animate the avatar BOX */
.avatar.avatarLarge {
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
}

/* Hover effect */
.sideHero:hover .avatar.avatarLarge {
  transform: scale(1.05); /* slight zoom OUT */
}

/* --- One-time boot animation (only on initial load) --- */
html.preload .sideTile,
html.preload .card.main,
html.preload .sideTile,
html.preload .card.side,
html.preload .socialRow {
  opacity: 0;
  transform: translateY(10px);
}

html.loaded .sideTile,
html.loaded .card.main,
html.loaded .sideTile,
html.loaded .card.side,
html.loaded .socialRow {
  animation: bootIn 900ms ease both;
}

/* Optional: stagger the sidebar tiles a bit */
html.loaded .sideTile:nth-child(1) {
  animation-delay: 0ms;
}
html.loaded .sideTile:nth-child(2) {
  animation-delay: 80ms;
}
html.loaded .sideTile:nth-child(3) {
  animation-delay: 160ms;
}
html.loaded .sideTile:nth-child(4) {
  animation-delay: 240ms;
}

/* Stagger outer bits slightly */
html.loaded .card.side {
  animation-delay: 80ms;
}
html.loaded .socialRow {
  animation-delay: 260ms;
}
html.loaded .card.main {
  animation-delay: 120ms;
}

html.loaded .card.main {
  animation-delay: 120ms;
}

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

@media (prefers-reduced-motion: reduce) {
  html.preload .sideTile,
  html.preload .card.main,
  html.preload .sideTile,
  html.preload .socialRow,
  html.preload .card.side {
    opacity: 1;
    transform: none;
  }
  html.loaded .sideTile,
  html.loaded .card.main,
  html.loaded .sideTile,
  html.loaded .card.side,
  html.loaded .socialRow,
  .tDot,
  .t2Dot {
    animation: none;
  }
}

@keyframes tDotBreathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

@media (max-width: 431px) {
  .tab {
    padding: 10px 10px;
    font-size: 11px;
  }
}

@media (max-width: 397px) {
  .tab {
    padding: 9px 9px;
    font-size: 10px;
  }
}

/* Light mode: make small surfaces visible via neutral dark translucency */
:root.light .btn,
:root.light .tab,
:root.light .filter,
:root.light .tag,
:root.light .t2Tag,
:root.light .sideRole,
:root.light .contactTile,
:root.light .cIcon,
:root.light input,
:root.light textarea,
:root.light .t2Card,
:root.light .modalClose {
  background: var(--surface);
}

:root.light .btn:hover,
:root.light .tab:hover,
:root.light .filter:hover,
:root.light .tag:hover,
:root.light .t2Tag:hover,
:root.light .contactTile:hover,
:root.light .modalClose:hover {
  background: var(--surfaceHover);
}

:root.light .sideRole {
  background:
    radial-gradient(
      140% 140% at 30% 20%,
      rgba(255, 255, 255, 0.72),
      transparent 48%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(0, 0, 0, 0.045));
  color: rgba(20, 20, 22, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Light mode: pill/tabs glass gradients should be neutral (not white-on-white) */

:root.light .tab,
:root.light .tag,
:root.light .t2Tag,
:root.light .filter,
:root.light .modalClose {
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 2px 10px rgba(0, 0, 0, 0.08);
}

:root.light .sideRole {
  border: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.06);
}

.tab,
.tag,
.t2Tag,
.filter,
.sideRole {
  border-color: transparent;
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.1),
        transparent 45%
      )
      padding-box,
    linear-gradient(180deg, rgba(58, 58, 58, 0.94), rgba(34, 34, 34, 0.9))
      padding-box,
    var(--pillOutline) border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.tag,
.t2Tag,
.filter {
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.1),
        transparent 45%
      )
      padding-box,
    linear-gradient(180deg, rgba(82, 82, 82, 0.94), rgba(58, 58, 58, 0.9))
      padding-box,
    var(--pillOutline) border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.tab:hover,
.tag:hover,
.t2Tag:hover,
.filter:hover {
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.14),
        transparent 45%
      )
      padding-box,
    linear-gradient(180deg, rgba(88, 88, 88, 0.94), rgba(48, 48, 48, 0.9))
      padding-box,
    var(--pillOutline) border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.32);
}

.tab.is-active,
.filter.is-active {
  border-color: transparent;
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.16),
        transparent 50%
      )
      padding-box,
    linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 10%, rgba(58, 58, 58, 0.94)),
        color-mix(in srgb, var(--accent) 6%, rgba(34, 34, 34, 0.9))
      )
      padding-box,
    var(--pillOutlineActive) border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
  color: var(--accent);
}

.tab.is-active:hover,
.filter.is-active:hover {
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.16),
        transparent 50%
      )
      padding-box,
    linear-gradient(
        180deg,
        color-mix(in srgb, var(--accent) 12%, rgba(64, 64, 64, 0.94)),
        color-mix(in srgb, var(--accent) 7%, rgba(38, 38, 38, 0.9))
      )
      padding-box,
    var(--pillOutlineActive) border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
}

:root.light .tab,
:root.light .tag,
:root.light .t2Tag,
:root.light .filter,
:root.light .sideRole {
  border-color: transparent;
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.72),
        transparent 48%
      )
      padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(0, 0, 0, 0.045))
      padding-box,
    var(--pillOutline) border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

:root.light .tag,
:root.light .t2Tag {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(0, 0, 0, 0.025))
      padding-box,
    var(--pillOutline) border-box;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

:root.light .tab:hover,
:root.light .tag:hover,
:root.light .t2Tag:hover,
:root.light .filter:hover {
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.84),
        transparent 48%
      )
      padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(0, 0, 0, 0.055))
      padding-box,
    var(--pillOutline) border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

:root.light .tag:hover,
:root.light .t2Tag:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(0, 0, 0, 0.035))
      padding-box,
    var(--pillOutline) border-box;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 5px 14px rgba(0, 0, 0, 0.07);
}

:root.light .tab.is-active,
:root.light .filter.is-active {
  border-color: transparent;
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.82),
        transparent 50%
      )
      padding-box,
    linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.74),
        rgba(0, 0, 0, 0.045)
      )
      padding-box,
    var(--pillOutlineActive) border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: var(--accent);
}

:root.light .tab.is-active:hover,
:root.light .filter.is-active:hover {
  background:
    radial-gradient(
        140% 140% at 30% 20%,
        rgba(255, 255, 255, 0.84),
        transparent 50%
      )
      padding-box,
    linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.78),
        rgba(0, 0, 0, 0.05)
      )
      padding-box,
    var(--pillOutlineActive) border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab::after,
.tag::after,
.t2Tag::after,
.filter::after {
  display: none;
}

:root.light .card,
:root.light .projectModalCard {
  background:
    radial-gradient(
      900px 360px at 20% 0%,
      rgba(255, 255, 255, 0.85),
      transparent 60%
    ),
    radial-gradient(
      800px 360px at 90% 25%,
      rgba(0, 0, 0, 0.06),
      transparent 60%
    ),
    linear-gradient(180deg, var(--glassA), var(--glassB) 55%, var(--glassC));
}

:root.light .sideTile,
:root.light .tile,
:root.light .project {
  background:
    radial-gradient(
      900px 360px at 20% 0%,
      rgba(255, 255, 255, 0.85),
      transparent 60%
    ),
    radial-gradient(
      800px 360px at 90% 25%,
      rgba(0, 0, 0, 0.06),
      transparent 60%
    ),
    linear-gradient(180deg, var(--panelA), var(--panelB) 55%, var(--panelC));
}

.card,
.projectModalCard {
  isolation: isolate;
  border-color: transparent;
  background:
    radial-gradient(
        800px 220px at 20% 0%,
        rgba(255, 255, 255, 0.08),
        transparent 60%
      )
      padding-box,
    linear-gradient(180deg, var(--glassA), var(--glassB) 55%, var(--glassC))
      padding-box,
    var(--outline) border-box;
}

.sideTile,
.tile,
.project {
  isolation: isolate;
  border-color: transparent;
  background:
    radial-gradient(
        700px 220px at 25% 0%,
        rgba(255, 255, 255, 0.1),
        transparent 62%
      )
      padding-box,
    linear-gradient(180deg, var(--panelA), var(--panelB) 55%, var(--panelC))
      padding-box,
    var(--outline2) border-box;
}

:root.light .card,
:root.light .projectModalCard {
  background:
    radial-gradient(
        900px 360px at 20% 0%,
        rgba(255, 255, 255, 0.85),
        transparent 60%
      )
      padding-box,
    radial-gradient(
        800px 360px at 90% 25%,
        rgba(0, 0, 0, 0.06),
        transparent 60%
      )
      padding-box,
    linear-gradient(180deg, var(--glassA), var(--glassB) 55%, var(--glassC))
      padding-box,
    var(--outline) border-box;
}

:root.light .sideTile,
:root.light .tile,
:root.light .project {
  background:
    radial-gradient(
        900px 360px at 20% 0%,
        rgba(255, 255, 255, 0.85),
        transparent 60%
      )
      padding-box,
    radial-gradient(
        800px 360px at 90% 25%,
        rgba(0, 0, 0, 0.06),
        transparent 60%
      )
      padding-box,
    linear-gradient(180deg, var(--panelA), var(--panelB) 55%, var(--panelC))
      padding-box,
    var(--outline2) border-box;
}

.card::after,
.sideTile::after,
.tile::after,
.project::after,
.projectModalCard::after {
  display: none;
}

.card > *,
.sideTile > *,
.tile > *,
.project > * {
  position: relative;
  z-index: 1;
}

.card::before,
.sideTile::before,
.tile::before,
.project::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
  border-radius: 0;
  background: linear-gradient(
    115deg,
    transparent 34%,
    rgba(255, 255, 255, 0.035) 43%,
    rgba(255, 255, 255, 0.16) 50%,
    rgba(255, 255, 255, 0.035) 57%,
    transparent 66%
  );
  opacity: 0.44;
  transform: translate3d(-26%, 0, 0);
  animation: glassShimmerDrift var(--shimmerDuration, 16s)
    cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

:root.light .card::before,
:root.light .sideTile::before,
:root.light .tile::before,
:root.light .project::before {
  background: linear-gradient(
    115deg,
    transparent 34%,
    rgba(255, 255, 255, 0.08) 43%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.08) 57%,
    transparent 66%
  );
  opacity: 0.32;
}

.card.main {
  --shimmerDuration: 24s;
}

.card.side {
  --shimmerDuration: 26s;
}

.sideTile,
.tile,
.project {
  --shimmerDuration: 20s;
}

@keyframes glassShimmerDrift {
  from {
    transform: translate3d(-26%, 0, 0);
  }
  to {
    transform: translate3d(26%, 0, 0);
  }
}

@property --orbitAngle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0.9;
}

/* Light mode: stronger specular rim */
:root.light .card::after {
  box-shadow:
    inset 0 1px 0 var(--rimTop);
  opacity: 1;
}

.sideTile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  opacity: 0.9;
}

/* Light mode: a clearer rim edge */
:root.light .sideTile::after {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 1;
}

:root.light .tile::after,
:root.light .project::after,
:root.light .projectModalCard::after {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 1;
}

.card::after,
.sideTile::after,
.tile::after,
.project::after,
.projectModalCard::after {
  z-index: 2;
}

@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .card::after,
  .sideTile::after,
  .tile::after,
  .project::after,
  .projectModalCard::after {
    padding: 0;
    background:
      linear-gradient(
          90deg,
          transparent 8%,
          rgba(255, 255, 255, 0.08) 32%,
          rgba(255, 245, 210, 0.26) 58%,
          transparent 90%
        )
        top / 100% 1px no-repeat;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    -webkit-mask: none;
    mask: none;
  }

  .card::after,
  .projectModalCard::after {
    background:
      linear-gradient(
          90deg,
          transparent 8%,
          rgba(255, 255, 255, 0.1) 32%,
          rgba(255, 245, 210, 0.34) 58%,
          transparent 90%
        )
        top / 100% 1px no-repeat;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  :root.light .card::after,
  :root.light .sideTile::after,
  :root.light .tile::after,
  :root.light .project::after,
  :root.light .projectModalCard::after {
    background:
      linear-gradient(
          90deg,
          transparent 8%,
          rgba(255, 255, 255, 0.18) 34%,
          rgba(255, 255, 255, 0.5) 58%,
          transparent 90%
        )
        top / 100% 1px no-repeat;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  :root.light .card::after,
  :root.light .projectModalCard::after {
    background:
      linear-gradient(
          90deg,
          transparent 8%,
          rgba(255, 255, 255, 0.22) 32%,
          rgba(255, 255, 255, 0.62) 58%,
          transparent 90%
        )
        top / 100% 1px no-repeat;
    box-shadow: inset 0 1px 0 var(--rimTop);
  }

  .card {
    --orbitDuration: 34s;
  }

  .sideTile,
  .tile,
  .project {
    --orbitDuration: 28s;
  }

  @keyframes borderGlowOrbit {
    to {
      --orbitAngle: 360deg;
    }
  }
}

:root.light .card,
:root.light .sideTile,
:root.light .tile {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.05);
}

:root.light .tab.is-active {
  border-color: transparent;
  color: var(--accent);
}

:root.light .btn.primary:hover {
  transform: translateY(-1px) ease;
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.22),
    0 4px 10px rgba(106, 106, 106, 0.32);
}

#asciiCanvas {
  width: min(220px, 100%);
  aspect-ratio: 465 / 536;
  display: block;
  flex: 0 0 220px;
  touch-action: none;
  cursor: crosshair;
}

#sourceImage {
  display: none;
}

.about-me-content {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 24px;
  justify-content: space-between;
}

.about-me-content > div {
  flex: 1 1 0;
  min-width: 0;
}

.about-me-content .lead {
  max-width: 44ch;
}

.siteFooter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  margin: auto 0 10px;
  padding: 0 14px;
  z-index: 2;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.5;
  pointer-events: none;
  text-align: right;
}

:root.light .siteFooter {
  color: rgb(20, 20, 22);
}

/* Final light-mode pill pass: exact border-box rims, soft neutral fills. */
:root.light .tab,
:root.light .filter {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(246, 247, 249, 0.56))
      padding-box,
    linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.06),
        rgba(255, 255, 255, 0.38) 58%,
        rgba(0, 0, 0, 0.06)
      )
      border-box;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 7px 18px rgba(0, 0, 0, 0.08);
}

:root.light .tab:hover,
:root.light .filter:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 247, 249, 0.62))
      padding-box,
    linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.08),
        rgba(255, 255, 255, 0.4) 58%,
        rgba(0, 0, 0, 0.08)
      )
      border-box;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.09);
}

:root.light .tab.is-active,
:root.light .tab.is-active:hover,
:root.light .filter.is-active,
:root.light .filter.is-active:hover {
  border-color: transparent;
  color: var(--text);
  background:
    linear-gradient(180deg, rgb(249, 250, 252), rgb(236, 238, 242))
      padding-box,
    linear-gradient(rgb(82, 86, 94), rgb(82, 86, 94)) border-box;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 7px 18px rgba(0, 0, 0, 0.1);
}

:root.light .tag,
:root.light .t2Tag,
:root.light .sideRole {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(242, 244, 247, 0.52))
      padding-box,
    linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.075),
        rgba(255, 255, 255, 0.22) 58%,
        rgba(0, 0, 0, 0.075)
      )
      border-box;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.045),
    0 5px 14px rgba(0, 0, 0, 0.065);
}

:root.light .tag:hover,
:root.light .t2Tag:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(242, 244, 247, 0.56))
      padding-box,
    linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.085),
        rgba(255, 255, 255, 0.24) 58%,
        rgba(0, 0, 0, 0.085)
      )
      border-box;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.045),
    0 6px 16px rgba(0, 0, 0, 0.075);
}

@media (max-width: 720px) {
  .card::before,
  .sideTile::before,
  .tile::before,
  .project::before {
    display: none;
  }

  .card::after,
  .sideTile::after,
  .tile::after,
  .project::after {
    animation: none;
  }

  .about-me-content {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  #asciiCanvas {
    align-self: center;
    flex-basis: 180px;
    width: min(180px, 100%);
  }
}
