/* ============================================================
   Rafaffonso — Portfolio website
   Recreated from the design handoff (high fidelity).
   ============================================================ */

/* ---- Montserrat — body / UI (Google Fonts) ---- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ---- ED Nimpkish — display / headings ---- */
@font-face {
  font-family: 'ED Nimpkish';
  src: url('../assets/fonts/EDNimpkish-Regular.otf') format('opentype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Redonda — subtitles / signature / accents ---- */
@font-face {
  font-family: 'Redonda';
  src: url('../assets/fonts/Redonda-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Redonda';
  src: url('../assets/fonts/Redonda-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Redonda';
  src: url('../assets/fonts/Redonda-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Redonda';
  src: url('../assets/fonts/Redonda-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Redonda';
  src: url('../assets/fonts/Redonda-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Redonda';
  src: url('../assets/fonts/Redonda-Black.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ============================================================
   Tokens
   ============================================================ */
:root {
  /* Core brand palette */
  --brand-crimson: #C13D62;
  --brand-green:   #3DC19C;
  --brand-blue:    #3D62C1;
  --brand-cloud:   #EDEFF0;
  --brand-ink:     #191B1C;

  /* Tints & shades */
  --crimson-600: #A32F51;
  --crimson-400: #D46484;
  --crimson-100: #F6DFE6;
  --green-600:   #2E9E80;
  --green-400:   #6FD3B8;
  --green-100:   #DBF3EB;
  --blue-600:    #2F4EA3;
  --blue-400:    #6C88D3;
  --blue-100:    #DEE4F6;

  /* Neutral ramp */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #F7F8F8;
  --neutral-100: #EDEFF0;
  --neutral-200: #DCDFE1;
  --neutral-300: #C2C6C9;
  --neutral-400: #9A9FA3;
  --neutral-500: #6E7377;
  --neutral-600: #4A4E51;
  --neutral-700: #2E3133;
  --neutral-900: #191B1C;

  /* Semantic aliases */
  --text-primary:   var(--brand-ink);
  --text-secondary: var(--neutral-600);
  --text-muted:     var(--neutral-400);
  --text-inverse:   var(--neutral-0);
  --border-subtle:  var(--neutral-200);
  --link:           var(--brand-crimson);
  --link-hover:     var(--crimson-600);

  /* Typography */
  --font-display: 'ED Nimpkish', 'Montserrat', system-ui, sans-serif;
  --font-script:  'Redonda', 'Montserrat', system-ui, sans-serif;
  --font-body:    'Montserrat', system-ui, -apple-system, sans-serif;
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --lh-tight:   1.04;
  --lh-snug:    1.2;
  --lh-normal:  1.5;
  --lh-relaxed: 1.7;
  --ls-wide:   0.08em;
  --ls-caps:   0.14em;
  --ls-snug:   -0.015em;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;

  /* Shadows */
  --shadow-block: 6px 6px 0 var(--brand-ink);
  --shadow-card: 0 1px 2px rgba(25,27,28,0.04), 0 16px 40px rgba(25,27,28,0.06);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--neutral-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--link-hover); }

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

img { max-width: 100%; }

/* Decorative mask-symbol helper: pair with inline background + mask urls */
.sym { display: block; }

@keyframes rf-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(9px); }
}
@keyframes rf-float {
  from { transform: translateY(-8px) rotate(-4deg); }
  to   { transform: translateY(10px) rotate(5deg); }
}

.container { max-width: 1240px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* Section title (display face) */
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.script-sub {
  margin: 18px 0 0;
  font-family: var(--font-script);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: var(--lh-normal);
  color: var(--text-secondary);
}

/* ============================================================
   Buttons (design-system Button component)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  line-height: 1;
  padding: 11px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand-crimson); color: #fff; border: 2px solid var(--brand-crimson); }
.btn--primary:hover { color: #fff; }
.btn--ink { background: var(--brand-ink); color: #fff; border: 2px solid var(--brand-ink); }
.btn--ink:hover { color: #fff; }
.btn--ghost { background: transparent; color: var(--brand-ink); border: 2px solid var(--brand-ink); }
.btn--ghost:hover { color: var(--brand-ink); }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border-subtle);
}
.navbar__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar__logo { display: flex; align-items: center; }
.navbar__logo img { height: 30px; display: block; }
.navbar__links { display: flex; align-items: center; gap: 34px; }
.nav-link {
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-primary);
}
.nav-link:hover { color: var(--brand-crimson); }
.nav-link--contact { color: var(--brand-crimson); }
.nav-link--contact:hover { color: var(--crimson-600); }
.nav-link--active {
  color: var(--brand-green);
  border-bottom: 2px solid var(--brand-green);
  padding-bottom: 2px;
}
.nav-link--active:hover { color: var(--green-600); }

/* Services (grayscale) navbar variant */
.navbar--mono .nav-link:hover { color: var(--neutral-500); }
.navbar--mono .nav-link--contact { color: var(--text-primary); }
.navbar--mono .nav-link--active {
  color: var(--brand-ink);
  border-bottom-color: var(--brand-ink);
}
.navbar--mono .nav-link--active:hover { color: var(--neutral-500); }

.navbar__right { display: flex; align-items: center; gap: 14px; }

.lang-switch { position: relative; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-primary);
  transition: border-color 0.15s ease-out, color 0.15s ease-out;
}
.lang-toggle:hover, .lang-switch.is-open .lang-toggle { border-color: var(--brand-green); color: var(--brand-green); }
.lang-toggle__icon {
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  -webkit-mask: url('../assets/symbols/globe.svg') center / contain no-repeat;
  mask: url('../assets/symbols/globe.svg') center / contain no-repeat;
}
.lang-toggle__caret {
  width: 8px;
  height: 8px;
  flex: none;
  margin-left: -2px;
  background: currentColor;
  -webkit-mask: url('../assets/symbols/arrow.svg') center / contain no-repeat;
  mask: url('../assets/symbols/arrow.svg') center / contain no-repeat;
  transform: rotate(90deg);
  transition: transform 0.15s ease-out;
}
.lang-switch.is-open .lang-toggle__caret { transform: rotate(-90deg); }
.navbar--mono .lang-toggle:hover,
.navbar--mono .lang-switch.is-open .lang-toggle { border-color: var(--brand-ink); color: var(--brand-ink); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 128px;
  background: var(--neutral-0);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(25, 27, 28, 0.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-menu[hidden] { display: none; }
.lang-menu__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  text-align: left;
  transition: background 0.15s ease-out;
}
.lang-menu__option:hover { background: var(--neutral-50); }
.lang-menu__option[aria-selected="true"] { color: var(--brand-green); font-weight: var(--fw-semibold); }
.navbar--mono .lang-menu__option[aria-selected="true"] { color: var(--brand-ink); }
.lang-menu__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}
.lang-menu__option[aria-selected="true"] .lang-menu__dot { opacity: 1; }

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.navbar__burger span { width: 22px; height: 2px; background: var(--brand-ink); display: block; }

.navbar__dropdown {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--neutral-0);
  flex-direction: column;
  padding: 12px 28px 24px;
}
.navbar__dropdown .nav-link {
  padding: 14px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--neutral-100);
}
.navbar__dropdown .nav-link--active { color: var(--brand-green); }
.navbar--mono .navbar__dropdown .nav-link--active { color: var(--brand-ink); }
.navbar__dropdown .nav-link:last-child { border-bottom: none; }
.navbar__dropdown .nav-link--contact { border-bottom: none; }

@media (max-width: 879px) {
  .navbar__links { display: none; }
  .navbar__burger { display: flex; }
  .navbar.menu-open .navbar__dropdown { display: flex; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--brand-ink); color: var(--text-inverse); }
.footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__logo { display: flex; align-items: center; }
.footer__logo img { height: 26px; display: block; }
.footer__links { display: flex; align-items: center; gap: 28px; }
.footer__link {
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--neutral-0);
  text-decoration: none;
}
.footer__link:hover { color: var(--brand-green); }
.footer--mono .footer__link:hover { color: var(--neutral-400); }
.footer__copy { font-size: 12px; color: var(--neutral-400); }

/* ============================================================
   Landing — hero
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: var(--neutral-50);
}
/* Kept in the DOM for SEO / screen readers, but visually hidden. */
.hero__intro {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.hero__scroll svg { display: block; animation: rf-bounce 1.8s ease-in-out infinite; }
.hero__stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}
.hero-notif { position: absolute; left: 0; top: 0; }
.hero-notif__card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-width: 292px;
  background: var(--neutral-0);
  border-radius: 10px;
  padding: 10px 16px 10px 10px;
  box-shadow: 0 10px 28px rgba(25, 27, 28, 0.11), 0 1px 2px rgba(25, 27, 28, 0.06);
}
.hero-notif__iconbox {
  width: 40px; height: 40px;
  border-radius: 8px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-notif__glyph { width: 20px; height: 20px; }
.hero-notif__meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.hero-notif__title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-notif__time { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.hero-brain { position: absolute; left: 0; top: 0; z-index: 60; }
.hero-brain__disc {
  width: 156px; height: 156px;
  border-radius: 50%;
  background: var(--brand-crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(25, 27, 28, 0.18);
}
.hero-brain__disc svg { display: block; transform: translateY(-3%); width: 66%; height: 66%; }
.hero-msg {
  position: absolute;
  left: 0; top: 0;
  z-index: 50;
  transform: translate(-50%, -50%) translateY(52px);
  width: min(880px, 86vw);
  display: flex;
  justify-content: center;
}
.hero-msg__text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  max-width: 880px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-msg__text span { display: inline-block; white-space: pre; }

/* ============================================================
   Landing — trusted by
   ============================================================ */
.trusted-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 36px 48px;
}
.trusted-logos img {
  width: auto;
  filter: grayscale(1);
  opacity: 0.8;
  transition: all 0.25s ease-out;
}
.trusted-logos img:hover { filter: grayscale(0); opacity: 1; }
.trusted-logos .logo-gem-box {
  display: inline-flex;
  align-items: center;
  background: var(--brand-ink);
  padding: 10px 18px;
  border-radius: 10px;
}
.trusted-logos .logo-gem-box img { filter: none; opacity: 0.92; transition: opacity 0.25s ease-out; }
.trusted-logos .logo-gem-box img:hover { opacity: 1; }

/* ============================================================
   Landing — newsletter cards
   ============================================================ */
.post-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--neutral-0);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.3, 1), box-shadow 0.3s cubic-bezier(0.22, 0.9, 0.3, 1);
}
.post-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0 var(--brand-ink);
  color: var(--text-primary);
}
.post-card__band {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.post-card__symbol { display: block; width: 30px; height: 30px; }
.post-card__tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.post-card__body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.post-card__title {
  margin: 0;
  font-family: var(--font-script);
  font-size: 17px;
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}
.post-card__blurb { margin: 0; font-size: 13.5px; line-height: var(--lh-normal); color: var(--text-secondary); flex: 1; }
.post-card__meta { font-size: 12px; font-weight: var(--fw-medium); color: var(--text-muted); }

/* ============================================================
   Landing — projects bookshelf
   ============================================================ */
.shelf-scroll { margin-top: 52px; overflow-x: auto; overflow-y: hidden; padding-top: 14px; }
.shelf-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-width: max-content;
  padding: 0 2px;
}
.shelf-base { height: 3px; background: var(--brand-ink); min-width: max-content; }

