/* =========================================================
   Sergio López — Portfolio
   Neutral base with colour from the project palette (blue,
   green, orange): gradient title words with a light sweep,
   a night sky and atmosphere in the hero, a frosted chat card.
   No purple/pink, glows, dot grids or monospace labels.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; /* only inside mockups */
  --radius-lg: 24px;
  --radius: 20px;
  --maxw: 1180px;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

:root,
:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f2f2f3;
  --text-2: #a6a6ad;
  --muted: #6f6f76;
  --accent: #3d8bfd;
  --ok: #30c463;
  --on-text: #0b0b0c;
  --globe: 255, 255, 255;
  /* Hero light: brighter centre behind the chat, darker edges; frosted chat card */
  --spot: rgba(70, 110, 255, .2);
  --sky: rgba(47, 95, 208, .42);   /* night sky at the top of the hero */
  --atmo: .6;                      /* Earth's atmosphere on the canvas (alpha) */
  --earth-top: #0b1730;            /* globe at the limb (fades to --bg) */
  --city: #ffc56b;                 /* city lights on the night side */
  --city-a: .85;
  --stars: .9;
  --hl-blue: #5b8cff;
  --hl-green: #3ccf86;
  --hl-orange: #ff9447;
  --vignette: rgba(0, 0, 0, .55);
  --glass: rgba(255, 255, 255, .035);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-shadow: 0 32px 64px -24px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .05);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f1f1f3;
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .16);
  --text: #111113;
  --text-2: #55555c;
  --muted: #8a8a92;
  --accent: #0a64d6;
  --ok: #1f9d4c;
  --on-text: #ffffff;
  --globe: 0, 0, 0;
  --spot: rgba(120, 160, 255, .22);
  --sky: rgba(10, 100, 214, .14);
  --atmo: .3;
  --earth-top: #dbe5f5;
  --city: #000000;
  --city-a: 0;                     /* day side: no lights, no stars */
  --stars: 0;
  --hl-blue: #2f5fd0;
  --hl-green: #178a52;
  --hl-orange: #d4661a;
  --vignette: rgba(0, 0, 0, .05);
  --glass: rgba(255, 255, 255, .45);
  --glass-border: rgba(0, 0, 0, .09);
  --glass-shadow: 0 28px 56px -24px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .8);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.muted { color: var(--muted); }
/* One coloured word per section title, from the project palette. */
/* Gradient words with a light sweep passing over them every few seconds. */
.hl-blue   { --g1: #3d6bff; --g2: #38bdf8; }
.hl-green  { --g1: #12b76a; --g2: #a3e635; }
.hl-orange { --g1: #ff6a2b; --g2: #fbbf24; }
.hl-blue, .hl-green, .hl-orange, .grad-text {
  color: var(--g1);
  background-image:
    linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .75) 50%, transparent 58%),
    linear-gradient(135deg, var(--g1), var(--g2));
  background-size: 250% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 130% 0, 0 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine {
  0%, 10% { background-position: 130% 0, 0 0; }
  50%, 100% { background-position: -30% 0, 0 0; }
}

/* ---------- Header ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 56px);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.icon-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
/* Left group: theme + language */
.tools { display: flex; gap: 8px; }
.lang-btn { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

.pill-nav {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.pill-nav a {
  position: relative; z-index: 1;
  padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color .2s;
}
.pill-nav a:hover, .pill-nav a.active { color: var(--text); }
.pill-indicator {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0;
  border-radius: 999px; background: var(--surface-2);
  transition: transform .4s var(--ease), width .4s var(--ease), opacity .2s;
  opacity: 0;
}

.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-weight: 500; font-size: 14px;
  transition: border-color .2s;
}
.cta-btn svg { width: 16px; height: 16px; }
.cta-btn:hover { border-color: var(--border-strong); }

.menu-btn { display: none; }
.mobile-menu {
  position: fixed; z-index: 49; top: 80px; left: 16px; right: 16px;
  display: flex; flex-direction: column; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .4);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 12px 14px; border-radius: 12px; font-size: 17px; font-weight: 500; color: var(--text-2); }
.mobile-menu a:hover, .mobile-menu a.active { background: var(--surface-2); color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 112px 16px 40px;
  text-align: center;
}
.avatar {
  position: relative; width: 112px; height: 112px; margin-bottom: 24px;
  border-radius: 50%; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.avatar span { font-size: 36px; font-weight: 600; letter-spacing: -0.04em; color: var(--text-2); }
/* Memoji: six poses stacked; the chat picks one. The head turns slightly toward the cursor. */
.memoji { width: 184px; height: 184px; margin-bottom: 4px; perspective: 700px; }
.memoji-tilt {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out;
  cursor: pointer;
}
.pose {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(.9) translateY(8px);
  transition: opacity .25s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
  user-select: none; -webkit-user-drag: none;
}
.pose.is-on { opacity: 1; transform: none; }

.hero-title {
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.08;
}
.hero-role { margin-top: 10px; font-size: 17px; color: var(--text-2); }
.hero-role .nw { white-space: nowrap; } /* break at the dot, not inside a title */

/* Chat */
.chat {
  width: min(720px, 100%);
  height: 380px;
  margin-top: 32px;
  display: flex; flex-direction: column;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  text-align: left;
}
.chat-log {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 4px 4px 12px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: 17px; }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; animation: msg-in .3s var(--ease); }
.msg.user { align-self: flex-end; background: var(--text); color: var(--on-text); border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 6px; }
.msg.bot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(4px); } }

.chat-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 4px 0 12px; }
.chat-chips button {
  padding: 5px 13px; font-size: 13px; color: var(--text-2);
  border-radius: 999px; border: 1px solid var(--border-strong);
  transition: border-color .2s, color .2s;
}
.chat-chips button:hover { border-color: var(--text-2); color: var(--text); }

.chat-form { position: relative; }
.chat-form input {
  width: 100%; height: 50px; padding: 0 56px 0 16px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 15px;
  transition: border-color .2s;
}
.chat-form input::placeholder { color: var(--muted); }
.chat-form input:focus { outline: none; border-color: var(--border-strong); }
.send-btn {
  position: absolute; right: 7px; top: 7px; width: 36px; height: 36px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: var(--on-text);
  opacity: .25; transition: opacity .2s;
}
.send-btn svg { width: 16px; height: 16px; stroke-width: 2; }
.chat-form.has-text .send-btn { opacity: 1; }

