/* ============================================================
   Alejandro Cadavid — Portfolio 2026
   Direction A: "Editorial Grotesk"
   Clash Display (display) + Switzer (body) · light, minimal,
   one cobalt accent. No serifs, no Inter.
   ============================================================ */

:root {
  --bg: #FAFAF6;
  --surface: #FFFFFF;
  --ink: #131310;
  --ink-2: #55524A;
  --ink-3: #8B877C;
  --line: #E7E4DA;
  --line-strong: #D3CFC2;
  --accent: #B61EDE;
  --accent-soft: #F5E9FC;
  --tint-stone: #F0EFE9;
  --tint-sage: #E9EFEA;
  --tint-sand: #F4EEE3;
  --tint-iris: #ECECF4;
  --font-display: 'Clash Display', 'Avenir Next', sans-serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 4.5vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

/* ---------- type utilities ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------- link micro-interaction ---------- */

.u-link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.u-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.45s var(--ease-out);
}
.u-link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(250, 250, 246, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.4s var(--ease-out);
}
.nav-logo:hover .dot { transform: scale(1.5); }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  font-size: 14px;
  font-weight: 500;
}
.nav-links .u-link { color: var(--ink-2); transition: color 0.2s ease; }
.nav-links .u-link:hover { color: var(--ink); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease-out);
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-1px);
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px var(--pad) clamp(32px, 5vh, 56px);
  position: relative;
  overflow: hidden;
}
.hero > *:not(.hero-bg):not(.hero-portrait):not(.hero-title) { position: relative; z-index: 1; }

/* ---------- hero portrait (behind the type, nav → divider) ---------- */
.hero-portrait {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 84px;
  height: calc(100svh - 84px - 220px); /* fallback; JS refines to exact divider */
  width: auto;
  max-width: 92vw;
  object-fit: contain;
  object-position: bottom center;
  z-index: 1;
  filter: grayscale(1) contrast(1.03);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 58%, rgba(0,0,0,0.4) 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 58%, rgba(0,0,0,0.4) 82%, transparent 100%);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  animation: portraitIn 1.3s ease 0.25s forwards;
}
@keyframes portraitIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-portrait { animation: none; opacity: 1; }
}

/* ---------- animated blurred background ---------- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  filter: blur(70px) saturate(1.1);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 62%, transparent 96%);
  mask-image: linear-gradient(to bottom, black 0%, black 62%, transparent 96%);
}
.hero-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: clamp(16px, 3vh, 36px);
}
.hero-index {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(54px, 12vw, 194px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  user-select: none;
  position: relative;
}
/* hover: accent color only on the base layer (visible outside portrait);
   glow layer (white overlay over portrait) is untouched */
.hero-title .title-layer.base .line > span {
  transition: color 0.45s var(--ease-out);
}
.hero-title:hover .title-layer.base .line:not(.outline) > span {
  color: #0230E2;
}
[data-theme="dark"] .hero-title:hover .title-layer.base .line:not(.outline) > span {
  color: var(--accent);
}
.hero-title .title-layer { display: block; }
.hero-title .title-layer.glow {
  position: absolute;
  inset: 0;
}
.hero-title .title-layer.glow .line > span {
  position: relative;
  z-index: 2;
  color: #fff;
  mix-blend-mode: overlay;
  opacity: 0.7;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 1.1s var(--ease-out) forwards;
}
.hero-title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero-title .line.indent { padding-left: clamp(40px, 12vw, 280px); }
.hero-title .outline {
  text-align: right;
  color: transparent;
}
/* outline per layer: dark stroke below the photo, white overlay stroke above it */
.hero-title .title-layer.base .outline { visibility: hidden; }
.hero-title .title-layer.glow .outline { -webkit-text-stroke: 1.5px var(--ink); }
.hero-title .title-layer.glow .outline > span { color: transparent; opacity: 1; mix-blend-mode: normal; }
@keyframes rise {
  to { transform: translateY(0); }
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 96px);
  align-items: end;
  margin-top: clamp(28px, 6vh, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-statement {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 560px;
  text-wrap: pretty;
}
.hero-meta {
  display: flex;
  justify-content: flex-end;
  gap: clamp(24px, 4vw, 64px);
  font-size: 13px;
}
.hero-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.hero-meta dd { font-weight: 500; }
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2BAA6E;
  margin-right: 7px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.scroll-hint {
  position: absolute;
  bottom: clamp(32px, 5vh, 56px);
  right: var(--pad);
  display: none;
}

/* ---------- section scaffolding ---------- */

.section {
  padding: clamp(80px, 12vh, 160px) var(--pad) 0;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: clamp(36px, 6vh, 72px);
}
.section-head .count {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

/* ---------- work / project cards ---------- */

.work-list {
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 10vh, 120px);
}
.project {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2.5vw, 40px);
  align-items: end;
}
.project .p-media { grid-column: 1 / 9; }
.project .p-info { grid-column: 9 / 13; }
.project.alt .p-media { grid-column: 5 / 13; order: 2; }
.project.alt .p-info { grid-column: 1 / 5; order: 1; }

