/* ==========================================================================
   Abhishek Kumar Shah — Portfolio
   Design: dark-first "glass + editorial" with restrained neo-brutalist accents
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-display: "Syne", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* dark (default) */
  --bg: #09090c;
  --bg-2: #0f1015;
  --bg-3: #15161d;
  --fg: #f4f4f5;
  --fg-2: #b4b4bd;
  --fg-3: #7c7c88;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --accent: #a3e635;
  --accent-2: #86efac;
  --accent-ink: #0b1203;
  --accent-soft: rgba(163, 230, 53, 0.12);
  --accent-line: rgba(163, 230, 53, 0.35);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --sky: #67e8f9;
  --sky-soft: rgba(103, 232, 249, 0.12);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.4);
  --hard: 6px 6px 0 0 var(--accent);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 72px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dot: rgba(255, 255, 255, 0.07);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f7f4;
  --bg-2: #ffffff;
  --bg-3: #f0f0ea;
  --fg: #111113;
  --fg-2: #44444d;
  --fg-3: #6b6b76;
  --line: rgba(17, 17, 19, 0.1);
  --line-strong: rgba(17, 17, 19, 0.22);
  --glass: rgba(255, 255, 255, 0.65);
  --glass-hover: rgba(255, 255, 255, 0.9);
  --accent: #4d7c0f;
  --accent-2: #65a30d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(77, 124, 15, 0.1);
  --accent-line: rgba(77, 124, 15, 0.35);
  --violet: #6d28d9;
  --violet-soft: rgba(109, 40, 217, 0.1);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, 0.1);
  --sky: #0e7490;
  --sky-soft: rgba(14, 116, 144, 0.1);
  --rose: #be123c;
  --rose-soft: rgba(190, 18, 60, 0.1);
  --shadow: 0 20px 50px rgba(17, 17, 19, 0.12);
  --shadow-sm: 0 8px 20px rgba(17, 17, 19, 0.08);
  --hard: 6px 6px 0 0 #111113;
  --dot: rgba(17, 17, 19, 0.1);
  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Background decor ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

.bg-glow--1 {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -120px;
  background: var(--accent);
  opacity: 0.16;
}

.bg-glow--2 {
  width: 420px;
  height: 420px;
  bottom: -200px;
  left: -140px;
  background: var(--violet);
  opacity: 0.18;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--sky));
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(var(--max), 100% - 48px);
  margin-inline: auto;
}

.section {
  padding: clamp(72px, 10vw, 120px) 0;
  position: relative;
}

.section + .section {
  padding-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  margin-top: 12px;
}

.section-title em {
  font-style: normal;
  color: var(--accent);
}

.section-sub {
  color: var(--fg-2);
  max-width: 54ch;
  font-size: 1.05rem;
}

.mono {
  font-family: var(--font-mono);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.25s;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 var(--accent-line);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-soft), 0 0 0 4px var(--accent-soft);
}

.btn--ghost {
  background: var(--glass);
  border-color: var(--line-strong);
  color: var(--fg);
  backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  background: var(--glass-hover);
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 0.85rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--fg-2);
  transition: all 0.25s var(--ease);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn:hover {
  color: var(--fg);
  border-color: var(--accent-line);
  background: var(--glass-hover);
  transform: translateY(-2px);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-2);
  transition: color 0.2s, background-color 0.2s;
}

.nav__links a:hover {
  color: var(--fg);
}

.nav__links a.is-active {
  color: var(--accent-ink);
  background: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

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

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

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

.nav-burger {
  display: none;
}

.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 2px 0;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: 899;
  padding: 16px 24px 24px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.3s;
}

.mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu a {
  display: block;
  padding: 14px 4px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.mobile-menu a.is-active {
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 56px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-2);
  margin-bottom: 28px;
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2s infinite;
}

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero__title .line {
  display: block;
}

.hero__title .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}

.hero__role {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--accent);
  min-height: 1.8em;
}

.hero__role .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: -0.15em;
  margin-left: 3px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero__lead {
  margin-top: 20px;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--fg-2);
  max-width: 58ch;
}