.scroll-hint { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); transition: color .2s; }
.scroll-hint:hover { color: var(--text-2); }
.scroll-hint svg { width: 16px; height: 16px; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 128px clamp(16px, 4vw, 32px) 32px; }
.section-head { text-align: center; margin-bottom: 56px; }
.eyebrow { margin-bottom: 8px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.section-title { font-size: clamp(36px, 5.6vw, 60px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.section-sub { margin: 14px auto 0; max-width: 600px; font-size: 18px; color: var(--text-2); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------- About / Bento ---------- */
/* Same block layout as pszostak.pl: 3 columns, rows 9rem / auto / 9rem on desktop;
   2 columns on phones, placed in DOM order (name, photo, highlights, craft, location, foundation, stat). */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 9rem auto 12.5rem;
  gap: 12px;
}
.name-card     { grid-column: 1; grid-row: 1; }
.hover-card    { grid-column: 2 / span 2; grid-row: 1; }
.foundation    { grid-column: 1; grid-row: 2 / span 2; }
.photo-card    { grid-column: 2; grid-row: 2; min-height: 300px; }
.location-card { grid-column: 2; grid-row: 3; }
.craft         { grid-column: 3; grid-row: 2 / span 2; }
.stat-card     { display: none; }
.stat-card { padding: 18px; flex-direction: column; justify-content: flex-end; }
.stat-num { font-size: 40px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.stat-label { margin-top: 8px; font-size: 13px; line-height: 1.35; font-weight: 500; color: var(--text); }

/* Master's degree card: University of Granada colours, the official logo on top
   and the university's seal as a large watermark bleeding off the corner. */
.degree-card {
  isolation: isolate;
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .12), transparent 55%),
    linear-gradient(150deg, #9b1427 0%, #6d0d1b 55%, #3f0710 100%);
  color: #fff;
}
.degree-seal {
  position: absolute; z-index: -1; right: -22%; bottom: -18%;
  width: 82%; opacity: .14; pointer-events: none;
}
.degree-logo { width: 72%; max-width: 168px; margin-bottom: auto; }
.degree-card .stat-num { color: #fff; }
.degree-card .stat-label { color: rgba(255, 255, 255, .92); }
.degree-years { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }

/* Name: fills the card. Size follows the card width (container units). */
.name-card {
  container-type: inline-size;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 20px; text-align: center;
}
.name-card h2 {
  font-size: 38px; font-size: clamp(22px, 12.4cqi, 46px);
  font-weight: 700; line-height: .98; letter-spacing: -0.045em;
}
/* One line on wide cards; the phone layout stacks first name and surname. */
.name-card h2 { white-space: nowrap; }
.name-rule { width: 32px; height: 1px; margin: 9px 0 7px; background: var(--border-strong); }
.name-card p { max-width: 100%; font-size: 13.5px; line-height: 1.35; font-weight: 500; color: var(--text-2); text-wrap: balance; }
.name-card p .role-2 { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); }



.text-card { padding: 28px 24px 24px; display: flex; flex-direction: column; }
.card-title { margin-bottom: 14px; font-size: 32px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
.text-card .lead { margin-bottom: 14px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.text-card .body { margin-bottom: 14px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.text-card strong { color: var(--text); font-weight: 600; }

.checklist { list-style: none; margin: 8px 0 22px; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 1px solid var(--border); }
.checklist svg { width: 22px; height: 22px; margin-top: 1px; color: var(--text); }
.checklist b { display: block; font-size: 15px; font-weight: 600; }
.checklist span { display: block; font-size: 14px; color: var(--text-2); line-height: 1.5; }

.photo-card { display: grid; place-items: center; background: var(--surface-2); }
.photo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo-fallback { font-size: clamp(72px, 9vw, 112px); font-weight: 600; letter-spacing: -0.06em; color: var(--muted); }

/* Location: a real map of Granada (OSM, greyscale), text faded in at the bottom */
/* ---------- Location: a Maps-style card ----------
   Tinted map, a Find My-style pin with the Memoji, a sky wash that follows
   the hour in Granada, and a glass panel with the place, the local time and
   the current weather (Open-Meteo, filled in by main.js). */
.location-card { isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; }
/* The map box is larger than the card and lifted, so the city centre (the
   image centre, where the pin sits) lands above the panel. */
.map { position: absolute; inset: -16% -8% -4% -8%; z-index: -1; }
.map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-dark { filter: sepia(.55) hue-rotate(178deg) saturate(2.6) brightness(1.18) contrast(1.05); }
.map-light { display: none; filter: sepia(.35) hue-rotate(170deg) saturate(1.8) brightness(1.02); }
:root[data-theme="light"] .map-dark { display: none; }
:root[data-theme="light"] .map-light { display: block; }
.map-sky {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, var(--sky-top), transparent 45%),
    radial-gradient(70% 55% at 50% 40%, transparent 40%, var(--map-edge) 100%);
  transition: background .6s ease;
}
.location-card { --sky-top: rgba(70, 120, 220, .28); --map-edge: rgba(8, 10, 16, .6); }
.location-card.is-night { --sky-top: rgba(8, 14, 40, .62); --map-edge: rgba(4, 6, 12, .72); }
:root[data-theme="light"] .location-card { --sky-top: rgba(120, 170, 255, .28); --map-edge: rgba(240, 244, 250, .5); }
:root[data-theme="light"] .location-card.is-night { --sky-top: rgba(40, 70, 140, .3); --map-edge: rgba(225, 230, 242, .55); }

/* Find My-style pin: Memoji in a white ring with a pointer, and a soft halo. */
.map-pin { position: absolute; left: 50%; top: 50%; z-index: 1; width: 0; height: 0; }
.pin-face {
  position: absolute; left: -22px; bottom: 8px; width: 44px; height: 44px;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(160deg, #6f9bff, #2f5fd0);
  box-shadow: 0 0 0 3px #fff, 0 10px 22px -6px rgba(0, 0, 0, .55);
}
.pin-face::after { content: none; }
.pin-face img { width: 100%; height: 100%; object-fit: cover; transform: translateY(6%) scale(1.15); }
.map-pin::before { /* pointer */
  content: ""; position: absolute; left: -6px; bottom: 1px; width: 12px; height: 12px;
  background: #fff; transform: rotate(45deg); border-radius: 0 0 3px 0;
  box-shadow: 4px 4px 10px -4px rgba(0, 0, 0, .4);
}
.map-pin::after { /* the spot on the ground */
  content: ""; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px #fff;
}
.pin-halo {
  position: absolute; left: -36px; top: -36px; width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%);
  animation: pin-halo 3.2s ease-out infinite;
}
@keyframes pin-halo { from { transform: scale(.35); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }

.map-credit {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  padding: 2px 7px; border-radius: 999px; font-size: 10px;
  background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--text-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.map-credit:hover { color: var(--text); }

.loc-panel {
  margin: 10px; padding: 12px 14px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 12px 28px -16px rgba(0, 0, 0, .5);
}
.location-card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.loc-coords { margin-top: 3px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.loc-now { text-align: right; flex: none; }
.loc-time { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.loc-sub { margin-top: 5px; display: flex; justify-content: flex-end; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.loc-weather { display: inline-flex; align-items: center; gap: 3px; color: var(--text); font-weight: 500; }
.loc-weather[hidden] { display: none; }
.loc-weather svg { width: 15px; height: 15px; stroke-width: 1.8; }
.loc-weather .sun { stroke: #fbbf24; }
.loc-weather .moon { stroke: #c7d2fe; }
:root[data-theme="light"] .loc-weather .moon { stroke: #4f5d95; }
.loc-weather .cloud { stroke: var(--text-2); }
.loc-weather .rain { stroke: #38bdf8; }
.loc-remote { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pin-halo { animation: none; opacity: .5; } }


.status { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-meta { margin-bottom: 2px; font-size: 14px; color: var(--muted); }
.project h3 { margin-bottom: 16px; font-size: clamp(26px, 2.8vw, 32px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.project-card {
  position: relative; height: 420px; overflow: hidden;
  border-radius: var(--radius-lg); padding: 28px 30px 0;
  color: #fff;
  display: flex; flex-direction: column;
}
.c-blue     { background: #2f5fd0; }
.c-green    { background: #1e8e5a; }
.c-orange   { background: #e07a2f; }
.c-graphite { background: #34373e; }
.project-desc { font-size: 16.5px; line-height: 1.6; max-width: 470px; color: rgba(255, 255, 255, .92); }
.project-desc strong { color: #fff; font-weight: 600; }
.project-tags { margin-top: 14px; font-size: 14px; color: var(--text-2); }

.mock { margin-top: auto; transition: transform .5s var(--ease); }
.project:hover .mock { transform: translateY(-6px); }
.window {
  align-self: center; width: 88%;
  border-radius: 12px 12px 0 0; overflow: hidden;
  background: #111114;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .18);
}
.window-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #1c1c20; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #4a4a50; }
.window-bar span { margin-left: 10px; font-family: var(--mono); font-size: 11px; color: #8a8a92; }

.terminal {
  margin: 0; padding: 14px 16px 22px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.8; color: #e4e4e7;
  white-space: pre; overflow: hidden;
}
.t-dim { color: #7c7c84; }
.t-ok { color: #4ade80; }

.pipeline { display: flex; align-items: center; padding: 26px 14px 12px; }
.node {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 10px 4px; border-radius: 10px;
  background: #1c1c20; border: 1px solid #2c2c32;
}
.node b { font-size: 10.5px; color: #f2f2f3; font-weight: 600; line-height: 1.25; }
.node small { font-size: 9.5px; color: #7c7c84; margin-top: 2px; }
.edge { flex: 0 0 14px; height: 1px; background: #3a3a40; }
.spark { padding: 6px 16px 18px; }
.spark svg { width: 100%; height: 64px; stroke: #4ade80; stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark span { display: block; font-size: 11px; color: #7c7c84; margin-top: 4px; }

/* Phones */
.phones { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 250px; }
.phone {
  position: relative; background: #111114;
  border: 3px solid #111114; overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
}
.phone.main { width: 150px; height: 250px; z-index: 2; border-radius: 26px 26px 0 0; border-bottom: 0; }
.phone.side { width: 124px; height: 190px; margin: 0 -18px; border-radius: 22px 22px 0 0; border-bottom: 0; }
.phone.solo { width: 160px; }
.notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 52px; height: 14px; border-radius: 10px; background: #111114; z-index: 2; }
.screen { position: absolute; inset: 0; padding: 26px 10px 10px; background: #fbfbfc; color: #18181b; }
.phone.side .screen { padding-top: 14px; }
.s-h { margin-bottom: 8px; font-size: 11px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 6px; padding: 6px; margin-bottom: 6px; border-radius: 8px; background: #fff; border: 1px solid #ececef; }
.row i { width: 14px; height: 14px; border-radius: 4px; }
.row span { flex: 1; height: 6px; border-radius: 3px; background: #e8e8ec; }
.c1 { background: #e07a2f; } .c2 { background: #2f5fd0; } .c3 { background: #1e8e5a; }
.s-letters { text-align: center; }
.picto { width: 48px; height: 48px; margin: 4px auto 8px; stroke: #e07a2f; stroke-width: 2.4; }
.slots, .keys { display: flex; justify-content: center; gap: 5px; margin-bottom: 10px; }
.slots b, .keys b { display: grid; place-items: center; width: 26px; height: 30px; border-radius: 7px; font-size: 14px; font-weight: 700; }
.slots b { background: #fff; border: 1.5px solid #e07a2f; color: #c4611a; }
.slots b.empty { border-style: dashed; }
.keys b { background: #18181b; color: #fff; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 8px 4px 0; }
.bars i { flex: 1; border-radius: 4px 4px 0 0; background: #e07a2f; }
.kpis { display: flex; gap: 6px; margin-bottom: 10px; }
.kpis div { flex: 1; padding: 8px; border-radius: 10px; background: #f1f1f3; }
.kpis b { display: block; font-size: 18px; line-height: 1; }
.kpis small { font-size: 9px; color: #6f6f76; }
.store-badges { position: absolute; right: 4%; bottom: 40px; display: flex; flex-direction: column; gap: 8px; }
.store-badges span {
  padding: 7px 12px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: #111114; color: #fff; border: 1px solid rgba(255, 255, 255, .14);
}

.more-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: fit-content; margin: 64px auto 0;
  font-size: 17px; font-weight: 500; color: var(--text);
  transition: color .2s;
}
.more-link svg { width: 16px; height: 16px; }
.more-link:hover { color: var(--accent); }


/* ---------- Skills ---------- */
.sphere-wrap {
  position: relative; width: min(520px, 100%); aspect-ratio: 1; margin: -16px auto 40px;
  touch-action: pan-y; cursor: grab;
}
.sphere-wrap:active { cursor: grabbing; }
.globe { position: absolute; inset: 0; width: 100%; height: 100%; }
.sphere { position: absolute; inset: 0; }
.tech {
  position: absolute; left: 50%; top: 50%;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  will-change: transform, opacity;
  user-select: none; pointer-events: none;
}
.tech img { width: 40px; height: 40px; object-fit: contain; }
.tech span { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.tech.mono-icon img { filter: invert(1); }
:root[data-theme="light"] .tech.mono-icon img { filter: none; }

/* Skills gallery, in the apple.com mould: tall coloured cards with an eyebrow and
   a headline on top, and a miniature anchored bottom left that bleeds off the
   right and bottom edges. The first card lines up with the page column and the
   track runs to the viewport edge; it snaps card by card. */
.gallery {
  --pad: clamp(16px, 4vw, 32px);
  --edge: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad)));
  margin: 56px calc(50% - 50vw) 0;
}
.gallery-track {
  display: flex; gap: 20px;
  overflow-x: auto; padding: 0 0 4px var(--edge);
  scroll-padding-inline-start: var(--edge);
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gallery-spacer { flex: none; width: max(4px, calc(var(--edge) - 20px)); }
.gallery-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  max-width: var(--maxw); margin: 22px auto 0; padding: 0 var(--pad);
}
.gallery-nav { display: flex; gap: 12px; }
.gallery-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text);
  transition: background-color .2s, opacity .2s;
}
.gallery-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 15%, transparent); }
.gallery-btn:disabled { opacity: .35; cursor: default; }
.gallery-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Skill cards, in the mould of Apple's store cards: eyebrow, headline, one
   line, and a monochrome line illustration (one blue) bleeding off the bottom.
   Every card has its own composition. */
.sk-card {
  --ill: #0071e3; --sk-bg: #ffffff;
  position: relative; flex: none; scroll-snap-align: start;
  width: 380px; height: 580px; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 32px 30px 0; border-radius: 28px;
  background: var(--sk-bg); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px -14px rgba(0, 0, 0, .12);
}
:root:not([data-theme="light"]) .sk-card { --ill: #2997ff; --sk-bg: #161618; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.sk-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.sk-card h3 { margin-top: 8px; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance; }
.sk-desc { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.sk-ill {
  display: block; flex: none; margin: auto -30px 0; width: calc(100% + 60px); height: 250px;
  fill: none; stroke: var(--ill); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .6s cubic-bezier(.25, .1, .25, 1);
}
.sk-ill .f { fill: var(--ill); stroke: none; }
.sk-ill .node { fill: var(--sk-bg); }
.sk-ill .g { stroke-width: 3.2; }
.sk-ill .g2 { stroke-width: 5; }
.sk-ill .dash { stroke-width: 4; stroke-dasharray: 1 12; }
.sk-card:hover .sk-ill { transform: translateY(-6px); }


/* ---------- Contact ---------- */
.contact {
  margin-top: 128px; padding: 112px clamp(16px, 4vw, 32px) 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.contact-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.contact-title { font-size: clamp(36px, 5.6vw, 60px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.contact-rows { margin-top: 48px; display: flex; flex-direction: column; text-align: left; border-top: 1px solid var(--border); }
.contact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 4px; min-height: 68px;
  border-bottom: 1px solid var(--border);
}
.cr-left { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; }
.cr-left svg { width: 18px; height: 18px; color: var(--text-2); }
.cr-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reveal-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: 999px; font: inherit; font-size: 14px; font-weight: 500; color: var(--text);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.reveal-btn:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.reveal-btn svg { width: 15px; height: 15px; color: var(--accent); }
.text-link.revealed { animation: reveal-in .45s cubic-bezier(.25, .1, .25, 1); }
@keyframes reveal-in { from { opacity: 0; filter: blur(6px); transform: translateY(2px); } }
.copy-btn[hidden] { display: none; }
.copy-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: color .2s, background .2s; }
.copy-btn:hover { color: var(--text); background: var(--surface-2); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn .i-check { display: none; color: var(--ok); }
.copy-btn.copied .i-copy { display: none; }
.copy-btn.copied .i-check { display: block; }
.text-link { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; transition: color .2s; }
.text-link svg { width: 14px; height: 14px; }
.text-link:hover { color: var(--accent); }
.muted-text { font-size: 14px; color: var(--text-2); }

.footer {
  max-width: 880px; margin: 96px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer p { font-size: 13px; color: var(--muted); }
.footer-icons { display: flex; gap: 16px; }
.footer-icons a { color: var(--text-2); transition: color .2s; }
.footer-icons a:hover { color: var(--text); }
.footer-icons svg { width: 19px; height: 19px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pill-nav a { padding: 8px 12px; font-size: 13.5px; }
  .cta-btn span { display: none; }
  .cta-btn { width: 48px; padding: 0; justify-content: center; }
}

@media (max-width: 900px) {
  .pill-nav { display: none; }
  .menu-btn { display: grid; position: absolute; left: 50%; transform: translateX(-50%); }

  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .bento > .card { grid-column: auto; grid-row: auto; }
  .bento > .hover-card { grid-column: span 2; }
  .bento > .highlights { height: 9rem; }
  .bento > .craft, .bento > .foundation { grid-row: span 2; }
  .photo-card, .location-card, .stat-card { aspect-ratio: 1; min-height: 0; }
  .bento > .stat-card { display: flex; }
  .projects { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { padding: 16px; }
  .icon-btn, .cta-btn { width: 44px; height: 44px; }
  .mobile-menu { top: 72px; }
  .hero { padding-top: 96px; }
  .avatar { width: 88px; height: 88px; }
  .avatar span { font-size: 28px; }
  .memoji { width: 140px; height: 140px; }
  .chat { height: 360px; padding: 12px; }

  .section { padding-top: 96px; }
  .section-head { margin-bottom: 40px; }
  .section-sub { font-size: 16px; }

  /* Phones: compact cards so two columns fit */
  .bento { gap: 10px; }
  .name-card { padding: 14px 12px; }
  /* Three lines on phones so the name stays big in a narrow column */
  .name-card h2 { font-size: 32px; font-size: clamp(24px, 20cqi, 44px); line-height: .95; white-space: normal; }
  .name-card h2 .n-first, .name-card h2 .n-last { display: block; }
  .name-rule { margin: 10px 0 7px; }
  .name-card p { font-size: 12px; line-height: 1.3; }
  .text-card { padding: 18px 16px 16px; }
  .card-title { font-size: 24px; margin-bottom: 10px; }
  .text-card .lead { font-size: 15px; line-height: 1.5; }
  .text-card .body { font-size: 13.5px; line-height: 1.55; }
  .status { font-size: 12.5px; align-items: flex-start; }
  .status .dot { margin-top: 5px; flex: none; }
  .checklist { margin: 4px 0 14px; }
  .checklist li { gap: 10px; padding: 10px 0; }
  .checklist svg { width: 18px; height: 18px; }
  .checklist b { font-size: 13.5px; }
  .checklist span { display: none; }
  .map { inset: -20% -30% -32% -30%; }
  .pin-face { left: -17px; width: 34px; height: 34px; }
  .loc-panel { margin: 7px; padding: 9px 10px; flex-direction: column; align-items: flex-start; gap: 4px; border-radius: 13px; }
  .location-card h3 { font-size: 14.5px; }
  .loc-coords, .loc-remote { display: none; }
  .loc-now { display: flex; align-items: baseline; gap: 6px; text-align: left; }
  .loc-time { font-size: 18px; }
  .loc-sub { margin-top: 0; font-size: 11px; }
  .map-credit { top: 7px; right: 7px; font-size: 8.5px; padding: 1px 5px; }
  .photo-fallback { font-size: 64px; }

  .project-card { height: 400px; padding: 22px 20px 0; }
  .project-desc { font-size: 15px; }
  .window { width: 100%; }
  .terminal { font-size: 10px; }
  .pipeline { padding: 18px 8px 8px; }
  .node b { font-size: 9px; }
  .node small { display: none; }
  .phone.side { display: none; }
  .store-badges { right: 0; }

  .sk-card { width: 300px; height: 540px; padding: 26px 24px 0; border-radius: 24px; }
  .sk-card h3 { font-size: 23px; }
  .sk-desc { font-size: 14px; }
  .sk-ill { margin: auto -24px 0; width: calc(100% + 48px); height: 200px; }
  .gallery-track { gap: 14px; }

  .contact { padding-top: 88px; }
  .cr-right { width: 100%; padding-left: 30px; }
  .footer { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sk-card:hover .sk-ill { transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Hero background: orbital view drawn by js/orbits.js
   (Earth's limb, ground stations, satellites, data links)
   ========================================================= */
.hero { position: relative; }
.hero > *:not(.hero-bg) { position: relative; z-index: 1; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 95% 75% at 50% -10%, var(--sky), transparent 75%);
}
#orbit { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Light falls on the chat: a soft neutral spot behind the card and darker
   edges (over the orbits too), so the eye lands in the centre. */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 46% 42% at 50% 60%, var(--spot), transparent 72%),
    radial-gradient(ellipse 85% 80% at 50% 52%, transparent 45%, var(--vignette) 100%);
}
@media (max-width: 640px) {
  .hero-bg::after {
    background:
      radial-gradient(ellipse 80% 38% at 50% 58%, var(--spot), transparent 72%),
      radial-gradient(ellipse 110% 75% at 50% 50%, transparent 50%, var(--vignette) 100%);
  }
}
@media (max-width: 380px) {
  .degree-card .stat-num { font-size: 34px; }
}

/* =========================================================
   Craft card, in the mould of Apple's product tiles: always dark,
   coloured light rising from the bottom, a thin gradient edge that
   turns slowly, gradient type, glass tiles and an app-icon row.
   ========================================================= */
@property --craft-a { syntax: "<angle>"; inherits: false; initial-value: 200deg; }
.bento > .craft {
  isolation: isolate;
  display: flex; flex-direction: column;
  padding: 30px 24px 24px;
  background: #09090b;
  border-color: transparent;
  color: #f5f5f7;
}
.craft::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--craft-a),
    rgba(122, 165, 255, .85), rgba(56, 189, 248, .12) 18%, rgba(60, 207, 134, .7) 34%,
    rgba(255, 255, 255, .06) 50%, rgba(255, 122, 61, .75) 68%, rgba(251, 191, 36, .12) 84%, rgba(122, 165, 255, .85));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: craft-turn 16s linear infinite;
}
@keyframes craft-turn { to { --craft-a: 560deg; } }
.craft-defs { position: absolute; width: 0; height: 0; }
.craft-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 34% at 12% 100%, rgba(61, 107, 255, .85), transparent 72%),
    radial-gradient(52% 30% at 50% 104%, rgba(60, 207, 134, .6), transparent 72%),
    radial-gradient(60% 34% at 90% 100%, rgba(255, 122, 61, .78), transparent 72%),
    radial-gradient(90% 40% at 50% 100%, rgba(56, 189, 248, .22), transparent 75%),
    radial-gradient(80% 30% at 50% -4%, rgba(122, 165, 255, .2), transparent 70%);
  filter: blur(14px);
  animation: craft-breathe 9s ease-in-out infinite alternate;
}
@keyframes craft-breathe { from { transform: translateY(2%) scale(1); opacity: .85; } to { transform: translateY(-2%) scale(1.05); opacity: 1; } }

.craft-title {
  width: fit-content; padding-bottom: 4px;
  font-size: 46px; font-weight: 700; letter-spacing: -0.045em; line-height: 1;
  background: linear-gradient(100deg, #8fb3ff 0%, #38bdf8 40%, #3ccf86 78%, #c3f36b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #8fb3ff;
}
.craft-lead { margin-top: 12px; font-size: 15.5px; line-height: 1.5; color: #a1a1a6; text-wrap: pretty; }
.craft-lead strong { color: #f5f5f7; font-weight: 600; }

.craft-pillars { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.craft-pillars li {
  padding: 14px 12px 13px; border-radius: 16px;
  background:
    radial-gradient(110% 80% at 0% 0%, var(--tint), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.craft-pillars svg { display: block; width: 26px; height: 26px; margin-bottom: 10px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.craft-pillars b {
  display: block; width: fit-content; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--g1);
}
.craft-pillars span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: #8e8e93; }
.cp-blue   { --g1: #8fb3ff; --g2: #38bdf8; --tint: rgba(91, 140, 255, .22); }
.cp-green  { --g1: #3ccf86; --g2: #c3f36b; --tint: rgba(60, 207, 134, .18); }
.cp-orange { --g1: #ff7a3d; --g2: #fbbf24; --tint: rgba(255, 122, 61, .2); }
.cp-silver { --g1: #ffffff; --g2: #a1a1a6; --tint: rgba(255, 255, 255, .1); }
/* Icon gradients: stop colours come from the tile's --g1/--g2 per theme. */
#cg-blue .s1 { stop-color: var(--i-blue-1); }     #cg-blue .s2 { stop-color: var(--i-blue-2); }
#cg-green .s1 { stop-color: var(--i-green-1); }   #cg-green .s2 { stop-color: var(--i-green-2); }
#cg-orange .s1 { stop-color: var(--i-orange-1); } #cg-orange .s2 { stop-color: var(--i-orange-2); }
#cg-silver .s1 { stop-color: var(--i-silver-1); } #cg-silver .s2 { stop-color: var(--i-silver-2); }
.bento > .craft {
  --i-blue-1: #8fb3ff; --i-blue-2: #38bdf8; --i-green-1: #3ccf86; --i-green-2: #c3f36b;
  --i-orange-1: #ff7a3d; --i-orange-2: #fbbf24; --i-silver-1: #ffffff; --i-silver-2: #8e8e93;
}
/* The page sets `stroke: currentColor` on every svg; the gradients win here. */
.cp-blue svg   { stroke: url(#cg-blue); }
.cp-green svg  { stroke: url(#cg-green); }
.cp-orange svg { stroke: url(#cg-orange); }
.cp-silver svg { stroke: url(#cg-silver); }

.craft-stack { list-style: none; margin: auto 0 0; padding: 24px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.craft-stack li {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  background: linear-gradient(160deg, rgba(30, 30, 34, .78), rgba(14, 14, 17, .72));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .1), 0 10px 24px -12px rgba(0, 0, 0, .8);
  transition: transform .3s cubic-bezier(.25, .1, .25, 1);
}
.craft-stack li:hover { transform: translateY(-3px); }
.craft-stack img { width: 20px; height: 20px; }
.craft-stack span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
  .bento > .craft { padding: 20px 14px 14px; }
  .craft-title { font-size: 31px; }
  .craft-lead { margin-top: 8px; font-size: 13px; line-height: 1.45; }
  .craft-pillars { grid-template-columns: 1fr; gap: 6px; margin-top: 14px; }
  .craft-pillars li { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 12px; }
  .craft-pillars svg { width: 20px; height: 20px; margin: 0; flex: none; }
  .craft-pillars b { font-size: 12.5px; }
  .craft-pillars span { display: none; }
  .craft-stack { gap: 6px; padding-top: 14px; }
  .craft-stack li { width: 30px; height: 30px; border-radius: 9px; }
  .craft-stack img { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .craft::before, .craft-glow { animation: none; }
}

/* Light theme: the same tile in Apple's light mould — near-white ground,
   pastel light from below, deeper gradients so the type keeps its contrast. */
:root[data-theme="light"] .bento > .craft {
  background: #fbfbfd; color: #1d1d1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(30, 60, 140, .25);
  --i-blue-1: #2f5fd0; --i-blue-2: #0284c7; --i-green-1: #059669; --i-green-2: #65a30d;
  --i-orange-1: #ea580c; --i-orange-2: #d97706; --i-silver-1: #1d1d1f; --i-silver-2: #6e6e73;
}
:root[data-theme="light"] .craft::before {
  background: conic-gradient(from var(--craft-a),
    rgba(47, 95, 208, .55), rgba(2, 132, 199, .08) 18%, rgba(5, 150, 105, .45) 34%,
    rgba(0, 0, 0, .05) 50%, rgba(234, 88, 12, .5) 68%, rgba(217, 119, 6, .08) 84%, rgba(47, 95, 208, .55));
}
:root[data-theme="light"] .craft-glow {
  background:
    radial-gradient(60% 34% at 12% 100%, rgba(91, 140, 255, .45), transparent 72%),
    radial-gradient(52% 30% at 50% 104%, rgba(60, 207, 134, .32), transparent 72%),
    radial-gradient(60% 34% at 90% 100%, rgba(255, 140, 80, .42), transparent 72%),
    radial-gradient(90% 40% at 50% 100%, rgba(56, 189, 248, .14), transparent 75%),
    radial-gradient(80% 30% at 50% -4%, rgba(122, 165, 255, .16), transparent 70%);
}
:root[data-theme="light"] .craft-title {
  background-image: linear-gradient(100deg, #2f5fd0 0%, #0284c7 40%, #059669 78%, #65a30d 100%);
  color: #2f5fd0;
}
:root[data-theme="light"] .craft-lead { color: #6e6e73; }
:root[data-theme="light"] .craft-lead strong { color: #1d1d1f; }
:root[data-theme="light"] .craft-pillars li {
  background:
    radial-gradient(110% 80% at 0% 0%, var(--tint), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .7));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 6px 18px -12px rgba(0, 0, 0, .18);
}
:root[data-theme="light"] .cp-blue   { --g1: #2f5fd0; --g2: #0284c7; --tint: rgba(91, 140, 255, .14); }
:root[data-theme="light"] .cp-green  { --g1: #059669; --g2: #65a30d; --tint: rgba(60, 207, 134, .14); }
:root[data-theme="light"] .cp-orange { --g1: #ea580c; --g2: #d97706; --tint: rgba(255, 140, 80, .15); }
:root[data-theme="light"] .cp-silver { --g1: #1d1d1f; --g2: #6e6e73; --tint: rgba(0, 0, 0, .04); }
:root[data-theme="light"] .craft-pillars span { color: #6e6e73; }
:root[data-theme="light"] .craft-stack li {
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(246, 246, 248, .85));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07), 0 10px 22px -14px rgba(0, 0, 0, .35);
}

/* =========================================================
   Foundation card: the twin of Craft (dark tile, light from the
   middle this time) with a "defence in depth" diagram: four rings,
   edge → network → identity → data, around a shield.
   ========================================================= */
.bento > .foundation {
  isolation: isolate;
  display: flex; flex-direction: column;
  padding: 30px 24px 24px;
  background: #09090b; border-color: rgba(255, 255, 255, .08); color: #f5f5f7;
  --f-edge-1: #3d6bff; --f-edge-2: #6f9bff; --f-net-1: #38bdf8; --f-net-2: #22d3ee;
  --f-id-1: #2dd4bf; --f-id-2: #5eead4; --f-data-1: #ffffff; --f-data-2: #8e8e93;
  --f-ink-2: #a1a1a6; --f-ink-3: #8e8e93; --f-base: rgba(255, 255, 255, .07);
}
.f-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 32% at 50% 52%, rgba(56, 189, 248, .22), transparent 72%),
    radial-gradient(70% 40% at 50% 52%, rgba(61, 107, 255, .16), transparent 75%),
    radial-gradient(80% 30% at 50% 0%, rgba(45, 212, 191, .1), transparent 70%);
  filter: blur(10px);
}
.f-title {
  width: fit-content; padding-bottom: 4px;
  font-size: 46px; font-weight: 700; letter-spacing: -0.045em; line-height: 1;
  background: linear-gradient(100deg, #6f9bff 0%, #38bdf8 55%, #5eead4 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #38bdf8;
}
.f-lead { margin-top: 12px; font-size: 15.5px; line-height: 1.5; color: var(--f-ink-2); text-wrap: pretty; }
.f-lead strong { color: #f5f5f7; font-weight: 600; }

.f-rings { margin: 16px auto 0; width: min(100%, 168px); text-align: center; }
.f-rings svg { display: block; width: 100%; height: auto; overflow: visible; stroke: none; }
.ring-base { fill: none; stroke: var(--f-base); stroke-width: 7; }
.ring-flow { fill: none; stroke-width: 7; stroke-linecap: round; transform-box: fill-box; transform-origin: center; }
.ring-edge .ring-flow { stroke-dasharray: 150 28 60 40 90 210; animation: ring-turn 38s linear infinite; }
.ring-net .ring-flow  { stroke-dasharray: 110 24 70 30 140 80; animation: ring-turn 30s linear infinite reverse; }
.ring-id .ring-flow   { stroke-dasharray: 90 20 50 26 80 60; animation: ring-turn 24s linear infinite; }
.ring-data .ring-flow { stroke-dasharray: 60 14 40 18 70 4; animation: ring-turn 18s linear infinite reverse; }
@keyframes ring-turn { to { transform: rotate(360deg); } }
#fg-edge .s1 { stop-color: var(--f-edge-1); } #fg-edge .s2 { stop-color: var(--f-edge-2); }
#fg-net .s1 { stop-color: var(--f-net-1); }   #fg-net .s2 { stop-color: var(--f-net-2); }
#fg-id .s1 { stop-color: var(--f-id-1); }     #fg-id .s2 { stop-color: var(--f-id-2); }
#fg-data .s1 { stop-color: var(--f-data-1); } #fg-data .s2 { stop-color: var(--f-data-2); }
.f-core circle { fill: #f5f5f7; }
.f-core path { fill: none; stroke: #09090b; stroke-width: 2; stroke-linejoin: round; }
.f-rings figcaption { margin-top: 8px; font-size: 12px; font-weight: 500; color: var(--f-ink-3); }

.f-layers { list-style: none; margin: auto 0 0; padding: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.f-layers li { display: flex; gap: 9px; align-items: flex-start; }
.f-layers i { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a) 20%, transparent); }
.fl-edge { --a: var(--f-edge-1); --b: var(--f-edge-2); }
.fl-net  { --a: var(--f-net-1);  --b: var(--f-net-2); }
.fl-id   { --a: var(--f-id-1);   --b: var(--f-id-2); }
.fl-data { --a: var(--f-data-1); --b: var(--f-data-2); }
.f-layers b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.f-layers span { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.4; color: var(--f-ink-3); }

:root[data-theme="light"] .bento > .foundation {
  background: #fbfbfd; border-color: rgba(0, 0, 0, .06); color: #1d1d1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(30, 60, 140, .25);
  --f-edge-1: #1d4ed8; --f-edge-2: #2f5fd0; --f-net-1: #0284c7; --f-net-2: #0891b2;
  --f-id-1: #0d9488; --f-id-2: #14b8a6; --f-data-1: #1d1d1f; --f-data-2: #6e6e73;
  --f-ink-2: #6e6e73; --f-ink-3: #6e6e73; --f-base: rgba(0, 0, 0, .06);
}
:root[data-theme="light"] .f-title { background-image: linear-gradient(100deg, #1d4ed8 0%, #0284c7 55%, #0d9488 100%); color: #0284c7; }
:root[data-theme="light"] .f-lead strong { color: #1d1d1f; }
:root[data-theme="light"] .f-core circle { fill: #1d1d1f; }
:root[data-theme="light"] .f-core path { stroke: #fbfbfd; }
:root[data-theme="light"] .f-glow {
  background:
    radial-gradient(55% 32% at 50% 52%, rgba(56, 189, 248, .16), transparent 72%),
    radial-gradient(70% 40% at 50% 52%, rgba(61, 107, 255, .1), transparent 75%),
    radial-gradient(80% 30% at 50% 0%, rgba(45, 212, 191, .1), transparent 70%);
}

@media (max-width: 640px) {
  .bento > .foundation { padding: 20px 14px 14px; }
  .f-title { font-size: 31px; }
  .f-lead { margin-top: 8px; font-size: 13px; line-height: 1.45; }
  .f-rings { margin-top: 14px; width: 128px; }
  .f-rings figcaption { font-size: 10.5px; margin-top: 6px; }
  .f-layers { grid-template-columns: 1fr; gap: 8px; padding-top: 14px; }
  .f-layers span { display: none; }
  .f-layers b { font-size: 12.5px; }
  .f-layers i { margin-top: 4px; width: 9px; height: 9px; }
}
@media (prefers-reduced-motion: reduce) { .ring-flow { animation: none; } }

/* =========================================================
   Highlights band (top of About), as on pszostak.pl: three sheets
   rise from the bottom edge, the centre one higher and on top with
   a "hover to read more" tag. Hovering a sheet lifts it to show the
   rest of its text; clicking asks the chat about it.
   ========================================================= */
.bento > .highlights {
  padding: 0;
  background: linear-gradient(to bottom right, var(--surface), var(--surface-2));
}
.sheets { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0 8px; overflow: hidden; border-radius: inherit; }
/* Same motion as the reference: at rest the sheets sit low; on hover the side
   ones rise on a diagonal (a small tilt and a nudge outwards), the centre one
   straight up. The text is dimmed and fades out downwards until hovered. */
.sheet {
  --y: 100px;
  position: relative; z-index: 1; flex: 0 0 33.333%; height: 176px;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 16px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, .3);
  transform: translateY(var(--y));
  transition: transform .55s cubic-bezier(.34, 1.25, .64, 1), border-color .2s, box-shadow .2s;
}
.sheet::before { /* thin accent line on top, shown on hover */
  content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 1px;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--accent) 60%, transparent), transparent);
  opacity: 0; transition: opacity .3s;
}
.sheet-l { margin-right: -24px; padding-right: 24px; }
.sheet-r { margin-left: -24px; padding-left: 24px; text-align: right; }
.sheet-c { z-index: 2; flex-basis: 40%; height: 192px; padding: 20px; text-align: center; }
.sheet-l:hover, .sheet-l:focus-visible { transform: translate(-5px, 50px) rotate(-2deg); }
.sheet-r:hover, .sheet-r:focus-visible { transform: translate(5px, 50px) rotate(2deg); }
.sheet-c:hover, .sheet-c:focus-visible { transform: translateY(60px); }
.sheet:hover, .sheet:focus-visible {
  z-index: 3; outline: none;
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 -5px 35px rgba(0, 0, 0, .4);
}
.sheet:hover::before, .sheet:focus-visible::before { opacity: 1; }
.sheet b { display: block; margin-top: 4px; font-size: 10px; font-weight: 700; line-height: 1.25; text-transform: uppercase; opacity: .9; }
.sheet-c b { margin-top: 8px; font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; opacity: 1; }
.sheet span {
  display: block; margin-top: 8px; font-size: 10px; line-height: 1.45; color: var(--muted);
  opacity: .5; transition: opacity .3s;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 15%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 15%, transparent 70%);
}
.sheet-c span { -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 15%, transparent 80%); mask-image: linear-gradient(to bottom, #000 0%, #000 15%, transparent 80%); }
.sheet:hover span, .sheet:focus-visible span { opacity: 1; -webkit-mask-image: none; mask-image: none; }
:root[data-theme="light"] .sheet { box-shadow: 0 -5px 24px rgba(0, 0, 0, .08); }
:root[data-theme="light"] .sheet:hover, :root[data-theme="light"] .sheet:focus-visible { box-shadow: 0 -5px 28px rgba(0, 0, 0, .12); }

/* Phones: no hover, so the text shows plainly (as the reference does). */
@media (max-width: 640px) {
  .sheets { padding: 0 6px; }
  .sheet { --y: 76px; height: 170px; padding: 12px 10px; }
  .sheet-c { --y: 62px; height: 180px; padding: 14px 10px; }
  .sheet-l { margin-right: -14px; padding-right: 16px; }
  .sheet-r { margin-left: -14px; padding-left: 16px; }
  .sheet b, .sheet-c b { font-size: 9.5px; }
  .sheet span { margin-top: 6px; font-size: 8.5px; line-height: 1.35; opacity: .75; -webkit-mask-image: none; mask-image: none; hyphens: auto; }
}
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }

/* =========================================================
   Featured project: PictoEscritura, in its brand colours (yellow
   and black). Real material from the public site: a lesson in a
   classroom and a digital book on a laptop. Below, what I built
   and the stack.
   ========================================================= */
.project-feature { grid-column: 1 / -1; margin-bottom: 28px; }
.pf-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px;
  min-height: 500px; padding: 44px 0 0 44px;
  border-radius: 28px; color: #111;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(70% 70% at 0% 100%, rgba(255, 196, 0, .55), transparent 65%),
    #ffed00;
}
.pf-copy { padding-bottom: 40px; display: flex; flex-direction: column; }
.pf-logo { width: 150px; height: auto; margin: -4px 0 18px -4px; }
.pf-meta { font-size: 14px; font-weight: 600; color: rgba(0, 0, 0, .62); }
.pf-title { margin-top: 6px; font-size: clamp(40px, 5vw, 60px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.pf-role { margin-top: 10px; font-size: 16px; font-weight: 600; }
.pf-desc { margin-top: 14px; max-width: 470px; font-size: 16.5px; line-height: 1.55; color: rgba(0, 0, 0, .78); text-wrap: pretty; }
.pf-stats { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px 28px; }
.pf-stats b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pf-stats span { display: block; margin-top: 5px; max-width: 9rem; font-size: 12.5px; line-height: 1.3; color: rgba(0, 0, 0, .66); }
.pf-actions { margin-top: auto; padding-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.pf-link, .pf-ask {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: 999px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.pf-link { background: #111; color: #ffed00; }
.pf-link svg { width: 14px; height: 14px; stroke-width: 2.2; }
.pf-ask { background: transparent; color: #111; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .8); }
.pf-link:hover, .pf-ask:hover { transform: translateY(-1px); }
.pf-ask:hover { background: rgba(0, 0, 0, .06); }

/* The classroom photo bleeds off the right and bottom; the laptop sits in front. */
.pf-visual { position: relative; min-height: 380px; }
.pf-photo {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 40%;
  border-radius: 20px 0 0 0;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .45);
}
.pf-laptop {
  position: absolute; left: -64px; bottom: -6px; width: 72%; height: auto; z-index: 2;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .35));
  transition: transform .6s cubic-bezier(.25, .1, .25, 1);
}
.project-feature:hover .pf-laptop { transform: translateY(-6px); }

/* What I built, and the stack. */
.pf-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 28px; }
.pf-points li { display: flex; gap: 14px; align-items: flex-start; }
.pf-points svg {
  flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 11px;
  background: #ffed00; stroke: #111; stroke-width: 1.8;
}
.pf-points b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.pf-points span { display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.pf-stack { list-style: none; margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
.pf-stack li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px;
  border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border);
}
.pf-stack img { width: 18px; height: 18px; }

/* Room for the next projects. */
.project-slot { min-height: 280px; border-radius: 24px; border: 1.5px dashed color-mix(in srgb, var(--text) 14%, transparent); }

@media (max-width: 900px) {
  .pf-card { grid-template-columns: 1fr; padding: 32px 0 0 28px; }
  .pf-copy { padding-right: 28px; padding-bottom: 8px; }
  .pf-visual { min-height: 340px; }
  .pf-laptop { left: -10px; width: 62%; }
  .pf-points { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pf-card { padding: 26px 0 0 20px; border-radius: 24px; }
  .pf-copy { padding-right: 20px; }
  .pf-logo { width: 120px; margin-bottom: 14px; }
  .pf-desc { font-size: 15px; }
  .pf-stats { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .pf-stats b { font-size: 26px; }
  .pf-visual { min-height: 250px; }
  .pf-laptop { left: -8px; width: 80%; }
  .pf-points { grid-template-columns: 1fr; gap: 18px; }
  .project-slot { min-height: 140px; }
}
@media (prefers-reduced-motion: reduce) { .pf-laptop, .pf-link, .pf-ask { transition: none; } }

/* ---------- Obol Studio: the same frame mirrored, in Obol's own look
   (black, white type, its orange accent) with screens of obol.studio. ---------- */
.pf-obol { margin-top: 36px; }
.pf-obol .pf-card {
  grid-template-columns: 1.1fr 1fr; padding: 44px 44px 0 0; color: #f5f5f7;
  background:
    radial-gradient(60% 70% at 0% 100%, rgba(255, 90, 60, .22), transparent 65%),
    radial-gradient(50% 60% at 100% 0%, rgba(255, 255, 255, .06), transparent 60%),
    #0a0a0b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.pf-obol .pf-copy { order: 2; }
.pf-obol .pf-visual { order: 1; }
.pf-obol .pf-meta { color: #ff5a3c; opacity: 1; }
.pf-obol .pf-desc { color: rgba(255, 255, 255, .78); }
.pf-obol .pf-role { color: #f5f5f7; }
.pf-services { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-services li {
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.pf-services b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.pf-services span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .62); }
.pf-services li.soon { opacity: .55; }
.pf-obol .pf-link { background: #fff; color: #0a0a0b; }
.pf-obol .pf-ask { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.pf-obol .pf-ask:hover { background: rgba(255, 255, 255, .08); }
/* Obol's key art, full bleed on the left, fading into the card towards the text. */
.pf-obol .pf-visual { margin: -44px 0 0; min-height: 520px; }
.ob-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%;
  -webkit-mask-image: linear-gradient(to right, #000 62%, transparent 100%);
  mask-image: linear-gradient(to right, #000 62%, transparent 100%);
  transition: transform 1.2s cubic-bezier(.25, .1, .25, 1);
}
.pf-obol:hover .ob-poster { transform: scale(1.03); }
.pf-obol .pf-points svg { background: #ff5a3c; stroke: #fff; }
.pf-stack .ai-chip { width: 18px; height: 18px; stroke: #ff5a3c; stroke-width: 1.8; }

@media (max-width: 900px) {
  .pf-obol .pf-card { grid-template-columns: 1fr; padding: 32px 0 0 28px; }
  .pf-obol .pf-copy { order: 1; padding-right: 28px; }
  .pf-obol .pf-visual { order: 2; }
  .pf-obol .pf-visual { margin: 0 0 0 -28px; min-height: 300px; }
  .ob-poster { -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); }
}
@media (max-width: 640px) {
  .pf-obol .pf-card { padding: 26px 0 0 20px; }
  .pf-obol .pf-copy { padding-right: 20px; }
  .pf-services { grid-template-columns: 1fr; }
  .pf-obol .pf-visual { margin-left: -20px; min-height: 230px; }
  .projects { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ob-poster { transition: none; } }

/* ---------- Squadwatch: the mint of its own dashboard. A screenshot of the
   dashboard (demo data) bleeds off the right and bottom, and a terminal with
   the real `squadwatch scan` output sits in front, like the laptop above. ---------- */
.pf-sw { margin-top: 36px; }
.pf-sw .pf-card {
  color: #0e1414;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(70% 70% at 0% 100%, rgba(69, 216, 108, .30), transparent 65%),
    #d3e6e2;
}
.pf-sw .pf-meta { color: #17663a; }
.pf-sw .pf-desc { color: rgba(14, 20, 20, .8); }
.pf-sw .pf-stats span { color: rgba(14, 20, 20, .66); }
.pf-sw .pf-link { background: #0e1414; color: #d3e6e2; }
.pf-sw .pf-ask { color: #0e1414; box-shadow: inset 0 0 0 1.5px rgba(14, 20, 20, .8); }
.pf-sw .pf-points svg { background: #0e1414; stroke: #7fe0a0; }
.pf-sw .pf-stack .ai-chip { stroke: #17663a; }
.sw-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 0 0;
  border-radius: 20px 0 0 0;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .4);
}
.sw-term {
  position: absolute; left: -64px; bottom: 30px; z-index: 2; width: min(80%, 430px);
  padding: 14px 16px; border-radius: 14px; background: #0e1414; color: #d6e3e1;
  font: 12.5px/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  box-shadow: 0 24px 40px -14px rgba(0, 0, 0, .5);
  transition: transform .6s cubic-bezier(.25, .1, .25, 1);
}
.pf-sw:hover .sw-term { transform: translateY(-6px); }
.sw-term p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-p { color: #6fdb8f; }
.sw-dim { color: #7e918e; }
.sw-c, .sw-h { display: inline-block; min-width: 5.6em; margin-right: 6px; padding: 0 4px; border-radius: 3px; font-weight: 700; text-align: center; }
.sw-c { background: #ff7262; color: #1a0806; }
.sw-h { background: #ffa75a; color: #1a0e03; }

@media (max-width: 900px) {
  .sw-term { left: -10px; bottom: 18px; width: 82%; }
}
@media (max-width: 640px) {
  .sw-term { left: -8px; font-size: 11px; width: 92%; padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) { .sw-term { transition: none; } }

/* =========================================================
   Skill cards: one style per card, like the mix on Apple's store.
   Shared: size, padding, eyebrow / headline / line. Each card then
   has its own ground, type and visual.
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 1 · AI & agents: black, a core with a turning ring of light, agents orbiting. */
@property --orbit { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.sk-ai { --sk-bg: #050507; color: #f5f5f7; background: radial-gradient(90% 55% at 50% 100%, rgba(41, 151, 255, .28), transparent 70%), #050507; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.sk-ai .sk-eyebrow { color: #8fb3ff; }
.sk-ai .sk-desc { color: #a1a1a6; }
.ai-orbit { position: relative; flex: none; height: 250px; margin: auto -30px 0; animation: orbit-turn 40s linear infinite; }
@keyframes orbit-turn { to { --orbit: 360deg; } }
.ai-core {
  position: absolute; left: 50%; top: 52%; width: 92px; height: 92px; margin: -46px 0 0 -46px;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #1a2a4a, #07090f 70%);
  box-shadow: 0 0 60px 10px rgba(41, 151, 255, .25);
}
.ai-ring {
  position: absolute; inset: -3px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from var(--orbit), #2997ff, #38bdf8, #5eead4, #2997ff 60%, rgba(41, 151, 255, .1) 75%, #2997ff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.ai-core svg { width: 40px; height: 40px; fill: #fff; stroke: none; }
.ai-agents { list-style: none; margin: 0; padding: 0; }
.ai-agents li {
  --a: calc(var(--orbit) + var(--i) * 60deg);
  position: absolute; left: calc(50% + cos(var(--a)) * 140px); top: calc(52% + sin(var(--a)) * 82px);
  transform: translate(-50%, -50%);
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: #e8f1ff; background: rgba(41, 151, 255, .14); box-shadow: inset 0 0 0 1px rgba(41, 151, 255, .45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* 2 · Interfaces & apps: type only, each framework in its own colour. */
.sk-lang { --sk-bg: #f5f5f7; background: #f5f5f7; color: #1d1d1f; }
.sk-lang .sk-eyebrow { color: #6e6e73; }
.lang-words { margin-top: 18px; display: flex; flex-direction: column; line-height: .92; letter-spacing: -0.055em; font-weight: 800; }
.lang-words .w-react { font-size: 92px; color: #087ea4; }
.lang-words .w-vue { font-size: 92px; color: #2f9e6e; margin-top: 4px; }
.lang-words .w-flutter { font-size: 76px; color: #027dfd; margin-top: 4px; }
.lang-words .w-more { margin-top: 18px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: #86868b; }
.sk-lang .sk-desc { margin-top: auto; padding-bottom: 30px; color: #6e6e73; }

/* 3 · Backend & web: an editor, real Rails code and the response. */
.sk-be { --sk-bg: #0d1117; background: linear-gradient(180deg, #111827, #0b0f17); color: #e6edf3; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.sk-be .sk-eyebrow { color: #7d8590; }
.sk-be .sk-desc { color: #9aa4af; }
.code-win { margin: auto -2px 30px; border-radius: 14px; overflow: hidden; background: #0d1117; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 40px -20px rgba(0, 0, 0, .8); }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #161b22; }
.code-bar i { width: 9px; height: 9px; border-radius: 50%; background: #30363d; }
.code-bar span { margin-left: 8px; font-family: var(--mono); font-size: 11px; color: #7d8590; }
.code-win pre { margin: 0; padding: 14px 14px 10px; font-family: var(--mono); font-size: 10.5px; line-height: 1.75; color: #e6edf3; white-space: pre; overflow: hidden; }
.code-win .k { color: #ff7b72; } .code-win .c { color: #79c0ff; } .code-win .m { color: #d2e3ff; font-weight: 600; } .code-win .s { color: #ffa657; }
.code-res { display: flex; align-items: center; gap: 8px; margin: 0 14px; padding: 9px 0 10px; border-top: 1px solid #21262d; font-family: var(--mono); font-size: 11px; color: #7d8590; }
.code-res b { flex: none; white-space: nowrap; padding: 2px 7px; border-radius: 6px; background: rgba(63, 185, 80, .15); color: #3fb950; font-weight: 600; }
.code-tags { display: flex; gap: 6px; padding: 0 14px 14px; }
.code-tags span { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #c9d1d9; background: #21262d; }


/* 5 · Cloud & DevOps: the white card with one-blue line icons. */
.sk-cloud { --ill: #0071e3; --sk-bg: #ffffff; background: #fff; color: #1d1d1f; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px -14px rgba(0, 0, 0, .12); }
.sk-cloud .sk-eyebrow, .sk-cloud .sk-desc { color: #6e6e73; }



/* 5 · Databases: a light dashboard, an area chart and a table. */
.sk-data { --sk-bg: #eef8f1; background: linear-gradient(180deg, #f1faf4, #e3f4e9); color: #0f2a1a; }
.sk-data .sk-eyebrow { color: #3f7a55; }
.sk-data .sk-desc { color: #4b6b57; }
.dash { margin: auto 0 30px; padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 18px 34px -20px rgba(20, 80, 40, .35); }
.dash-chart svg { display: block; width: 100%; height: 86px; }
.dash-chart .area { fill: url(#dashFill); stroke: none; }
.dash-chart .line { fill: none; stroke: #16a34a; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.dash-rows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.dash-rows li { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: #1f3d2a; }
.dash-rows i { height: 7px; border-radius: 99px; background: linear-gradient(90deg, #16a34a var(--w), #e3efe7 var(--w)); }

/* 6 · Security & networks: a radar sweeping around a lock. */
.sk-sec { --sk-bg: #020807; background: radial-gradient(80% 60% at 50% 100%, rgba(45, 212, 191, .18), transparent 70%), #020807; color: #e6fffb; box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .14); }
.sk-sec .sk-eyebrow { color: #5eead4; }
.sk-sec .sk-desc { color: #8fb8b2; }
.radar { position: relative; flex: none; width: 300px; height: 300px; margin: auto auto -90px; border-radius: 50%; overflow: hidden; }
.radar .r { position: absolute; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(45, 212, 191, .35); }
.radar .r1 { inset: 0; } .radar .r2 { inset: 50px; } .radar .r3 { inset: 100px; }
.radar::before, .radar::after { content: ""; position: absolute; background: rgba(45, 212, 191, .2); }
.radar::before { left: 50%; top: 0; bottom: 0; width: 1px; } .radar::after { top: 50%; left: 0; right: 0; height: 1px; }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(45, 212, 191, .45), rgba(45, 212, 191, 0) 70deg, transparent); animation: radar-turn 4s linear infinite; }
@keyframes radar-turn { to { transform: rotate(360deg); } }
.radar .blip { position: absolute; left: var(--x); top: var(--y); width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 12px #2dd4bf; animation: blip 4s ease-out infinite; animation-delay: var(--d); opacity: 0; }
@keyframes blip { 0% { opacity: 1; transform: scale(1.4); } 60% { opacity: .15; transform: scale(1); } 100% { opacity: 0; } }
.radar .lock { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; padding: 10px; border-radius: 14px; fill: none; stroke: #e6fffb; stroke-width: 1.8; background: rgba(45, 212, 191, .16); box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .5); }

@media (max-width: 640px) {
  .ai-agents li { left: calc(50% + cos(var(--a)) * 112px); top: calc(52% + sin(var(--a)) * 64px); font-size: 11px; padding: 5px 9px; }
  .ai-orbit { height: 210px; margin: auto -24px 0; }
  .lang-words .w-react, .lang-words .w-vue { font-size: 72px; }
  .lang-words .w-flutter { font-size: 60px; }
  .lang-words .w-more { font-size: 14px; }
  .sk-lang .sk-desc { padding-bottom: 24px; }
  .code-win pre { font-size: 10px; }
  .code-win { margin-bottom: 24px; }
  .dash { margin-bottom: 24px; padding: 12px; }
  .radar { width: 250px; height: 250px; margin-bottom: -80px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-orbit, .radar .sweep, .radar .blip { animation: none; }
  .radar .blip { opacity: .6; }
}

/* =========================================================
   Puzzle under the skills: the six areas as jigsaw pieces of one
   material. They arrive scattered and snap together on view
   (main.js toggles .is-in / .is-done); once whole, the seams soften
   and one gradient runs across the lot.
   ========================================================= */
.puzzle {
  max-width: var(--maxw); margin: 80px auto 0; padding: 0 clamp(16px, 4vw, 32px);
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px 56px; align-items: center;
}
.puzzle-copy h3 { margin-top: 8px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.puzzle-copy p:not(.sk-eyebrow) { margin-top: 14px; max-width: 440px; font-size: 16.5px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.puzzle svg { display: block; width: min(100%, 540px); height: auto; margin: 0 auto; overflow: visible; }

.puzzle { --pz-a: #1f1f23; --pz-b: #151518; --pz-seam: var(--bg); --pz-text: #f2f2f3; --pz-badge: .14; }
:root[data-theme="light"] .puzzle { --pz-a: #ffffff; --pz-b: #f2f2f4; --pz-text: #1d1d1f; --pz-badge: .1; }
.pz {
  transform-box: fill-box; transform-origin: center;
  opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.9);
}
.puzzle.is-in .pz {
  opacity: 1; transform: none;
  transition: transform 1.15s cubic-bezier(.2, 1.2, .35, 1) calc(var(--i) * .12s), opacity .45s ease calc(var(--i) * .12s);
}
.pz .shape {
  fill: var(--pz-a); stroke: var(--pz-seam); stroke-width: 2.5; stroke-linejoin: round;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35));
  transition: stroke-width .8s ease, filter .8s ease;
}
:root[data-theme="light"] .pz .shape { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .1)); }
.pz .shine { fill: url(#pzShine); stroke: none; pointer-events: none; }
:root[data-theme="light"] .pz .shine { display: none; }
.pz .badge { fill: currentColor; fill-opacity: var(--pz-badge); stroke: none; }
.pz .ico { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pz .ico.fill { fill: currentColor; stroke: none; }
.pz text { fill: var(--pz-text); stroke: none; font: 600 13px/1 var(--font); letter-spacing: -0.01em; text-anchor: middle; }
.pz-ai { color: #2997ff; } .pz-fe { color: #22a6d6; } .pz-be { color: #ff7b72; }
.pz-cloud { color: #4f8dff; } .pz-data { color: #2fbf71; } .pz-sec { color: #2dd4bf; }
:root[data-theme="light"] .pz-ai { color: #0071e3; } :root[data-theme="light"] .pz-fe { color: #087ea4; }
:root[data-theme="light"] .pz-be { color: #d9473f; } :root[data-theme="light"] .pz-cloud { color: #2f5fd0; }
:root[data-theme="light"] .pz-data { color: #16a34a; } :root[data-theme="light"] .pz-sec { color: #0d9488; }

/* Whole: a single gradient over every piece, and thinner seams. */
.pz-whole { fill: url(#pzWhole); stroke: none; opacity: 0; pointer-events: none; transition: opacity 1s ease; }
.puzzle.is-done .pz-whole { opacity: .16; }
:root[data-theme="light"] .puzzle.is-done .pz-whole { opacity: .1; }
.puzzle.is-done .pz .shape { stroke-width: 1; filter: none; }
.puzzle.is-done svg { filter: drop-shadow(0 24px 40px rgba(41, 151, 255, .18)); transition: filter 1s ease; }
.puzzle.is-done .pz:hover { transform: translateY(-5px); transition: transform .35s cubic-bezier(.25, .1, .25, 1); }
/* Drag: grab a piece once the puzzle is whole; it springs back on release (main.js). */
.puzzle.is-done .pz { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.puzzle.is-done .pz.is-drag { cursor: grabbing; }
.pz.is-drag .shape { stroke-width: 1; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .45)); }
:root[data-theme="light"] .pz.is-drag .shape { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .18)); }

@media (max-width: 900px) {
  .puzzle { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .puzzle-copy p:not(.sk-eyebrow) { margin-inline: auto; }
}
@media (max-width: 640px) {
  .puzzle { margin-top: 56px; }
  .pz text { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .pz, .puzzle.is-in .pz { opacity: 1; transform: none; transition: none; }
  .pz-whole, .pz .shape { transition: none; }
}

/* What I aim for in each area: small tags, in each card's own colours. */
.sk-tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sk-tags li { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--tag-fg); background: var(--tag-bg); }
.sk-ai    { --tag-fg: #cfe3ff; --tag-bg: rgba(41, 151, 255, .16); }
.sk-fe    { --tag-fg: #1d1d1f; --tag-bg: #fff; }
.sk-fe .sk-tags li { box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.sk-be    { --tag-fg: #ffb3ad; --tag-bg: rgba(255, 123, 114, .14); }
.sk-cloud { --tag-fg: #0058b9; --tag-bg: #eaf3ff; }
.sk-data  { --tag-fg: #126b36; --tag-bg: #d3efdd; }
.sk-sec   { --tag-fg: #b8fff3; --tag-bg: rgba(45, 212, 191, .14); }
.sk-fe .sk-tags { margin-top: 16px; }
@media (max-width: 640px) {
  .sk-tags li { font-size: 11.5px; padding: 4px 9px; }
}