.p-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--tint-stone);
  aspect-ratio: 16 / 10.5;
  display: block;
}
.p-media .mock-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}
.project:hover .p-media .mock-wrap { transform: scale(1.035); }

/* full-bleed project cover image */
.p-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-media .p-tag {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 3;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(250, 250, 246, 0.92);
  padding: 7px 13px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
}
.project:hover .p-tag { opacity: 1; transform: translateY(0); }

.p-info { padding-bottom: 4px; }
.p-info .p-num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 14px;
  display: block;
}
.p-info h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 2.6vw, 38px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-bottom: 12px;
}
.p-info h3 a {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
.p-info .arrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7em;
  transform: translate(-6px, 0);
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.3s ease;
  color: var(--accent);
}
.project:hover .arrow { transform: translate(0, 0); opacity: 1; }
.p-info p {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 16px;
  max-width: 360px;
  text-wrap: pretty;
}
.p-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.project:hover .chip { border-color: var(--ink-3); color: var(--ink); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}
.portrait {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--tint-iris), var(--tint-stone));
}
.portrait .ph-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.portrait .ph-mono {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 600;
  color: var(--line-strong);
  letter-spacing: -0.03em;
  line-height: 1;
}
.about-copy p {
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 24px;
  text-wrap: pretty;
}
.about-copy p strong { color: var(--ink); font-weight: 600; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(32px, 5vh, 56px);
}
.stat {
  padding: 24px 24px 0 0;
}
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 4.5vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat .num em { font-style: normal; color: var(--accent); }
.stat .lbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 10px;
}

/* ---------- capabilities ---------- */

.cap-list { border-top: 1px solid var(--line); }
.cap-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1.6fr) 48px;
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
  padding: clamp(24px, 4vh, 44px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: default;
  transition: border-color 0.4s ease;
}
.cap-row > * { position: relative; z-index: 1; }

/* slide the row content right on hover using translateX — no layout shift */
.cap-row-inner-shift {
  display: contents;
}
.cap-row:hover .cap-num,
.cap-row:hover h3,
.cap-row:hover .cap-tags,
.cap-row:hover .cap-arrow {
  transform: translateX(14px);
}

.cap-num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  transition: color 0.4s var(--ease-out), transform 0.55s var(--ease-out);
}
.cap-row:hover .cap-num { color: var(--accent); }

.cap-row h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.015em;
  line-height: 1.1;
  transition: color 0.4s var(--ease-out), transform 0.55s var(--ease-out);
}
.cap-row:hover h3 { color: var(--accent); }

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transition: transform 0.55s var(--ease-out);
}
.cap-tags .chip {
  transition: border-color 0.35s ease, color 0.35s ease;
}

.cap-arrow {
  font-size: 22px;
  color: var(--ink-3);
  transform: rotate(0deg);
  transition:
    transform 0.55s var(--ease-out),
    color 0.4s var(--ease-out);
  text-align: right;
}
.cap-row:hover .cap-arrow {
  transform: translateX(14px) rotate(45deg);
  color: var(--accent);
}

/* ---------- experience / clients ---------- */

