/* Palette: warm paper, rosewood, sand, champagne — no orange / green / blue / purple as brand hues */
:root {
  --pointer-x: 0;
  --pointer-y: 0;
  --bg: #0d0a09;
  --paper: #161110;
  --paper-2: #1f1b1a;
  --text: #f2ebe7;
  --muted: #9e9390;
  --line: rgba(245, 232, 224, 0.12);
  --rose: #b17a7f;
  --rose-deep: #6d3a42;
  --bloom: rgba(177, 122, 127, 0.12);
  --sand: #c9b5a8;
  --champagne: #d8cec4;
  --ink: #1a1214;
  --ok: #a67f7a;
  --err: #c45c5c;
  --grad-page: radial-gradient(ellipse 100% 80% at 15% 0%, rgba(177, 122, 127, 0.09) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 20%, rgba(201, 181, 168, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #0d0a09 0%, #120e0c 100%);
  --font-sans: "Sora", system-ui, sans-serif;
  --font-serif: "Fraunces", "Georgia", serif;
  --header-h: 3.5rem;
  --rail-w: 3.25rem;
}

body.light {
  --bg: #f7f1ec;
  --paper: #fffdfb;
  --paper-2: #f0e8e2;
  --text: #1c1315;
  --muted: #5e5654;
  --line: rgba(28, 19, 21, 0.1);
  --rose: #8f5a5f;
  --rose-deep: #5a2f36;
  --bloom: rgba(143, 90, 95, 0.08);
  --sand: #9a8478;
  --champagne: #5c4f4a;
  --contrast: #1a1214;
  --ok: #6d4549;
  --err: #b54545;
  --grad-page: radial-gradient(ellipse 100% 70% at 8% 0%, rgba(201, 181, 168, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 10%, rgba(177, 122, 127, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #f7f1ec 0%, #f3ebe5 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--grad-page);
  background-attachment: fixed;
  min-height: 100dvh;
  transition: color 0.3s ease, background 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.scrim[hidden] {
  display: none;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(10, 8, 8, 0.45);
  backdrop-filter: blur(2px);
}

/* Background */
.canvas-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: var(--grad-page);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.bloom {
  position: fixed;
  border-radius: 50%;
  filter: blur(64px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.b1 {
  width: min(320px, 45vw);
  height: min(320px, 45vw);
  top: -8%;
  right: -4%;
  background: radial-gradient(circle at 40% 40%, #c4a8a0 0%, #7a4a50 50%, transparent 70%);
}
.b2 {
  width: min(240px, 40vw);
  height: min(240px, 40vw);
  bottom: 12%;
  left: -5%;
  background: radial-gradient(circle at 50% 50%, #b8968c 0%, #4a2c30 55%, transparent 75%);
  opacity: 0.35;
}
.b3 {
  width: min(200px, 32vw);
  height: min(200px, 32vw);
  bottom: 28%;
  right: 8%;
  background: radial-gradient(circle at 50% 50%, #3d2a2c 0%, #1a1012 60%);
  opacity: 0.4;
}

body.light .b1 {
  opacity: 0.28;
}
body.light .b2 {
  opacity: 0.2;
}
body.light .b3 {
  opacity: 0.12;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--sand), var(--rose-deep), var(--rose));
  pointer-events: none;
}

/* Shell + rail + header */
.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
  padding-left: 0;
}

@media (min-width: 1024px) {
  .shell {
    padding-left: var(--rail-w);
  }
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  transition: transform 0.3s ease;
}

@media (min-width: 1024px) {
  .top {
    left: var(--rail-w);
  }
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: auto;
  min-width: 0;
  min-height: 2.75rem;
  max-width: min(15rem, 58vw);
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--rose) 9%, var(--bg));
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.brand:hover {
  background: color-mix(in srgb, var(--rose) 16%, var(--bg));
  border-color: color-mix(in srgb, var(--rose) 32%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rose) 12%, transparent);
}
.brand-mark {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(0.9rem, 2.8vw, 1.1rem);
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--champagne);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.brand-suffix {
  font-weight: 500;
}
body.light .brand {
  background: color-mix(in srgb, var(--rose) 5%, var(--paper));
  border-color: var(--line);
}
body.light .brand:hover {
  background: color-mix(in srgb, var(--rose) 11%, var(--paper));
  border-color: color-mix(in srgb, var(--rose) 25%, var(--line));
}
body.light .brand-mark {
  color: var(--rose-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s, border-color 0.25s, color 0.25s;
}
.btn:active {
  transform: scale(0.98);
}

.btn-fill {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 15%, transparent);
}
body.light .btn-fill {
  background: var(--contrast);
  color: #fffdfb;
}
.btn-fill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--rose-deep) 18%, transparent);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--rose) 45%, var(--line));
  background: var(--bloom);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  width: 100%;
  max-width: 20rem;
  justify-content: center;
  margin-top: 0.5rem;
  border-radius: 10px;
  padding: 0.7rem 1rem;
}
.btn-outline:hover {
  border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
}

.btn-cv {
  display: none;
  margin-left: 0.5rem;
}
@media (min-width: 600px) {
  .btn-cv {
    display: inline-flex;
  }
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}
.icon-btn:hover {
  background: var(--bloom);
  border-color: color-mix(in srgb, var(--rose) 30%, var(--line));
}
.icon-btn .theme-icon {
  display: none;
  line-height: 1;
}
body:not(.light) .icon-btn .theme-icon.moon,
body.light .icon-btn .theme-icon.sun {
  display: block;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: 0.25rem;
}
@media (min-width: 1024px) {
  .menu-btn {
    display: none;
  }
}
.icon-bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s;
}
.menu-btn.is-open .icon-bar:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.menu-btn.is-open .icon-bar:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Rail (desktop) */
.rail {
  display: none;
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  flex-direction: column;
  align-items: center;
  padding: calc(var(--header-h) + 0.5rem) 0 1rem;
  gap: 0.1rem;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
@media (min-width: 1024px) {
  .rail {
    display: flex;
  }
}
.rail-link {
  position: relative;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.15rem;
  transition: color 0.2s, transform 0.2s;
}
.rail-n {
  display: block;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--rose);
  opacity: 0.8;
  margin-top: 0.25rem;
}
.rail-t {
  display: block;
  font-size: 0.58rem;
}
.rail-link:hover,
.rail-link:focus-visible {
  color: var(--text);
}
.rail-link::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.15rem;
  width: 2px;
  height: 0;
  background: var(--rose);
  transform: translateX(-50%);
  transition: height 0.3s;
  opacity: 0.6;
}
.rail-link:hover::before,
.rail-link:focus-visible::before {
  height: 1.1rem;
}

