/* Jorge Díaz, portfolio. Hand-written, no build step. */

:root {
  --bg: #0f141a;
  --surface: #161d25;
  --surface-2: #1c2530;
  --text: #e8edf2;
  --muted: #9aa4b2;
  --accent: #2bbb7f;
  --accent-hover: #38d492;
  --on-accent: #0b1a14;
  --line: rgba(232, 237, 242, 0.1);
  --line-strong: rgba(232, 237, 242, 0.38);
  --radius: 8px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --s10: 80px;
  --s12: 96px;
  --header-h: 64px;
  --container: 1120px;
  --gutter: 16px;
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}
html:focus-within { scroll-behavior: auto; }
main:focus { outline: none; }
html {
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

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

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* Skip link */
.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-200%);
  z-index: 100;
}
.skip-link:focus { transform: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { color: var(--text); border-color: var(--text); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* Language toggle */
.lang-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.lang-toggle a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 40px; padding: 0 10px;
  color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.lang-toggle a + a { border-left: 1px solid var(--line-strong); }
.lang-toggle a { gap: 6px; }
.lang-toggle .flag { border-radius: 2px; flex-shrink: 0; opacity: .85; }
.lang-toggle a[aria-current="page"] .flag { opacity: 1; }
.lang-toggle a:hover { color: var(--text); }
.lang-toggle a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.lang-toggle a:focus-visible { outline-offset: -2px; border-radius: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(15, 20, 26, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  min-height: 44px;
}
.brand:hover { color: var(--text); }
.brand img { width: 41px; height: 44px; }
.brand-name { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: var(--s3); }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  position: relative;
}
.nav-link:hover { color: var(--text); }
.nav-link[aria-current="true"] { color: var(--text); }
.nav-link[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 6px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  position: absolute;
  left: 11px;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar:nth-child(1) { top: 14px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-toggle-bar:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s2);
    padding: var(--s2) var(--gutter) var(--s3);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { min-height: 48px; font-size: 16px; }
  .nav-link[aria-current="true"]::after { display: none; }
  .nav-cv { align-self: flex-start; }
  .lang-toggle { align-self: flex-start; }

  /* Without JS the nav is always visible and wraps under the brand */
  .no-js .nav-toggle { display: none; }
  .no-js .site-header { height: auto; }
  .no-js .header-inner { flex-wrap: wrap; padding-block: 8px; gap: 0 var(--s2); }
  .no-js .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 4px var(--s2);
    padding: 0 0 4px;
    background: transparent;
    border-bottom: 0;
  }
  .no-js .nav-list { flex-direction: row; flex-wrap: wrap; }
  .no-js .nav-link { min-height: 44px; font-size: 15px; padding: 0 8px; }
  .no-js .nav-cv { align-self: center; }
}

/* Hero */
.hero {
  padding-block: var(--s4) var(--s2);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: var(--s4);
  align-items: center;
}
.hero-photo { display: block; position: relative; }
/* Under 720px the copy wrapper dissolves into the grid so the photo can sit right after the H1 */
@media (max-width: 719px) {
  .hero-grid { gap: 0; }
  .hero-copy { display: contents; }
  .hero-eyebrow { order: 1; }
  .hero-name { order: 2; }
  .hero-photo { order: 3; width: min(78%, 300px); margin: 4px auto var(--s3); }
  .hero-sub { order: 4; }
  .hero-location { order: 5; }
  .hero-actions { order: 6; }
  .hero-note { order: 7; }
  .social-list { order: 8; }
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 15% -25% -15%;
  background: radial-gradient(closest-side, rgba(43, 187, 127, 0.14), transparent);
  pointer-events: none;
}
.hero-photo img {
  position: relative;
  width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 72% 92% at 50% 24%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 92% at 50% 24%, #000 55%, transparent 100%);
}
.hero-copy { max-width: 620px; }
.hero-eyebrow {
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
  margin-bottom: var(--s2);
}
.hero-name {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--s2);
  max-width: 20ch;
}
.hero-headline {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: var(--s2);
  max-width: 34ch;
}
.hero-location { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: var(--s3); }
.hero-location svg { color: var(--accent); flex: 0 0 16px; margin-top: 3px; }
.hero-note { color: var(--muted); font-size: 13px; margin: -16px 0 var(--s3); }
.hero-sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 58ch;
  margin-bottom: var(--s2);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: var(--s4);
}
.social-list { display: flex; gap: 4px; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--muted);
  border-radius: var(--radius);
}
.social-link:hover { color: var(--text); background: var(--surface); }