.book {
  position: relative;
  display: block;
  overflow: hidden;
  flex: none;
  width: var(--bw);
  height: var(--bh);
  background: var(--bg);
  text-decoration: none;
  transition: width 0.45s cubic-bezier(0.22, 0.9, 0.3, 1), transform 0.35s cubic-bezier(0.22, 0.9, 0.3, 1), box-shadow 0.35s cubic-bezier(0.22, 0.9, 0.3, 1);
  cursor: pointer;
}
.book:hover {
  width: 272px;
  transform: translateY(-10px);
  box-shadow: 6px 6px 0 rgba(25, 27, 28, 0.85);
}
.book__spine {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: lowercase;
  color: var(--tx);
  opacity: 1;
  transition: opacity 0.22s ease-out;
  max-height: calc(var(--bh) - 36px);
  overflow: hidden;
}
.book:hover .book__spine { opacity: 0; }
.book__cover {
  position: absolute;
  inset: 0;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 272px;
  opacity: 0;
  transition: opacity 0.3s ease-out 0.1s;
}
.book:hover .book__cover { opacity: 1; }
/* Always-open variant: cover shown without hover */
.book--open { width: 272px; }
.book--open .book__spine { opacity: 0; }
.book--open .book__cover { opacity: 1; }
.book__mark { display: block; width: 22px; height: 22px; background: rgba(255,255,255,0.9); }
.book__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--tx);
}
.book__desc {
  display: block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tx);
  opacity: 0.85;
}
.book__cta {
  display: block;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx);
}