.exp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
}
.exp-list { border-top: 1px solid var(--line); }
.exp-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-left 0.4s var(--ease-out), background 0.3s ease;
  cursor: pointer;
}
.exp-item:hover { padding-left: 10px; }
.exp-item.active {
  padding-left: 14px;
}
.exp-item.active .exp-years { color: var(--accent); }
.exp-item.active h4 { color: var(--accent); }
.exp-years {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  transition: color 0.3s ease;
}
.exp-item h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.exp-item span {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 2px;
}

.exp-detail { position: relative; }
#exp-text {
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
}
.exp-projects {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.exp-project {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.exp-project:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.exp-proj-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.exp-proj-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.exp-proj-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
}
.exp-project p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
  margin: 0;
}

.marquee {
  margin-top: clamp(56px, 9vh, 100px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 32px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: grayscale(1) opacity(0.45);
  transition: filter 0.4s var(--ease-out);
  flex: none;
}
.marquee-logo:hover { filter: grayscale(0) opacity(1); }
[data-theme="dark"] .marquee-logo { filter: grayscale(0) opacity(0.9); }
[data-theme="dark"] .marquee-logo:hover { filter: grayscale(0) opacity(1); }
[data-theme="dark"] .marquee-logo[src*="logo-sothebys"] { filter: invert(1) opacity(0.9); }
[data-theme="dark"] .marquee-logo[src*="logo-sothebys"]:hover { filter: invert(1) opacity(1); }
[data-theme="dark"] .marquee-logo[src*="logo-drtwrk"] { content: url('/assets/logo-drtwrk-dark.png'); filter: none; opacity: 0.9; }
[data-theme="dark"] .marquee-logo[src*="logo-drtwrk"]:hover { opacity: 1; }
[data-theme="dark"] .marquee-logo[src*="logo-forward"] { content: url('/assets/logo-forward-dark.png'); filter: none; opacity: 0.9; }
[data-theme="dark"] .marquee-logo[src*="logo-forward"]:hover { opacity: 1; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- footer ---------- */

.footer {
  margin-top: clamp(80px, 14vh, 180px);
  background: var(--ink);
  color: var(--bg);
  padding: clamp(72px, 12vh, 150px) var(--pad) 36px;
  border-radius: 24px 24px 0 0;
}
.footer .eyebrow { color: rgba(250,250,246,0.5); }
.footer-cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 9vw, 150px);
  letter-spacing: -0.025em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 28px 0 clamp(40px, 7vh, 80px);
  display: block;
}
.footer-cta .swap {
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--bg);
  transition: color 0.45s ease;
}
.footer-cta:hover .swap { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(250,250,246,0.16);
}
.footer-email {
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 500;
}
.footer-socials {
  display: flex;
  gap: clamp(16px, 2.5vw, 36px);
  font-size: 14px;
  font-weight: 500;
  color: rgba(250,250,246,0.66);
}
.footer-socials .u-link:hover { color: var(--bg); }
.footer-fine {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  font-size: 12px;
  color: rgba(250,250,246,0.4);
}

/* ============================================================
   Code-drawn UI mocks (skeleton kit)
   ============================================================ */

.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 60px -28px rgba(19, 19, 16, 0.28);
  overflow: hidden;
}
.mock-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.mock-chrome i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.mock-chrome .url {
  flex: 1;
  height: 16px;
  margin-left: 10px;
  border-radius: 999px;
  background: var(--tint-stone);
  max-width: 220px;
}
.mock-body { padding: 18px; }

/* skeleton primitives */
.sk-bar { border-radius: 4px; background: #E9E7DF; }
.sk-bar.dark { background: var(--ink); }
.sk-bar.acc { background: var(--accent); }
.sk-bar.soft { background: var(--accent-soft); }
.sk-line { height: 8px; border-radius: 999px; background: #ECEAE2; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
.sk-line.w80 { width: 80%; }
.sk-chip-sm {
  height: 18px; border-radius: 999px;
  background: var(--tint-stone);
  display: inline-block;
}
.sk-avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #7A8DF2 100%);
}
.sk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* bar chart */
.sk-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
}
.sk-chart i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: #E9E7DF;
}
.sk-chart i.acc { background: var(--accent); }

/* line chart */
.sk-spark {
  height: 60px;
  background:
    linear-gradient(to top right, transparent 47.5%, var(--accent) 48.5%, var(--accent) 51.5%, transparent 52.5%) no-repeat;
  border-bottom: 1px solid var(--line);
}