/* Drawer (mobile) */
.drawer[hidden] {
  display: none;
}
.drawer {
  position: fixed;
  z-index: 60;
  top: var(--header-h);
  right: 0;
  width: min(20rem, 86vw);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 1.25rem;
  box-shadow: -20px 0 50px color-mix(in srgb, #000 35%, transparent);
  animation: drawer-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 1024px) {
  .drawer {
    display: none !important;
  }
}
@keyframes drawer-in {
  from {
    transform: translateX(100%);
    opacity: 0.8;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1.05rem;
  font-weight: 500;
}
.drawer-nav a {
  padding: 0.65rem 0.4rem;
  border-radius: 8px;
  color: var(--text);
  transition: background 0.2s;
}
.drawer-nav a:hover,
.drawer-nav a:focus-visible {
  background: var(--bloom);
}

.page {
  flex: 1;
}

/* Hero */
.hero {
  padding: clamp(2rem, 5vw, 3.5rem) 0 2rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
  }
}

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 600;
}
.display {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-variation-settings: "wght" 600, "opsz" 72;
  margin-bottom: 1.25rem;
}
.display .line {
  display: block;
}
.line-accent {
  color: transparent;
  background: linear-gradient(110deg, var(--champagne) 0%, var(--rose) 42%, var(--rose-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
body.light .line-accent {
  background: linear-gradient(110deg, var(--rose-deep) 0%, var(--rose) 50%, #7a3e44 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.lede {
  max-width: 40ch;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.lede strong {
  color: var(--text);
  font-weight: 600;
}
.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* CSS-only showcase */
.showcase {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 30px 60px color-mix(in srgb, #000 32%, transparent);
  animation: float-show 6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .showcase {
    animation: none;
  }
}
@keyframes float-show {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.showcase-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.7rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.showcase-chrome .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8a5c5c;
  opacity: 0.5;
}
.showcase-chrome .dot:nth-child(2) {
  background: #b89a8f;
}
.showcase-chrome .dot:nth-child(3) {
  background: #6a4a4c;
}
.showcase-body {
  padding: 1.1rem 1.1rem 1.25rem;
  position: relative;
}
.showcase-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 200px;
  max-height: min(44vh, 400px);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  contain: content;
}
.showcase-slides {
  position: absolute;
  inset: 0;
  min-height: 200px;
}
.showcase-slides .showcase-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.4s ease-in-out;
  will-change: opacity;
}
.showcase-slides .showcase-img.is-active {
  opacity: 1;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .showcase-slides .showcase-img {
    transition: none;
  }
  .showcase-slides .showcase-img:not(.is-active) {
    visibility: hidden;
  }
}
.showcase-label {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-align: left;
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: 500;
  max-width: 100%;
}
.showcase-link {
  color: var(--rose);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--rose) 50%, transparent);
  font-weight: 600;
}
body.light .showcase-link {
  color: var(--rose-deep);
}
.showcase-link:hover {
  text-decoration-color: var(--rose);
}

/* Marquee */
.marquee-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 40%, transparent);
  overflow: hidden;
}
.marquee {
  max-width: 100%;
  padding: 0.6rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  animation: marquee 35s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
.marquee-track span {
  white-space: nowrap;
}

/* Sections */
.section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.section-bento {
  background: color-mix(in srgb, var(--paper) 30%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  margin-bottom: 1.75rem;
  max-width: 42rem;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.subhead {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 38ch;
}

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 720px) {
  .bento {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "wide t1"
      "wide t2";
  }
  .bento-wide {
    grid-area: wide;
  }
  .bento-tile:nth-of-type(2) {
    grid-area: t1;
  }
  .bento-tile:nth-of-type(3) {
    grid-area: t2;
  }
}
.bento-cell {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  background: var(--paper);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.bento-wide p + p {
  margin-top: 0.9rem;
  color: var(--muted);
}
.bento-tile {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 5.5rem;
}
.big-num {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--champagne);
}
body.light .big-num {
  color: var(--rose-deep);
}
.tile-cap {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.bento-cell:hover {
  border-color: color-mix(in srgb, var(--rose) 28%, var(--line));
  box-shadow: 0 16px 40px color-mix(in srgb, #000 20%, transparent);
}

.section-skills {
  overflow: hidden;
}
.skill-deck {
  display: flex;
  gap: 0.9rem;
  padding: 0.5rem 0 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.skill-deck::after {
  content: "";
  flex: 0 0 0.5rem;
}
.skill-card {
  flex: 0 0 min(300px, 86vw);
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--paper);
  min-height: 8.5rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
}
.skill-pill {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.4rem;
}
body.light .skill-pill {
  color: var(--rose-deep);
}
.skill-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.skill-card p {
  font-size: 0.88rem;
  color: var(--muted);
}
.skill-card:hover {
  border-color: color-mix(in srgb, var(--rose) 32%, var(--line));
  box-shadow: 0 20px 48px color-mix(in srgb, #000 18%, transparent);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(1.25rem, 3.5vw, 2rem);
  padding-top: clamp(0.5rem, 1.5vw, 0.85rem);
}
.chip-row span {
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bloom);
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}
.chip-row span:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--rose) 30%, var(--line));
  color: var(--text);
}

/* Projects magazine */
.project-mag {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.project-feature {
  display: grid;
  gap: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
  transition: box-shadow 0.35s;
}
.project-feature:hover {
  box-shadow: 0 28px 60px color-mix(in srgb, #000 22%, transparent);
}
@media (min-width: 900px) {
  .project-feature {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
  }
}
.project:not(.project-feature) {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
}
@media (min-width: 700px) {
  .project:not(.project-feature) {
    grid-template-columns: 0.9fr 1.1fr;
  }
}
.project-fig {
  position: relative;
  display: block;
  min-height: 10rem;
  background: var(--paper-2);
  overflow: hidden;
}
.project-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.project:hover .project-fig img {
  transform: scale(1.05);
}
.project-copy {
  padding: 1.15rem 1.2rem 1.3rem;
}
.project-feature .project-copy {
  padding: 1.4rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-copy h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.type {
  font-size: 0.78rem;
  color: var(--rose);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.55rem;
}
.project-copy p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  max-width: 44ch;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.25rem;
  transition: gap 0.25s, color 0.25s;
}
.text-link::after {
  content: "→";
  transition: transform 0.25s;
  color: var(--rose);
}
.text-link:hover {
  color: var(--champagne);
  gap: 0.5rem;
}
.text-link:hover::after {
  transform: translateX(4px);
}
body.light .text-link:hover {
  color: var(--rose-deep);
}

/* Timeline */
.section-timeline {
  background: color-mix(in srgb, var(--paper) 25%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
@media (min-width: 600px) {
  .timeline {
    padding-left: 2.25rem;
  }
}
.timeline-rail {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  bottom: 0.45rem;
  width: 2px;
  background: linear-gradient(180deg, var(--rose), var(--rose-deep) 50%, transparent);
  border-radius: 2px;
  opacity: 0.45;
}
.timeline-node h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}
.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rose);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.timeline-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.timeline-node ul {
  margin-left: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.timeline-node li {
  margin-bottom: 0.4rem;
}

/* Contact */
.section-contact {
  padding-bottom: 0;
}
.contact-grid {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }
  .contact-lead {
    grid-column: 1 / -1;
  }
  .card-form {
    grid-row: 2;
  }
  .links-stack {
    grid-row: 2;
    align-self: start;
  }
}
.contact-lead h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  max-width: 20ch;
  margin: 0.4rem 0 0.5rem;
}
.card-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--paper);
}
.field {
  margin-bottom: 0.9rem;
}
.field label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.field input,
.field textarea,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: var(--paper-2);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field textarea:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
  box-shadow: 0 0 0 3px var(--bloom);
}
.field input.input-invalid,
.field textarea.input-invalid,
.contact-form textarea.input-invalid {
  border-color: var(--err);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--err) 20%, transparent);
}
.field-error {
  display: block;
  min-height: 1.05em;
  font-size: 0.78rem;
  color: var(--err);
  margin-top: 0.2rem;
}
.honeypot-field {
  position: absolute;
  left: -99rem;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.form-note {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  min-height: 1.2em;
  color: var(--muted);
}
.form-note.success {
  color: var(--ok);
}
.form-note.error {
  color: var(--err);
}
.links-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.2rem 0;
}
.out-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  max-width: 24rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.45rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.link-ico {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bloom) 50%, var(--paper));
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.link-ico svg {
  width: 1.05rem;
  height: 1.05rem;
}
.out-link .link-txt {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.out-link .out-arrow {
  flex-shrink: 0;
  font-size: 0.85em;
  opacity: 0.5;
  transition: transform 0.25s, opacity 0.25s;
}
.out-link:hover {
  border-color: var(--line);
  color: var(--rose);
}
.out-link:hover .link-ico {
  border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
  color: var(--rose);
  background: var(--bloom);
}
body.light .out-link:hover,
body.light .out-link:hover .link-ico {
  color: var(--rose-deep);
}
body.light .out-link:hover .link-ico {
  border-color: color-mix(in srgb, var(--rose-deep) 30%, var(--line));
}
.out-link:hover .out-arrow {
  transform: translate(2px, -2px);
  opacity: 0.9;
}

.btn-whatsapp {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  max-width: 24rem;
  margin-top: 0.35rem;
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-radius: 10px;
  box-shadow: none;
  transform: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-whatsapp:hover,
.btn-whatsapp:focus-visible,
.btn-whatsapp:active {
  box-shadow: none;
  transform: none;
  border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
  background: var(--bloom);
}
.btn-whatsapp .link-ico {
  border-radius: 8px;
  width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  box-shadow: none;
  filter: none;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--text);
  isolation: isolate;
}
.btn-whatsapp .link-ico svg {
  display: block;
  flex-shrink: 0;
  overflow: visible;
  shape-rendering: geometricPrecision;
  filter: none;
}
.btn-whatsapp:hover .link-ico,
.btn-whatsapp:focus-visible .link-ico {
  color: var(--text);
  border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
  background: var(--bloom);
  box-shadow: none;
  filter: none;
  transform: none;
}
body.light .btn-whatsapp:hover .link-ico,
body.light .btn-whatsapp:focus-visible .link-ico {
  color: var(--text);
  border-color: color-mix(in srgb, var(--rose-deep) 28%, var(--line));
  background: color-mix(in srgb, var(--rose) 6%, var(--paper));
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.05s;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.project-mag .reveal:nth-child(1) {
  transition-delay: 0s;
}
.project-mag .reveal:nth-child(2) {
  transition-delay: 0.06s;
}
.project-mag .reveal:nth-child(3) {
  transition-delay: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track {
    animation: none;
  }
  .bloom {
    transition: none;
  }
}