/* ============================================================
   Landing — services teaser
   ============================================================ */
.steps-row {
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 18px 8px;
}
.step { display: flex; align-items: flex-start; gap: 8px; }
.step__col { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 118px; }
.step__circle {
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 2px solid var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--neutral-0);
  transition: background 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.4, 0.45, 1);
}
.step__circle:hover { background: var(--accent); transform: scale(1.08); }
.step__icon {
  display: block;
  width: 34px; height: 34px;
  background: var(--brand-ink);
  transition: background 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.4, 0.45, 1);
}
.step__circle:hover .step__icon { background: var(--neutral-0); transform: rotate(-8deg) scale(1.1); }
.step__label {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  text-align: center;
}
.step__arrow {
  display: block;
  width: 20px; height: 20px;
  margin-top: 28px;
  background: var(--neutral-400);
  -webkit-mask: url('../assets/symbols/arrow.svg') center / contain no-repeat;
  mask: url('../assets/symbols/arrow.svg') center / contain no-repeat;
}

/* ============================================================
   Landing — kind words
   ============================================================ */
.tcard-scroll { overflow-x: auto; padding: 10px 0 60px; }
.tcard-row {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 20px max(28px, calc(50vw - 620px)) 20px;
  min-width: max-content;
}
.tcard {
  flex: none;
  width: 360px;
  background: var(--neutral-0);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 26px 26px 28px;
  transform: rotate(var(--rot));
  margin-top: var(--off);
  box-shadow: 0 2px 10px rgba(25, 27, 28, 0.05);
}
@media (max-width: 879px) {
  .tcard { width: 300px; margin-top: 0; }
}
.tcard__mark { display: block; width: 20px; height: 20px; margin-bottom: 14px; }
.tcard__quote {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tcard.open .tcard__quote { display: block; -webkit-line-clamp: unset; overflow: visible; }
.tcard__toggle {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--brand-crimson);
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.tcard__toggle:hover { text-decoration: underline; }
.tcard__name { margin-top: 14px; font-size: 13.5px; font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.tcard__role { font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   Landing — contact
   ============================================================ */
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  text-decoration: none;
  border: 2px solid var(--brand-ink);
  border-radius: 10px;
  padding: 13px 22px;
  transition: all 0.25s ease-out;
  background: var(--neutral-0);
}
.contact-cta:hover { transform: translate(-2px, -2px); color: var(--text-primary); }
.contact-cta--mail:hover { box-shadow: 5px 5px 0 var(--brand-green); }
.contact-cta--linkedin:hover { box-shadow: 5px 5px 0 var(--brand-blue); }

/* ============================================================
   All projects — grid
   ============================================================ */
.pgrid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.pcard {
  display: flex;
  flex-direction: column;
  background: var(--neutral-0);
  border: 2px solid var(--brand-ink);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease-out;
}
.pcard:hover {
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0 var(--brand-ink);
  color: var(--text-primary);
}
.pcard__band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  padding: 14px 24px;
  border-bottom: 2px solid var(--brand-ink);
}
.pcard__mark { display: block; width: 20px; height: 20px; background: var(--brand-ink); }
.pcard__num { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.08em; color: var(--brand-ink); }
.pcard__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: 0.02em;
}
.pcard__tagline {
  margin: 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 14px;
  line-height: var(--lh-snug);
  color: var(--text-secondary);
  flex: 1;
}
.pcard__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pcard__tag {
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 6px;
  padding: 4px 8px;
}
.pcard__more {
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 2px;
}
.pcard__cta {
  margin-top: 14px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-crimson);
}