/* phone frame */
.mock-phone {
  width: clamp(150px, 17vw, 220px);
  aspect-ratio: 9 / 18.5;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: 0 30px 70px -30px rgba(19,19,16,0.35);
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock-phone .notch {
  width: 56px; height: 14px;
  border-radius: 999px;
  background: var(--ink);
  margin: 0 auto 4px;
  flex: none;
}

/* ============================================================
   Motion: reveals & parallax
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

[data-parallax] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-title .line > span { animation: none; transform: none; }
  .marquee-track { animation: none; }
  [data-parallax] { transform: none !important; }
  html { scroll-behavior: auto; }
}


[data-theme="dark"] {
  --bg: #0A0A0F;
  --surface: #13131C;
  --ink: #EDECEA;
  --ink-2: #9B9890;
  --ink-3: #5C5952;
  --line: #1E1E2A;
  --line-strong: #2C2C3A;
  --accent: #B61EDE;
  --accent-soft: #2A1038;
  --tint-stone: #141420;
  --tint-sage: #0F1915;
  --tint-sand: #1A1510;
  --tint-iris: #141228;
}

/* nav */
[data-theme="dark"] .nav.scrolled {
  background: rgba(10, 10, 15, 0.88);
}

/* hero bg — more vivid on dark */
[data-theme="dark"] .hero-bg { filter: blur(70px) saturate(1.7); }

/* footer — always dark in both modes */
[data-theme="dark"] .footer { background: #05050A; color: var(--ink); }
[data-theme="dark"] .footer-cta .swap { -webkit-text-stroke-color: var(--ink); }
[data-theme="dark"] .footer-cta:hover .swap { color: var(--accent); -webkit-text-stroke-color: var(--accent); }

/* mock components */
[data-theme="dark"] .mock {
  background: #17171F;
  border-color: var(--line);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.6);
}
[data-theme="dark"] .mock-chrome { border-color: var(--line); }
[data-theme="dark"] .mock-chrome i { background: var(--line-strong); }
[data-theme="dark"] .mock-chrome .url { background: var(--line); }
[data-theme="dark"] .mock-phone { background: #17171F; border-color: var(--line-strong); box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6); }
[data-theme="dark"] .mock-phone .notch { background: var(--ink); }

/* skeleton */
[data-theme="dark"] .sk-bar { background: #22222E; }
[data-theme="dark"] .sk-bar.dark { background: var(--ink); }
[data-theme="dark"] .sk-bar.acc { background: var(--accent); }
[data-theme="dark"] .sk-bar.soft { background: var(--accent-soft); }
[data-theme="dark"] .sk-line { background: #1E1E2C; }
[data-theme="dark"] .sk-chip-sm { background: var(--line); }
[data-theme="dark"] .sk-card { background: #17171F; border-color: var(--line); }
[data-theme="dark"] .sk-chart i { background: #22222E; }

/* theme toggle button */
.theme-toggle {
  border: none;
  background: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-2);
  transition: color 0.2s ease, background 0.2s ease;
  flex: none;
  padding: 0;
}
.theme-toggle:hover { background: var(--line); color: var(--ink); }
.tt-icon { width: 17px; height: 17px; display: block; }
/* light mode → show moon */
.tt-sun { display: none; }
.tt-moon { display: block; }
/* dark mode → show sun */
[data-theme="dark"] .tt-sun { display: block; }
[data-theme="dark"] .tt-moon { display: none; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 920px) {
  .project .p-media, .project.alt .p-media { grid-column: 1 / 13; order: 1; }
  .project .p-info, .project.alt .p-info { grid-column: 1 / 13; order: 2; }
  .hero-foot { grid-template-columns: 1fr; }
  .hero-meta { justify-content: flex-start; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .exp-grid { grid-template-columns: 1fr; }
  .cap-row { grid-template-columns: 48px 1fr 32px; }
  .cap-tags { grid-column: 2 / 3; }
  .cap-arrow { grid-row: 1; grid-column: 3; }
  .nav-links .hide-m { display: none; }
  .stats-row { grid-template-columns: 1fr; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}