.hero__lead strong {
  color: var(--fg);
  font-weight: 600;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.hero__socials {
  display: flex;
  gap: 10px;
  margin-left: 6px;
}

.hero__meta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-3);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__meta svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* photo card */
.hero__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
}

.photo-card {
  position: relative;
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(145deg, var(--glass-hover), var(--glass));
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from 180deg, var(--accent), var(--violet), var(--sky), var(--accent));
  z-index: -1;
  filter: blur(18px);
  opacity: 0.35;
}

.photo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border-radius: 20px;
  filter: saturate(1.05) contrast(1.04);
}

.photo-card__tag {
  position: absolute;
  padding: 10px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-2) 85%, transparent);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}

.photo-card__tag small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--fg-3);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.photo-card__tag .ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.tag--1 {
  top: 26px;
  left: -34px;
  animation-delay: 0s;
}

.tag--2 {
  right: -38px;
  top: 42%;
  animation-delay: 1.5s;
}

.tag--3 {
  bottom: 30px;
  left: -22px;
  animation-delay: 3s;
}

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

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--accent), transparent);
  animation: drip 1.8s ease-in-out infinite;
}

@keyframes drip {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ---------- Bento highlights ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tile {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
}

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

.tile__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
}

.tile__num em {
  font-style: normal;
  color: var(--accent);
}

.tile__label {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--fg-2);
  line-height: 1.45;
}

.tile__kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.terminal {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
}

.terminal__bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--fg-3);
  opacity: 0.6;
}

.terminal__bar i:nth-child(1) {
  background: #ff5f56;
}

.terminal__bar i:nth-child(2) {
  background: #ffbd2e;
}

.terminal__bar i:nth-child(3) {
  background: #27c93f;
}

.terminal__bar span {
  margin-left: auto;
  color: var(--fg-3);
  font-size: 0.72rem;
}

.terminal__body {
  padding: 18px 20px 22px;
  line-height: 1.75;
  color: var(--fg-2);
}

.terminal__body .p {
  color: var(--accent);
}

.terminal__body .k {
  color: var(--violet);
}

.terminal__body .s {
  color: var(--amber);
}

.terminal__body .c {
  color: var(--fg-3);
}

.terminal__body .line {
  display: block;
  white-space: pre-wrap;
}

.about__body p {
  color: var(--fg-2);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.about__body p strong {
  color: var(--fg);
  font-weight: 600;
}

.now {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
}

.now__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.now ul li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--fg-2);
}

.now ul li:first-child {
  border-top: 0;
}

.now ul li::before {
  content: "→";
  color: var(--accent);
  font-family: var(--font-mono);
  flex: none;
}