/* Page header (all projects) */
.page-eyebrow {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}
.page-title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: 0.02em;
}
.page-sub {
  margin: 14px 0 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: clamp(16px, 2vw, 19px);
  line-height: var(--lh-snug);
  color: var(--text-secondary);
}

/* ============================================================
   Project detail
   ============================================================ */
.proj-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}
.proj-back:hover { color: var(--brand-crimson); }
.proj-counter {
  margin-top: 26px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}
.proj-title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.05;
  letter-spacing: 0.02em;
}
.proj-tagline {
  margin: 14px 0 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: clamp(16px, 2vw, 19px);
  line-height: var(--lh-snug);
  color: var(--text-secondary);
  max-width: 620px;
}
.proj-skills { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 7px; }
.proj-skill {
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--neutral-0);
  border: 1px solid var(--neutral-200);
  border-radius: 6px;
  padding: 6px 11px;
}
.proj-section { margin-top: 56px; border-top: 1px solid var(--neutral-200); padding-top: 40px; }
.proj-section--first { margin-top: 64px; }
.proj-section__head { display: flex; align-items: center; gap: 14px; }
.proj-section__head .sym { width: 16px; height: 16px; flex: none; }
.proj-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: 24px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
.proj-paras { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.proj-paras p { margin: 0; font-size: 15.5px; line-height: var(--lh-relaxed); color: var(--text-secondary); max-width: 700px; }
.proj-list { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.proj-li { display: flex; align-items: baseline; gap: 12px; max-width: 700px; }
.proj-li__arrow { font-weight: var(--fw-bold); flex: none; }
.proj-li__text { font-size: 15px; line-height: var(--lh-relaxed); color: var(--text-secondary); }
.proj-li__text a { color: var(--brand-crimson); font-weight: var(--fw-semibold); }
.proj-steps { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.proj-step { display: flex; align-items: baseline; gap: 14px; max-width: 700px; }
.proj-step__n { flex: none; font-family: var(--font-display); font-size: 15px; color: var(--brand-blue); letter-spacing: 0.04em; }
.proj-step__text { font-size: 15px; line-height: var(--lh-relaxed); color: var(--text-secondary); }
.proj-step__text strong { color: var(--text-primary); font-weight: var(--fw-semibold); }
.proj-quote {
  margin: 22px 0 0;
  max-width: 700px;
  background: var(--neutral-0);
  border: 2px solid var(--brand-ink);
  padding: 30px 32px;
}
.proj-quote blockquote { margin: 0; font-size: 15px; line-height: var(--lh-relaxed); color: var(--text-secondary); }
.proj-quote figcaption { margin-top: 20px; display: flex; flex-direction: column; gap: 3px; }
.proj-quote__name { font-family: var(--font-script); font-size: 15.5px; font-weight: var(--fw-bold); color: var(--text-primary); }
.proj-quote__role { font-size: 12px; color: var(--text-muted); }
.proj-nav {
  margin-top: 72px;
  border-top: 2px solid var(--brand-ink);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.proj-nav__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text-primary);
  max-width: 46%;
}
.proj-nav__link:hover { color: var(--brand-crimson); }
.proj-nav__link--next { align-items: flex-end; text-align: right; margin-left: auto; }
.proj-nav__dir {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.proj-nav__title {
  font-family: var(--font-script);
  font-size: 15.5px;
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
}

/* ============================================================
   About page
   ============================================================ */
.about-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 104px 28px 90px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 26px;
}
.profile-card-col {
  flex: 1 1 280px;
  max-width: 320px;
  min-width: 270px;
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 879px) {
  .profile-card-col { position: static; max-width: none; }
}
.profile-card {
  background: var(--neutral-0);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.profile-card__photo { position: relative; }
.profile-card__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.06;
  object-fit: cover;
}
.profile-card__body { padding: 24px 26px 26px; }
.profile-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.profile-card__role {
  margin: 6px 0 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: var(--lh-snug);
}
.profile-vibes {
  margin-top: 18px;
  border-top: 1px solid var(--neutral-100);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.profile-vibe { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-vibe__label {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}
.profile-vibe__cells { display: flex; gap: 5px; }
.profile-vibe__cells .sym { width: 15px; height: 15px; }
.profile-facts {
  margin-top: 18px;
  border-top: 1px solid var(--neutral-100);
  padding-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  font-size: 13px;
  align-items: baseline;
}
.profile-facts dt {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}
.profile-facts dd { margin: 0; }
.profile-card__cta {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: var(--neutral-0);
  border: 2px solid var(--brand-ink);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.25s ease-out;
}
.profile-card__cta:hover {
  box-shadow: 4px 4px 0 var(--brand-green);
  transform: translate(-2px, -2px);
  color: var(--text-primary);
}

.about-main {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.acc {
  background: var(--neutral-0);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.acc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  background: var(--neutral-0);
  padding: 20px 28px;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.acc__head { display: flex; align-items: center; gap: 14px; }
.acc__head .sym { width: 15px; height: 15px; flex: none; }
.acc__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: 20px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--text-primary);
}
.acc__mark { font-size: 18px; font-weight: var(--fw-light); line-height: 1; color: var(--text-muted); }
.acc__panel { display: none; border-top: 1px solid var(--neutral-100); }
.acc.open .acc__panel { display: block; }

.hats-grid {
  padding: 26px 28px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.hat-card {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.25s ease-out;
}
.hat-card:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--brand-ink); }
.hat-card__head { display: flex; align-items: center; gap: 8px; }
.hat-card__head .sym { width: 16px; height: 16px; flex: none; }
.hat-card__eyebrow {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}
.hat-card__title { margin: 0; font-family: var(--font-script); font-size: 16px; font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.hat-card__body { margin: 0; font-size: 13px; line-height: var(--lh-normal); color: var(--text-secondary); }

.cv-list { padding: 6px 28px 12px; display: flex; flex-direction: column; }
.cv-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--neutral-100);
}
.cv-row:last-child { border-bottom: none; }
.cv-row__dates {
  font-size: 11.5px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-top: 3px;
  min-width: 148px;
}
.cv-row__main { min-width: 0; flex: 1; }
.cv-row__title { margin: 0; font-family: var(--font-script); font-size: 15.5px; font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.cv-row__org { margin-top: 3px; font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--brand-crimson); }
.cv-row__org--blue { color: var(--brand-blue); }
.cv-row__org span { color: var(--text-muted); font-weight: var(--fw-medium); }
.cv-row__desc { margin: 7px 0 0; font-size: 13.5px; line-height: var(--lh-normal); color: var(--text-secondary); }
.cv-row__comps { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.cv-chip {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 6px;
  padding: 5px 9px;
}
.cv-row__diss { margin: 10px 0 0; font-size: 12.5px; line-height: var(--lh-normal); color: var(--text-secondary); }
.cv-row__diss-label {
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10.5px;
  color: var(--text-muted);
}

.skills-panel { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 20px; }
.skills-group__label {
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.skills-group__langs { margin: 0; font-size: 14px; line-height: var(--lh-normal); }
.skills-group__langs span { color: var(--text-muted); }
.skills-group__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-chip {
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 6px;
  padding: 6px 11px;
}

.certs-list { padding: 22px 28px 26px; display: flex; flex-direction: column; gap: 10px; }
.cert-row { display: flex; align-items: baseline; gap: 10px; font-size: 14px; line-height: var(--lh-normal); }
.cert-row__arrow { color: var(--brand-crimson); font-weight: var(--fw-bold); }
.cert-row span:last-child span { color: var(--text-muted); }

/* ============================================================
   Services page
   ============================================================ */
.services-hero {
  position: relative;
  flex: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 108px 28px 64px;
}
.services-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.services-card {
  position: relative;
  z-index: 2;
  max-width: 620px;
  background: var(--neutral-0);
  border: 2px solid var(--brand-ink);
  box-shadow: var(--shadow-block);
  padding: clamp(28px, 4vw, 48px);
}
.services-card__title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0.02em;
}
.services-card__highlight {
  background: var(--neutral-100);
  padding: 0 10px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.services-card__body {
  margin: 20px 0 0;
  font-size: clamp(14.5px, 1.5vw, 16.5px);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  text-wrap: pretty;
}
.services-card__ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.services-card__sig {
  margin: 24px 0 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 16px;
  color: var(--text-secondary);
}
.services-card__sig:empty { display: none; }

/* ============================================================
   Reveal on scroll (motion applied via JS; this is the resting state)
   ============================================================ */
[data-reveal] { will-change: opacity, transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
