/* George Virgolici portfolio: styles shared by every page.
   Order: tokens + reset, hero, nav, section heads, featured projects, experience,
   resume CTA, recommendations, glass cards, skills, final CTA, phone, reduced motion. */

:root {
  /* vertical rhythm: one gap between sections, one (much smaller) from a section's
     title + subtitle to its content, so headings sit with the section they introduce */
  --sec-gap: 160px;    /* end of one section -> title of the next */
  --sec-first: 120px;  /* pill nav -> first section title */
  --head-gap: 40px;    /* subtitle -> section content */
  --bg: #000000;
  --card: #0a0a0a;
  --stroke: rgba(255, 255, 255, 0.13);
  --muted: #969696;
  --nav-text: #cacaca;
  --pjs: "Plus Jakarta Sans", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* dot grid behind everything (drawn in JS); body's black is painted on the viewport beneath it */
.bg-grid { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
body {
  background: var(--bg); color: #fff;
  font-family: var(--pjs);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
section, header { scroll-margin-top: 120px; }

/* 1px inner stroke used on every card, the nav and the avatar */
.stroke { position: relative; }
.stroke::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 1px solid var(--stroke); border-radius: inherit;
}

/* ---------- Hero ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 52px 20px 0;
}
.avatar {
  width: 86px; height: 86px; border-radius: 100px; background: var(--card);
  display: grid; place-items: center;
}
.avatar img { width: 72px; height: 72px; border-radius: 36px; object-fit: cover; }
.hero h1 {
  margin-top: 48px; font-size: 38px; font-weight: 500;
  line-height: 1.4; letter-spacing: 0.01em;
}
.hero h1 .w { display: inline-block; white-space: nowrap; }
.hero h1 .ch {
  display: inline-block; opacity: 0; filter: blur(10px);
  animation: blurIn .7s ease forwards;
}
@keyframes blurIn { to { opacity: 1; filter: blur(0); } }
.hero p {
  margin-top: 40px; max-width: 680px;
  font-size: 18px; line-height: 1.8; letter-spacing: 0.01em; color: var(--muted);
}
.avail {
  margin-top: 28px; display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 7px;
  font-family: "Inter", sans-serif; font-size: 16px; line-height: 1.8;
}
/* two layers, as in Framer: solid "Inside" dot + translucent "Outside" ring on top */
.avail .dot { position: relative; width: 20px; height: 20px; flex: none; }
.avail .dot::before {
  content: ""; position: absolute; left: 4px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: rgb(57, 227, 0);
}
.avail .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(57, 227, 0, 0.5);
  animation: availPulse 1s linear infinite alternate;
}
/* Framer loop: opacity 1 -> .2, scale 1 -> 1.1, rotate 0 -> 360, 1s linear, mirror */
@keyframes availPulse {
  from { opacity: 1;  transform: scale(1)   rotate(0deg); }
  to   { opacity: .2; transform: scale(1.1) rotate(360deg); }
}

/* ---------- Sticky pill nav: matte glass, Netflix-style ----------
   Layers, back to front: .nav-glow (vivid, top strip) -> .nav-glass (lighter, mostly opaque
   matte frost, easing off at the top) -> .nav-lens (selected / hovered item) -> links.
   The nav itself has no backdrop-filter, so every layer samples the page directly. */
.nav {
  position: sticky; top: 40px; z-index: 50;
  width: fit-content; margin: 34px auto 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 31px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
/* after 3s without scrolling the pinned nav fades away; scrolling brings it back (see JS) */
.nav.nav-idle { opacity: 0; transform: translateY(-14px); pointer-events: none; }
.nav-glass, .nav-glow {
  position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
}
/* matte body: barely see-through, only colour comes through as a soft haze */
.nav-glass {
  /* ~#131315 over the black page: dark, but still lifted off #000 and the #0a0a0a cards */
  background: rgba(21, 21, 23, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(140%) brightness(.6);
          backdrop-filter: blur(30px) saturate(140%) brightness(.6);
  -webkit-mask: linear-gradient(to top, #000 calc(100% - 20px), rgba(0, 0, 0, .6));
          mask: linear-gradient(to top, #000 calc(100% - 20px), rgba(0, 0, 0, .6));
}
/* top glass glow: what's under the upper edge, blurred, brighter and more saturated */
.nav-glow {
  background: rgba(21, 21, 23, 0.45);
  -webkit-backdrop-filter: blur(10px) saturate(240%) brightness(1.15);
          backdrop-filter: blur(10px) saturate(240%) brightness(1.15);
  -webkit-mask: linear-gradient(to bottom, #000, rgba(0, 0, 0, .55) 8px, transparent 24px);
          mask: linear-gradient(to bottom, #000, rgba(0, 0, 0, .55) 8px, transparent 24px);
}
/* no outline: only a thin glint along the bottom edge, brightest at the bottom centre
   and fading out up the rounded ends */
.nav.stroke::after {
  border: 0; padding: 1px;
  background: radial-gradient(70% 90% at 50% 100%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
}
/* selected / hovered item: a flat, lighter pill (no gradient, no outline) */
.nav-lens {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: 0; height: 0; border-radius: 100px; opacity: 0;
  transition:
    transform .5s cubic-bezier(.34, 1.36, .64, 1),
    width .5s cubic-bezier(.34, 1.36, .64, 1),
    opacity .25s ease;
}
.nav-lens.on { opacity: 1; }
.nav-lens i { position: absolute; inset: 0; border-radius: inherit; display: block; }
.nav-lens .lens-fill {
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(6px) brightness(1.3);
          backdrop-filter: blur(6px) brightness(1.3);
}
.nav a {
  position: relative; z-index: 1;
  font-size: 14px; font-weight: 500; line-height: 1.2; color: rgba(255, 255, 255, 0.72);
  padding: 8px; border-radius: 100px; transition: color .25s ease;
}
.nav a.active, .nav a:hover, .nav a:focus-visible { color: #fff; }
.nav a:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.nav a.cta {
  background: #fff; color: #000; font-weight: 400;
  padding: 10px 16px; border-radius: 19px; transition: opacity .2s ease;
}
.nav a.cta:hover { color: #000; opacity: .88; }
/* no backdrop-filter support: a plain near-solid pill */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-glass { background: rgba(14, 14, 14, 0.92); }
  .nav-glow { display: none; }
  .nav-lens .lens-fill { background: rgba(255, 255, 255, 0.12); }
}

/* ---------- Section heads ---------- */
.sec-head { text-align: center; padding: 0 20px; }
.sec-head h2 { font-size: 28px; font-weight: 500; line-height: 1.4; letter-spacing: 0.01em; }
.sec-head p { margin-top: 10px; font-size: 18px; line-height: 1.8; letter-spacing: 0.01em; color: var(--muted); }
.sec-head p + p { margin-top: 0; }

/* ---------- Featured projects: one project at a time ----------
   Row 1: project tabs on the left, prev / next on the right. Below: a large card (copy left,
   the project's screen right) and three stat cards, after Apple's product cards: a light, flat
   card with a big two-tone title, and the project's colour (--sc-accent, set from JS) in the
   title's lead and the stat cards. No autoplay: it only changes on a tab click, an arrow click
   or the arrow keys. */
#featured-projects { padding-top: var(--sec-first); }
.showcase { width: min(1080px, calc(100% - 40px)); margin: var(--head-gap) auto 0; }
/* the vivid version of the project's colour (same hue, much more saturated, never lighter than
   oklch .6 so white text still reads on it); the case-study pages use the same formula (project.css) */
.showcase { --sc-vivid: var(--sc-accent); }
@supports (color: oklch(from red l c h)) {
  .showcase { --sc-vivid: oklch(from var(--sc-accent) min(calc(l * .9), .6) calc(c * 1.9) h); }
}
.sc-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
/* plain text tabs (no pill container) so they don't read as a second nav bar */
.sc-tabs {
  position: relative; display: flex; gap: 28px; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.sc-tabs::-webkit-scrollbar { display: none; }
.sc-tab {
  position: relative; z-index: 1; flex: none;
  background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  padding: 10px 0 12px; color: rgba(255, 255, 255, 0.5);
  transition: color .25s ease;
}
.sc-tab:hover, .sc-tab[aria-selected="true"] { color: #fff; }
.sc-tab:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
/* thin underline in the active project's colour, slides between tabs */
.sc-lens {
  position: absolute; left: 0; bottom: 0; z-index: 0; height: 2px; border-radius: 2px; pointer-events: none;
  background: var(--sc-vivid, #fff);
  transition:
    transform .5s cubic-bezier(.34, 1.36, .64, 1),
    width .5s cubic-bezier(.34, 1.36, .64, 1),
    background-color .3s ease;
}
.sc-arrows { display: flex; gap: 10px; flex: none; }
.sc-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: #131315; color: #fff;
  transition: background .2s ease;
}
.sc-arrow:hover { background: #1c1c1e; }
.sc-arrow:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.sc-arrow svg { width: 18px; height: 18px; }

/* the project card: light and flat, with plenty of room. The title's lead is in the vivid project
   colour (--sc-vivid, the same as on the case-study page); the rest is grey */
.sc-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px;
  min-height: 440px; padding: 48px; border-radius: 24px; overflow: hidden; background: #f5f5f7;
}
.sc-copy { display: flex; flex-direction: column; min-width: 0; }
.sc-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #1d1d1f; }
.sc-title {
  margin-top: 12px; font-size: clamp(26px, 2.8vw, 34px); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--sc-vivid); text-wrap: balance;
}
.sc-title span { color: #86868b; }
.sc-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.sc-actions .btn-white { margin-top: 0; background: #1d1d1f; color: #fff; }
.sc-note { margin-top: auto; padding-top: 24px; font-size: 13px; line-height: 1.6; color: #6e6e73; }

/* one screen in a thin display frame, its shadow falling down and to the right; screens are cropped
   to 16:10 so every project sits at the same size. HHT: two phones in frames. Design Sprint: the photo */
.sc-visual { display: flex; align-items: center; justify-content: center; min-height: 240px; }
.sc-display {
  width: 90%; padding: 5px; border-radius: 11px; background: #1d1d1f;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 18px 30px 50px -10px rgba(0, 0, 0, 0.22);
}
.sc-display img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 0 0; border-radius: 7px; }
.sc-photo {
  display: block; width: 80%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 18px 30px 50px -10px rgba(0, 0, 0, 0.22);
}
.sc-phones { display: flex; gap: 24px; }
.sc-phone {
  padding: 5px; border-radius: 26px; background: #1d1d1f;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 14px 26px 44px -10px rgba(0, 0, 0, 0.22);
}
.sc-phone img { display: block; width: 118px; height: auto; border-radius: 21px; }

/* three results from the case study, each a white sentence on the project's colour. One gradient runs
   across the row (deepest on the left), so the three cards read as one piece. Deep enough for white
   text; a small white drawing of the number on top. No shadow, no hover (they're not links). */
.sc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.sc-stat {
  min-height: 176px; padding: 24px 28px 28px; border-radius: 24px; display: flex; flex-direction: column; color: #fff;
  background-image: linear-gradient(100deg, color-mix(in srgb, var(--sc-vivid), #000 42%), color-mix(in srgb, var(--sc-vivid), #000 20%) 50%, var(--sc-vivid));
  background-size: 300% 100%;
}
.sc-stat:nth-child(1) { background-position: 0% 50%; }
.sc-stat:nth-child(2) { background-position: 50% 50%; }
.sc-stat:nth-child(3) { background-position: 100% 50%; }
.sc-chart { width: 66px; height: 24px; overflow: visible; }
.sc-chart .sc-ink { fill: #fff; }
.sc-chart .sc-soft { fill: rgba(255, 255, 255, 0.3); }
.sc-chart .sc-ink-ln { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sc-stat p { margin-top: auto; padding-top: 20px; max-width: 24ch; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }

/* ---------- Page transition back from a case study ----------
   Case studies open with their colour rising over the home page (project.css). Coming back, the
   case study sits on top and slides away upwards: its mask (opaque at the top, clear at the bottom)
   moves up, so it clears from the bottom first and uncovers the home page. Home page only
   (html.home); the opt-in is the @view-transition rule in each page's head, off with reduced motion. */
@keyframes cs-wash-out {
  from { -webkit-mask-position: 0 0%; mask-position: 0 0%; }
  to { -webkit-mask-position: 0 100%; mask-position: 0 100%; }
}
html.home::view-transition-old(root) {
  z-index: 1; mix-blend-mode: normal;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 60%); mask-image: linear-gradient(to bottom, #000 40%, transparent 60%);
  -webkit-mask-size: 100% 250%; mask-size: 100% 250%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: cs-wash-out .7s cubic-bezier(.65, 0, .35, 1) both;
}
html.home::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Work experience timeline ---------- */
#work-experience { padding-top: var(--sec-gap); }
/* narrow 56px rail with a dot on the line; the period lives in the card header,
   so the cards get the width the date column used to take */
.timeline {
  --line-x: 20px;
  position: relative; width: min(812px, calc(100% - 40px));
  margin: var(--head-gap) auto 0;
}
/* each item carries its own dashed segment so the line reveals with the card;
   segments reach half the gap above and below, so they join into one line */
.titem::before {
  content: ""; position: absolute; left: var(--line-x); top: -8px; bottom: -8px; width: 1px;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.45) 0 6px, transparent 6px 12px);
}
.titem {
  position: relative;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center;
  opacity: 0; transition: opacity .9s ease;
}
.titem + .titem { margin-top: 16px; }
.titem.in { opacity: 1; }
/* dot on the line, ringed in the page colour so the dashes stop around it */
.tnode {
  position: relative; z-index: 1; justify-self: start;
  margin-left: var(--line-x); transform: translateX(-50%);
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px var(--bg);
}
/* compact card, two rows: company logo + "Oct 2025 – Sep 2026", then the role + duration and
   Read more; the details open below (glass treatment next to .rcard) */
.tcard {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px;
  grid-template-areas: "logo range" "role foot" "more more";
  background: #0c0c0e; border-radius: 10px; padding: 16px 20px;
  transition: background .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.tcard .thead { display: contents; }
.tcard .logo, .tcard .wordmark { grid-area: logo; justify-self: start; }
.tcard .trange {
  grid-area: range; align-self: center; justify-self: end;
  font-size: 14px; font-weight: 500; line-height: 1.5; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tcard .logo { width: 96px; height: 34px; object-fit: contain; flex: none; }
/* per-logo optical sizing inside the same 34px row: HICX reads heavy, imoba thin */
.tcard .logo-hicx  { width: 80px; }
.tcard .logo-imoba { width: 120px; }
/* roles without a company logo (freelance) get a text mark in the same 34px slot */
.tcard .wordmark {
  height: 34px; display: flex; align-items: center;
  font-size: 17px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.tcard h4 { grid-area: role; align-self: center; margin-top: 6px; font-size: 16px; font-weight: 500; line-height: 1.5; }

/* collapsible details: animates 0fr -> 1fr so the height follows the content */
.tcard .more {
  grid-area: more; display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1);
}
.tcard .more > div { overflow: hidden; }
.tcard.open .more { grid-template-rows: 1fr; }

.tcard .tfoot {
  grid-area: foot; align-self: center; justify-self: end;
  margin-top: 6px; display: flex; align-items: center; gap: 14px;
}
.tcard .rm {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; line-height: 1.5; color: #fff;
  transition: opacity .2s ease;
}
.tcard .rm:hover { opacity: .7; }
.tcard.expandable { cursor: pointer; } /* the whole card opens and closes */
.tcard.expandable:hover .rm { opacity: .7; }
.tcard .rm svg { width: 12px; height: 12px; transition: transform .3s ease; }
.tcard.open .rm svg { transform: rotate(180deg); }
.tcard ul { list-style: none; margin-top: 10px; }
/* grouped company (several roles in one card): a small heading per role inside Read more */
.tcard .role-head { margin-top: 16px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.tcard .role-head:first-child { margin-top: 12px; }
.tcard .role-head span { margin-left: 8px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.tcard .role-head + ul { margin-top: 6px; }
.tcard li {
  position: relative; padding-left: 23px;
  font-size: 14px; line-height: 1.7; color: var(--muted);
}
.tcard li::before {
  content: ""; position: absolute; left: 7px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--muted);
}
.tcard li strong { font-weight: 700; }
.tcard .dur { font-size: 13px; line-height: 1.5; color: var(--muted); white-space: nowrap; }

/* ---------- Resume CTA ---------- */
.journey { padding-top: var(--sec-gap); }
.btn-white {
  display: inline-block; margin-top: 16px; background: #fff; color: #000;
  font-size: 16px; line-height: 1.2; padding: 10px 27px; border-radius: 100px;
  transition: opacity .2s ease;
}
.btn-white:hover { opacity: .85; }

/* ---------- Recommendations ticker ---------- */
#recommendations { padding-top: var(--sec-gap); }
.ticker {
  /* 6px padding gives the hover lift room inside overflow:hidden; margin trimmed to keep the cards in place */
  width: min(980px, 100%); margin: calc(var(--head-gap) - 6px) auto 0; padding-block: 6px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
}
/* 1336px loop at ~45px/s (original Framer ticker: ~14px/s) */
.track { display: flex; gap: 20px; width: max-content; animation: tick 30s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-1336px); } }

/* glass cards (recommendations, experience, skills), same treatment as the nav:
   no outline, a faint glint on the bottom edge. Fill #0c0c0e sits between
   the #000 page and the #131315 nav, so the sticky nav stays distinct when it passes over a card */
.rcard {
  flex: none; width: 314px; height: 411px; padding: 20px;
  background: #0c0c0e; border-radius: 10px; display: block;
  transition: background .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.rcard.stroke::after, .tcard.stroke::after, .skill.stroke::after {
  border: 0; padding: 1px; opacity: .6; transition: opacity .3s ease;
  /* shallow ellipse: keep the glint on the bottom edge and the lowest part of the sides */
  background: radial-gradient(70% 30% at 50% 100%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
}
.tcard:hover, .skill:hover { background: #121214; transform: translateY(-4px); }
.tcard:hover::after, .skill:hover::after { opacity: 1; }
/* recommendations: lift + background only (no glint or quote-mark change) */
.rcard:hover { background: #121214; transform: translateY(-4px); }
.rcard .quote-ic { position: absolute; left: 244px; top: 27px; width: 50px; height: 50px; opacity: .06; fill: #e8e8e8; }
.rcard .head { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rcard .head img { width: 40px; height: 40px; border-radius: 100px; object-fit: cover; flex: none; }
.rcard .head h4 { font-size: 18px; font-weight: 500; line-height: 1.5; }
.rcard .head h5 { font-size: 13px; font-weight: 400; line-height: 2; }
.rcard p { margin-top: 20px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.rcard .review {
  position: absolute; left: 20px; top: 356px;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; line-height: 1.8; opacity: 0; transition: opacity .3s ease;
}
.rcard:hover .review { opacity: 1; }
.rcard .review svg { width: 21px; height: 21px; }

/* ---------- Skills ----------
   Each card: icon + title, a description whose lead phrase is white, and a line-art drawing
   (no grid behind it any more, to keep the cards plain). The main skill spans the full
   width. Every card draws in its own colour (--c, set on the card; from the Featured Projects
   palette), and every drawing moves a little while its card is hovered. */
#skills { padding-top: var(--sec-gap); }
.skills {
  --sk-miss: #e5484d;
  --sk-line: rgba(255, 255, 255, 0.22); --sk-line-soft: rgba(255, 255, 255, 0.09); --sk-chip: #141416;
  width: min(864px, calc(100% - 40px)); margin: var(--head-gap) auto 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
/* glass-card treatment shared with recommendations + experience (rules next to .rcard) */
.skill {
  --sk-accent: var(--c, #fff);
  --sk-accent-soft: color-mix(in srgb, var(--sk-accent) 22%, transparent);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: #0c0c0e; border-radius: 10px;
  transition: background .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.skill-copy { padding: 22px 22px 6px; }
.skill-title { display: flex; align-items: center; gap: 10px; }
.skill-title svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.skill h3 { font-size: 17px; font-weight: 500; line-height: 1.4; }
.skill p { margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.skill p em { font-style: normal; color: #fff; }
/* the main skill: copy on the left, the drawing on the right */
.skill-main { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.skill-main .skill-copy { padding: 32px; align-self: center; }
/* drawing well */
.skill-art { position: relative; margin-top: auto; height: 130px; }
.skill-main .skill-art { margin-top: 0; height: auto; min-height: 200px; } /* the main skill gets a little more room */
.skill-art svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.skill-art text { font-family: var(--pjs); font-size: 10px; fill: var(--muted); }
.skill-art text.hi { fill: #fff; }
.skill-art text.big { font-size: 18px; }
.skill-art text.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.skill-art .ln { fill: none; stroke: var(--sk-line); stroke-width: 1.3; }
.skill-art .ln-soft { fill: none; stroke: var(--sk-line-soft); stroke-width: 1.3; }
.skill-art .dash { stroke-dasharray: 3 4; }
.skill-art .box { fill: var(--sk-chip); stroke: var(--sk-line); stroke-width: 1.3; }
.skill-art .card-fill { fill: #0c0c0e; }
.skill-art .bar { fill: var(--sk-line-soft); }
.skill-art .hi-fill { fill: #fff; }
.skill-art .hi-ln { stroke: #fff; }
.skill-art .acc { fill: var(--sk-accent); }
.skill-art .acc-soft { fill: var(--sk-accent-soft); }
.skill-art .acc-bar { fill: var(--sk-accent-soft); }
.skill-art .acc-text { fill: var(--sk-accent); }
.skill-art .acc-stroke { stroke: var(--sk-accent); }
.skill-art .acc-ln { fill: none; stroke: var(--sk-accent); stroke-width: 1.5; }
.skill-art .dot-line { stroke-dasharray: 3 3; }
.skill-art .on-acc-fill { fill: #0b0b0d; }
.skill-art .miss { fill: var(--sk-miss); }
.skill-art .swatch-1 { fill: #e8e8e8; }
.skill-art .swatch-2 { fill: #7c7c80; }

/* motion on hover */
.skill-art .orbit { transform-box: view-box; transform-origin: 150px 65px; transition: transform 1.6s cubic-bezier(.2, .8, .2, 1); }
.skill:hover .orbit { transform: rotate(24deg); }
.skill-art .today { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.skill:hover .today { transform: translateX(46px); }
.skill-art .cursor { transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.skill:hover .c1 { transform: translate(18px, -10px); }
.skill:hover .c2 { transform: translate(-22px, 8px); }
.skill:hover .c3 { transform: translate(10px, 12px); }
.skill-art .heat { transform-box: fill-box; transform-origin: center; }
.skill:hover .heat { animation: skPulse 1.4s ease-in-out infinite; }
.skill:hover .heat:nth-of-type(2n) { animation-delay: .35s; }
@keyframes skPulse { 50% { transform: scale(1.6); opacity: .45; } }
.skill-art .noodle, .skill-art .pipe { stroke-dasharray: 4 5; }
.skill:hover .noodle, .skill:hover .pipe { animation: skFlow 1s linear infinite; }
@keyframes skFlow { to { stroke-dashoffset: -18; } }
.skill:hover .caret { animation: skBlink 1s steps(1) infinite; }
@keyframes skBlink { 50% { opacity: 0; } }
.skill-art .tile, .skill-art .step { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.skill:hover .tile { transform: translateY(-6px); }
.skill:hover .step { transform: translateY(-4px); }
.skill-art .tile:nth-child(2), .skill-art .step:nth-child(3) { transition-delay: .05s; }
.skill-art .tile:nth-child(3), .skill-art .step:nth-child(4) { transition-delay: .1s; }
.skill-art .tile:nth-child(4), .skill-art .step:nth-child(5) { transition-delay: .15s; }
.skill-art .tile:nth-child(5), .skill-art .step:nth-child(6) { transition-delay: .2s; }
.skill-art .tile:nth-child(6) { transition-delay: .25s; }
.skill-art .tile:nth-child(7) { transition-delay: .3s; }
.skill-art .tile:nth-child(8) { transition-delay: .35s; }

/* ---------- Final CTA ---------- */
.final { padding: calc(var(--sec-gap) - 6px) 0 135px; } /* the ticker above keeps 6px of lift room at its bottom */

/* ---------- Appear on scroll ---------- */
.appear { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.appear.in { opacity: 1; transform: none; }

/* ---------- Phone ---------- */
@media (max-width: 809px) {
  :root { --sec-gap: 104px; --sec-first: 80px; --head-gap: 28px; }
  .hero h1 { font-size: 28px; margin-top: 36px; }
  .hero p { font-size: 16px; margin-top: 24px; }
  .nav { gap: 2px; padding: 8px; }
  .nav a { font-size: 13px; padding: 7px; }
  .nav a.cta { display: none; }

  .sc-bar { gap: 10px; }
  .sc-tabs { gap: 22px; }
  .sc-arrow { width: 40px; height: 40px; }
  .sc-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; padding: 28px 24px; border-radius: 20px; }
  .sc-visual { min-height: 0; }
  .sc-phones { gap: 16px; }
  .sc-phone { border-radius: 24px; }
  .sc-phone img { width: 108px; border-radius: 19px; }
  .sc-stats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sc-stat { min-height: 150px; padding: 24px; border-radius: 20px; }

  .titem::before { display: none; }
  .titem { grid-template-columns: 1fr; }
  .titem + .titem { margin-top: 12px; }
  .tcard { grid-template-areas: "logo range" "role role" "foot foot" "more more"; }
  .tcard .tfoot { justify-self: stretch; justify-content: space-between; }
  .tnode { display: none; }

  .skills { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .skill-main { grid-template-columns: minmax(0, 1fr); }
  .skill-main .skill-art { min-height: 180px; }
  .final { padding: calc(var(--sec-gap) - 6px) 20px 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .ch { animation: none; opacity: 1; filter: none; }
  .avail .dot::after { animation: none; }
  .tcard .more { transition: none; }
  .nav-lens { transition: opacity .2s ease; }
  .nav.nav-idle { transform: none; }
  .rcard:hover, .tcard:hover, .skill:hover { transform: none; }
  .skill-art .orbit, .skill-art .today, .skill-art .cursor, .skill-art .tile, .skill-art .step { transition: none; }
  .skill:hover .orbit, .skill:hover .today, .skill:hover .cursor, .skill:hover .tile, .skill:hover .step { transform: none; }
  .skill:hover .heat, .skill:hover .noodle, .skill:hover .pipe, .skill:hover .caret { animation: none; }
  .track { animation: none; }
  .appear, .titem { opacity: 1; transform: none; transition: none; }
}