@media (min-width: 720px) {
  .hero { padding-block: var(--s8) var(--s10); }
  .hero-sub { font-size: 17px; }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); }
  .hero-photo { width: min(100%, 300px); justify-self: end; }
  .stats { padding-top: 0; }
  .hero-photo img {
    -webkit-mask-image: linear-gradient(#000 78%, transparent 100%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(#000 78%, transparent 100%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
    mask-composite: intersect;
  }
}
@media (min-width: 900px) {
  .hero { padding-block: var(--s10) var(--s12); }
  .hero-grid { gap: var(--s8); }
  .hero-photo { width: min(100%, 400px); }
}

/* Stats */
.stats { padding-block: var(--s3) var(--s8); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
}
.stat-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label { color: var(--muted); font-size: 14px; line-height: 1.45; }
.stat-value { display: flex; align-items: center; gap: 10px; }
.stat-value .stat-icon { position: relative; top: 1px; }
@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
  .stat-value { font-size: 40px; }
}

/* Sections */
.section { padding-block: var(--s8); }
@media (min-width: 900px) { .section { padding-block: 72px; } }

.section-head { margin-bottom: var(--s5); max-width: 640px; }
h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-lede { color: var(--muted); font-size: 17px; margin-top: 12px; }
h3 { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.text-link { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ext::after {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-left: 5px;
  vertical-align: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17 17 7M9 7h8v8'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17 17 7M9 7h8v8'/></svg>") center / contain no-repeat;
}

/* Icon system */
.icon-badge {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(43, 187, 127, 0.12);
  color: var(--accent);
  flex: 0 0 48px;
}
.icon-badge svg { width: 24px; height: 24px; }
.stat-icon, .skill-icon { width: 20px; height: 20px; color: var(--accent); opacity: .85; flex: 0 0 20px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

/* About */
.about { padding-top: 0; padding-bottom: var(--s6); }
.about-grid { display: grid; gap: var(--s4); }
.about-side { display: grid; gap: var(--s2); align-content: start; }
.about-intro { color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 44ch; }
.about-cta { margin-top: var(--s1); }
.facts { display: grid; grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: var(--s2); align-content: start; }
.fact { display: flex; gap: 12px; padding: var(--s2); align-items: flex-start; }
.fact .icon-badge { width: 40px; height: 40px; flex-basis: 40px; }
.fact .icon-badge svg { width: 20px; height: 20px; }
.fact h3 { font-size: 16px; margin-bottom: 4px; }
.fact p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.terms-line { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.terms-line svg { color: var(--accent); flex: 0 0 18px; margin-top: 2px; }
@media (min-width: 720px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s2) var(--s8); align-items: start; }
  .about-side h2 { max-width: 14ch; }
  .about-side, .facts { align-self: start; }
  .terms-line { grid-column: 2; }
}

/* Work: simulated phone + detail panel */
.work-layout { display: grid; gap: var(--s5); }
.phone-col { display: grid; gap: var(--s2); justify-items: center; }
.phone {
  --bezel: 10px;
  position: relative;
  width: min(86vw, 360px);
  aspect-ratio: 320 / 660;
  padding: var(--bezel);
  background: #0a0d11;
  border-radius: 48px;
  box-shadow: 0 0 0 1px rgba(232, 237, 242, 0.14), 0 30px 60px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 2px #1a2028;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: #0f141a;
  isolation: isolate;
  font-family: var(--font);
}
.wallpaper { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.island {
  position: absolute;
  top: 10px; left: 50%;
  width: 92px; height: 26px;
  transform: translateX(-50%);
  background: #05070a;
  border-radius: 14px;
  z-index: 6;
}
.status-bar {
  position: absolute;
  top: 12px; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px 0 28px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  z-index: 5;
  pointer-events: none;
}
.status-glyphs { display: inline-flex; align-items: center; gap: 5px; }
.home-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px 14px 18px;
  z-index: 1;
}
.app-grid, .dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 6px;
}
.dock {
  margin-top: auto;
  padding: 12px 6px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  gap: 6px;
}
.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 14px;
  font-family: inherit;
}
.app-icon img {
  width: 56px; height: 56px;
  border-radius: 13px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  background: #1a2028;
}
.app-icon-label {
  font-size: 11px;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dock-icon .app-icon-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dock-icon { min-height: 56px; }
.app-icon:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.app-icon:active img { transform: scale(.94); }
@media (min-width: 400px) { .app-icon img { width: 64px; height: 64px; border-radius: 14px; } }

.splash {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--app-tint, #161d25);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.splash[hidden] { display: none; }
.splash img { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }

.app-view {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  background: #0f141a;
  transform-origin: var(--zx, 50%) var(--zy, 50%);
}
.app-view[hidden] { display: none; }
.app-view.is-zooming { transform: scale(.12); opacity: 0; border-radius: 20px; }
.app-view.is-open { transform: none; opacity: 1; transition: transform .25s ease-out, opacity .2s ease-out; }
.app-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 48px 10px 8px;
  background: #161d25;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.app-back {
  justify-self: start;
  display: inline-flex;
  white-space: nowrap;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  min-height: 36px;
  padding: 0 8px 0 2px;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  color: var(--accent);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.app-back:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 0; }
.app-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.app-shots {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: #0b0f14;
}
.app-shots::-webkit-scrollbar { display: none; }
.app-shots.no-snap { scroll-snap-type: none; }
.app-shots:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: -2px; }
.app-shots img {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.home-bar {
  position: absolute;
  left: 50%; bottom: 0;
  z-index: 7;
  width: 150px; height: 28px;
  padding: 0;
  transform: translateX(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.home-bar::before {
  content: "";
  position: absolute;
  left: 7px; right: 7px; bottom: 8px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
}
.home-bar[hidden] { display: none; }
.home-bar:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: -2px; border-radius: 10px; }

.phone-controls { display: flex; align-items: center; gap: var(--s2); }
.phone-controls[hidden] { display: none; }
.shot-nav {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
}
.shot-nav:hover { border-color: var(--text); }
.shot-nav:disabled { opacity: .35; cursor: default; }
.shot-dots { display: flex; gap: 8px; }
.shot-dots li { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.shot-dots li.is-current { background: var(--accent); }

.work-detail { min-width: 0; }
.detail-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.detail-prompt { padding: var(--s3); display: grid; gap: 12px; }
.detail-prompt[hidden] { display: none; }
.detail-prompt h3 { font-size: 20px; }
.detail-prompt p { color: var(--muted); font-size: 15px; }
.app-list { display: grid; gap: 2px; margin-top: 4px; }
.app-list a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text); font-size: 15px; font-weight: 500; }
.app-list a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 12px; flex: 0 0 6px; }
.app-list a:hover { color: var(--accent-hover); }
.detail-card { display: grid; gap: 12px; padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-card[hidden] { display: none; }
.no-js .detail-card[hidden] { display: grid; margin-bottom: var(--s2); }
.noscript-list { display: grid; gap: 8px; color: var(--muted); font-size: 15px; margin-top: var(--s2); }
.work-name { font-size: 22px; }
.badge {
  display: inline-block;
  vertical-align: 3px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--radius);
  background: rgba(154, 164, 178, 0.14);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
.work-meta { color: var(--muted); font-size: 14px; margin-top: -6px; }
.work-role { font-size: 14px; font-weight: 500; color: var(--accent); }
.work-summary { font-size: 15px; }
.work-highlights { display: grid; gap: 6px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.work-highlights li { padding-left: 14px; position: relative; }
.work-highlights li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .8;
}
.work-link-row { font-size: 15px; }
.work-link-row a { display: inline-flex; align-items: center; min-height: 44px; }
.work-outcome {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(43, 187, 127, 0.08);
  border-left: 2px solid var(--accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.work-outcome svg { color: var(--accent); flex: 0 0 18px; margin-top: 1px; }

@media (min-width: 1000px) {
  .work-layout { grid-template-columns: 420px minmax(0, 1fr); gap: var(--s8); align-items: start; }
  .phone-col { position: sticky; top: calc(var(--header-h) + 24px); }
  .phone { width: 320px; }
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
}
@media (min-width: 720px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); } }
@media (min-width: 1000px) { .services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.service-card { padding: var(--s3); }
.service-card .icon-badge { margin-bottom: var(--s2); }
.service-card h3 { margin-bottom: 12px; }

/* How I work strip */
.principles-title { font-size: 18px; margin: var(--s5) 0 var(--s2); }
.principles-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.principle {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 12px 8px 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  cursor: help;
}
.principle .icon-badge { width: 40px; height: 40px; flex-basis: 40px; }
.principle .icon-badge svg { width: 20px; height: 20px; }
.principle-title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.principle:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }
@media (min-width: 720px) { .principles-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .principles-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } .principle { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 0 var(--s6); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 56px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 16px; font-weight: 500; }
.faq-item summary::after {
  content: "";
  flex: 0 0 9px;
  width: 9px; height: 9px;
  margin-right: 4px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover h3 { color: var(--accent-hover); }
.faq-item p { color: var(--muted); font-size: 15px; padding: 0 28px 16px 0; }

/* Skills */
.skills-list { display: grid; gap: var(--s4); }
.skill-group { display: grid; gap: 12px; }
.skill-group h3 { font-size: 16px; color: var(--text); display: flex; align-items: center; gap: 10px; }
@media (min-width: 900px) {
  .skill-group { grid-template-columns: 260px minmax(0, 1fr); gap: var(--s4); align-items: start; }
  .skill-group h3 { padding-top: 5px; }
}

/* Experience: zig-zag timeline */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.timeline {
  --tl-line: rgba(232, 237, 242, 0.35);
  --tl-yellow: #f5b800;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-left: 64px;
  gap: var(--s6);
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 15px;
  width: 14px;
  background:
    radial-gradient(circle at 50% 7px, var(--text) 4px, transparent 5px),
    radial-gradient(circle at 50% calc(100% - 7px), var(--text) 4px, transparent 5px),
    linear-gradient(var(--tl-line), var(--tl-line)) 50% 0 / 2px 100% no-repeat;
}
.tl-item { position: relative; }
.tl-badge {
  position: absolute;
  top: 0;
  left: -64px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
}
.tl-badge svg { width: 20px; height: 20px; }
.tl-yellow .tl-badge { background: var(--tl-yellow); }
.tl-date { color: var(--accent); font-size: 14px; font-weight: 500; line-height: 1.5; padding-top: 2px; }
.tl-yellow .tl-date { color: var(--tl-yellow); }
.tl-title { font-size: 20px; font-weight: 500; line-height: 1.3; margin-top: 2px; }
.tl-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tl-text { color: var(--muted); font-size: 15px; line-height: 1.65; margin-top: 12px; }
.tl-text strong { color: var(--text); font-weight: 600; }

@media (min-width: 900px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 160px;
    row-gap: 0;
    padding: 20px 0 20px;
  }
  .timeline::before { left: 50%; margin-left: -7px; }
  .tl-item { padding-bottom: 80px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-item:nth-child(1) { grid-row: 1 / span 2; }
  .tl-item:nth-child(2) { grid-row: 2 / span 2; }
  .tl-item:nth-child(3) { grid-row: 3 / span 2; }
  .tl-item:nth-child(4) { grid-row: 4 / span 2; }
  .tl-item:nth-child(5) { grid-row: 5 / span 2; }
  .tl-item:nth-child(6) { grid-row: 6 / span 2; }
  .tl-item:nth-child(7) { grid-row: 7 / span 2; }
  .tl-item:nth-child(8) { grid-row: 8 / span 2; }
  .tl-item:nth-child(9) { grid-row: 9 / span 2; }
  .tl-item:nth-child(10) { grid-row: 10 / span 2; }
  .tl-right { grid-column: 2; }
  .tl-left { grid-column: 1; text-align: right; }
  .tl-badge { width: 58px; height: 58px; left: -109px; top: -6px; }
  .tl-left .tl-badge { left: auto; right: -109px; }
  .tl-badge svg { width: 24px; height: 24px; }
  .tl-title { font-size: 22px; }
}

/* Logos */
.logos { padding-block: var(--s6); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logos-title { font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: 0; }
.logos-lede { color: var(--muted); font-size: 15px; margin: 4px 0 var(--s3); }
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}
.logo-item {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  opacity: .7;
  filter: grayscale(1);
  color: var(--text);
  transition: opacity .15s ease;
}
.logo-item:hover { opacity: 1; color: var(--text); }
.logo-item img { height: 28px; width: auto; max-width: 132px; object-fit: contain; }
.logo-text { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; min-width: 44px; }
.logo-pair { gap: 8px; }
.logo-mark-text { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
@media (min-width: 900px) { .logo-item img { height: 30px; max-width: 148px; } .logo-text { font-size: 20px; } }

/* Contact */
.contact-grid { display: grid; gap: var(--s5); }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s10); align-items: start; }
}
.contact-copy h2 { max-width: 16ch; }
.contact-links { display: grid; gap: 0; margin-top: var(--s3); font-size: 16px; }
.contact-links a { display: inline-flex; align-items: center; min-height: 44px; }
.contact-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.contact-link svg { color: var(--accent); flex: 0 0 20px; }
.contact-link:hover { color: var(--accent-hover); }