.now ul li strong {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.xp {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  position: relative;
  transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.xp:hover {
  border-color: var(--accent-line);
  transform: translateX(4px);
}

.xp__when {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-3);
  line-height: 1.5;
}

.xp__when b {
  display: block;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.xp__when .chip {
  margin-top: 10px;
}

.xp__role {
  font-size: 1.3rem;
  font-weight: 700;
}

.xp__org {
  color: var(--fg-2);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.xp__org a {
  color: var(--accent);
  border-bottom: 1px dashed var(--accent-line);
}

.xp__list {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.xp__list li {
  position: relative;
  padding-left: 20px;
  color: var(--fg-2);
  font-size: 0.97rem;
}

.xp__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.xp__list li strong {
  color: var(--fg);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-2);
  white-space: nowrap;
}

.chip--accent {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.chip--violet {
  color: var(--violet);
  border-color: color-mix(in srgb, var(--violet) 40%, transparent);
  background: var(--violet-soft);
}

.chip--amber {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 40%, transparent);
  background: var(--amber-soft);
}

.chip--sky {
  color: var(--sky);
  border-color: color-mix(in srgb, var(--sky) 40%, transparent);
  background: var(--sky-soft);
}

.chip--rose {
  color: var(--rose);
  border-color: color-mix(in srgb, var(--rose) 40%, transparent);
  background: var(--rose-soft);
}

/* ---------- Projects ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-2);
  transition: all 0.25s var(--ease);
  font-family: var(--font-mono);
}

.filter:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.filter.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease), opacity 0.3s;
  cursor: pointer;
}

.project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 42%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.project:hover {
  transform: translate(-3px, -3px);
  border-color: var(--line-strong);
  box-shadow: var(--hard);
}

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

.project.is-hidden {
  display: none;
}

.project--featured {
  grid-column: span 2;
}

.project__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.project__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 80%, transparent);
}

.project__links {
  display: flex;
  gap: 6px;
}

.project__links a,
.project__links button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--fg-2);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
  transition: all 0.2s;
}

.project__links a:hover,
.project__links button:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.project__links svg {
  width: 16px;
  height: 16px;
}

.project__kind {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.project__title {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
}

.project--featured .project__title {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.project__desc {
  margin-top: 10px;
  color: var(--fg-2);
  font-size: 0.95rem;
  flex: 1;
}

.project__impact {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.project__impact li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--fg-2);
}

.project__impact li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project__impact li strong {
  color: var(--fg);
  font-weight: 600;
}

.project .chips {
  margin-top: 18px;
}

.project__more {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
}

.project__more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.project:hover .project__more svg {
  transform: translateX(4px);
}

.project__details {
  display: none;
}

/* featured stats row */
.feat-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.feat-stats div {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}

.feat-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.feat-stats span {
  font-size: 0.78rem;
  color: var(--fg-3);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__panel {
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  box-shadow: var(--shadow);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--ease);
  overscroll-behavior: contain;
}

.modal.is-open .modal__panel {
  transform: none;
}

.modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  backdrop-filter: blur(12px);
}

.modal__head h3 {
  font-size: 1.4rem;
}

.modal__body {
  padding: 28px;
}

.modal__body h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 26px 0 10px;
}

.modal__body h4:first-child {
  margin-top: 0;
}

.modal__body p {
  color: var(--fg-2);
  margin-bottom: 10px;
}

.modal__body ul {
  display: grid;
  gap: 8px;
}

.modal__body li {
  position: relative;
  padding-left: 20px;
  color: var(--fg-2);
  font-size: 0.96rem;
}

.modal__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.modal__body li strong,
.modal__body p strong {
  color: var(--fg);
  font-weight: 600;
}

.modal__body .chips {
  margin-top: 12px;
}

.modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 28px 28px;
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-group {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.35s var(--ease);
}

.skill-group:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
}

.skill-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skill-group__head .ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 80%, transparent);
}

.skill-group__head h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.skill-group__head small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skill-group .chips {
  margin-top: 0;
}

.skill-group .chip {
  font-size: 0.78rem;
  padding: 6px 12px;
}