.contact-form { display: grid; gap: var(--s2); }
.form-note { color: var(--muted); font-size: 14px; }
.alt-line { margin-top: var(--s2); font-size: 15px; color: var(--muted); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 18px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 44px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}
.field select:invalid { color: var(--muted); }
.field select option { color: var(--text); background: var(--surface); }
.field select:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 0; border-color: var(--accent); }
.field-check { grid-template-columns: auto 1fr; align-items: center; gap: 12px; min-height: 44px; }
.field-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.field-check label { font-weight: 400; font-size: 15px; }
.req { color: var(--accent); }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 0;
  border-color: var(--accent);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #f08a8a; }
.form-error { color: #f5a3a3; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; margin-top: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s5); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); align-items: center; }
.footer-line { color: var(--muted); font-size: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.footer-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 10px; color: var(--muted); font-size: 14px; font-weight: 500; }
.footer-nav a:hover { color: var(--text); }

/* Thanks page */
.thanks { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding-block: var(--s10); }
.thanks-box { max-width: 520px; text-align: left; }
.thanks-box h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: var(--s2); }
.thanks-box p { color: var(--muted); font-size: 17px; margin-bottom: var(--s4); }

/* Reveal: only active when JS confirms IntersectionObserver support */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s ease; }

@media print {
  .js-reveal .reveal { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-view.is-zooming { transform: none; opacity: 1; }
  .app-view.is-open { transition: none; }
  .app-shots { scroll-behavior: auto; }
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav-toggle-bar, .logo-item { transition: none; }
}