/* ---------- Achievements + Education ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.panel h3 {
  font-size: 1.3rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ach {
  display: grid;
  gap: 10px;
}

.ach li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.ach li:hover {
  border-color: var(--accent-line);
  transform: translateX(4px);
}

.ach .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.ach b {
  display: block;
  font-weight: 600;
}

.ach span {
  font-size: 0.9rem;
  color: var(--fg-2);
}

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

.edu li {
  position: relative;
  padding-left: 26px;
  border-left: 2px solid var(--line);
  margin-left: 6px;
}

.edu li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.edu b {
  display: block;
  font-weight: 600;
  font-size: 1.02rem;
}

.edu span {
  display: block;
  color: var(--fg-2);
  font-size: 0.92rem;
}

.edu small {
  font-family: var(--font-mono);
  color: var(--fg-3);
  font-size: 0.75rem;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  border-radius: 32px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(140deg, var(--glass-hover), var(--glass) 60%);
  backdrop-filter: blur(20px);
  padding: clamp(32px, 6vw, 64px);
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  top: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  pointer-events: none;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  position: relative;
}

.contact__title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.contact__title em {
  font-style: normal;
  color: var(--accent);
}

.contact__lead {
  margin-top: 16px;
  color: var(--fg-2);
  font-size: 1.05rem;
  max-width: 46ch;
}

.contact__list {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}

.contact__list a,
.contact__list .copy-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
  transition: border-color 0.25s, transform 0.3s var(--ease);
}

.contact__list a:hover,
.contact__list .copy-row:hover {
  border-color: var(--accent-line);
  transform: translateX(4px);
}

.contact__list .ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.contact__list .ico svg {
  width: 18px;
  height: 18px;
}

.contact__list b {
  display: block;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact__list span {
  font-weight: 500;
  word-break: break-all;
}

.copy-btn {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-2);
  flex: none;
  transition: all 0.2s;
}

.copy-btn:hover,
.copy-btn.is-copied {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--fg-3);
}

.footer__links {
  display: flex;
  gap: 18px;
}

.footer__links a:hover {
  color: var(--accent);
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 1100;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .nav-burger {
    display: inline-grid;
  }

  .nav-burger.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-burger.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-burger.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav__resume {
    display: none;
  }

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

  .hero__visual {
    order: -1;
    width: min(100%, 300px);
  }

  .tag--1 {
    left: -10px;
  }

  .tag--2 {
    right: -10px;
  }

  .tag--3 {
    left: -6px;
  }

  .scroll-cue {
    display: none;
  }

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

  .terminal {
    position: static;
  }

  .xp {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(var(--max), 100% - 32px);
  }

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

  .project--featured {
    grid-column: span 1;
  }

  .feat-stats {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .tile {
    padding: 20px;
  }


  .hero__cta .btn {
    flex: 1 1 auto;
  }

  .photo-card__tag {
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .modal__panel {
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }

  .modal__head,
  .modal__body {
    padding: 18px 20px;
  }

  .modal__foot {
    padding: 0 20px 24px;
  }
}

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

}

/* ---------- Print (recruiters do print) ---------- */
@media print {
  .nav,
  .mobile-menu,
  .bg-grid,
  .bg-glow,
  .progress,
  .to-top,
  .scroll-cue,
  .modal {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section {
    padding: 24px 0;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- "Also built" strip ---------- */
.also {
  margin-top: 28px;
  padding: 22px 26px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: color-mix(in srgb, var(--bg-2) 40%, transparent);
}

.also__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 10px;
}

.also__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 28px;
}

.also__list li {
  font-size: 0.92rem;
  color: var(--fg-2);
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.also__list li:nth-child(-n + 2) {
  border-top: 0;
}

.also__list a,
.also__static {
  display: inline;
}

.also__list b {
  color: var(--fg);
  font-weight: 600;
}

.also__list a b {
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.also__list a:hover b {
  color: var(--accent);
  border-bottom-color: var(--accent-line);
}

.also__list li > a > span,
.also__static > span {
  color: var(--fg-3);
}

.also__list li > a > span::before,
.also__static > span::before {
  content: " — ";
}

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

  .also__list li:nth-child(2) {
    border-top: 1px solid var(--line);
  }
}

/* inline code in modal */
.modal__body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.modal__foot-links {
  display: none;
}

/* ---------- Fixes after visual review ---------- */
.tile__num {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}

.tile__unit {
  margin-left: 10px;
  font-size: 0.5em;
  font-weight: 700;
  color: var(--fg-2);
  letter-spacing: -0.01em;
}

/* featured cards: keep stats next to the description, push chips to the bottom */
.project--featured .project__desc {
  flex: 0 0 auto;
}

.project--featured .chips {
  margin-top: auto;
  padding-top: 18px;
}

/* ---------- Mobile polish ---------- */
.contact__list span {
  word-break: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .hero {
    padding-top: calc(var(--nav-h) + 16px);
    min-height: 0;
  }

  .hero__visual {
    width: min(100%, 200px);
    justify-self: start;
    margin-bottom: 8px;
  }

  .photo-card {
    padding: 6px;
    border-radius: 22px;
  }

  .photo-card img {
    border-radius: 16px;
  }

  .photo-card__tag {
    display: none;
  }

  .hero__title {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }

  .hero__meta {
    margin-top: 28px;
  }

  .contact__list span {
    font-size: 0.92rem;
  }
}

/* ---------- Logos in tags / icons ---------- */
.ico--img {
  padding: 0;
  overflow: hidden;
  background: transparent;
}

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

.project__icon--img {
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.project__icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Credentials ---------- */
.creds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.cred {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}

.cred[data-img] {
  cursor: zoom-in;
}

.cred:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
}

.cred[data-img]:hover {
  box-shadow: var(--hard);
  transform: translate(-3px, -3px);
}

.cred__media {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 80%, transparent);
  display: grid;
  place-items: center;
}

.cred__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cred__fallback {
  display: none;
  font-size: 1.7rem;
  line-height: 1;
}

.cred__media.is-missing img {
  display: none;
}

.cred__media.is-missing .cred__fallback,
.cred__media--icon .cred__fallback {
  display: block;
}

.cred__media--icon {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.cred__body {
  min-width: 0;
}

.cred__kind {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.cred__title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.cred__issuer {
  margin-top: 5px;
  font-size: 0.86rem;
  color: var(--fg-2);
}

.cred__view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
}

.cred__view svg {
  transition: transform 0.25s var(--ease);
}

.cred:hover .cred__view svg {
  transform: translateX(4px);
}

.two-col--even {
  grid-template-columns: 1fr 1fr;
}

/* image lightbox inside the modal */
.lightbox {
  margin: 0;
}

.lightbox img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.lightbox figcaption {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--fg-3);
}

@media (max-width: 1080px) {
  .creds {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .two-col--even {
    grid-template-columns: 1fr;
  }
}

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

  .cred__media {
    width: 68px;
    height: 68px;
  }
}

/* hide the "view" hint until the certificate image actually exists */
.cred:has(.cred__media.is-missing) .cred__view {
  display: none;
}

.cred:has(.cred__media.is-missing) {
  cursor: default;
}

/* ---------- Icons: line icons + official logo tiles ---------- */
.ico--svg svg,
.skill-group__head .ico svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.ico--logo {
  width: auto;
  min-width: 30px;
  max-width: 84px;
  padding: 4px 6px;
  background: #fff;
  border-color: var(--line-strong);
}

.ico--logo img {
  width: auto;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.project__icon--svg svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.project__icon--logo {
  width: auto;
  min-width: 46px;
  max-width: 130px;
  padding: 8px 10px;
  background: #fff;
  border-color: var(--line-strong);
}

.project__icon--logo img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.cred__media--logo {
  background: #fff;
  border-color: var(--line-strong);
  padding: 10px;
}

.cred__media--logo img {
  object-fit: contain;
}

.cred__fallback svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.cred:has(.cred__media.is-missing) .cred__view {
  display: none;
}

.panel h3 svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: none;
}

.edu li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
}

.edu__logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line-strong);
  object-fit: contain;
}

.ico--square {
  width: 30px;
  padding: 0;
  background: transparent;
  border-color: var(--line);
}

.ico--square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* hide the scroll cue on short windows so it never overlaps the hero text */
@media (max-height: 780px) {
  .scroll-cue {
    display: none;
  }
}

/* ---------- Motion layer (GSAP owns these when loaded) ---------- */
.has-gsap .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.has-gsap .project {
  transition: border-color 0.3s, box-shadow 0.35s var(--ease), opacity 0.3s;
  will-change: transform;
}

.has-gsap .project:hover {
  transform: none;
}

.has-gsap .nav {
  transition: background-color 0.3s, border-color 0.3s;
}

.hero__title .ch {
  display: inline-block;
  will-change: transform, opacity;
}

.section-title .ln,
.contact__title .ln {
  display: block;
}

.btn:active {
  transform: scale(0.97);
}

.icon-btn:active {
  transform: scale(0.92);
}

.chip {
  transition: transform 0.2s var(--ease), border-color 0.2s, background-color 0.2s;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.theme-toggle {
  transform-origin: 50% 50%;
}

.tile,
.cred,
.skill-group {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .has-gsap .project,
  .tile,
  .cred,
  .skill-group {
    will-change: auto;
  }
}

.hero__title .wd {
  display: inline-block;
  white-space: nowrap;
}
