/* =====================================================
   SKILLS: rotating arc
   (stage is built by js/skills-wheel.js from the .sw-data list)
===================================================== */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #f2d98a; }

.stack { overflow-x: clip; }


.skills-wheel { --accent: #f2d98a; --R: 380px; --s: 68px; --top: 54px; position: relative; isolation: isolate; transition: --accent .9s ease; }


/* ambient glow: takes the colour of the active skill */
.sw-glow {
  position: absolute; z-index: -1; left: -8vw; right: -8vw; top: -130px; height: 640px; pointer-events: none;
  background: radial-gradient(46% 70% at 82% 0%, rgba(242,217,138,.18), transparent 72%);
  background:
    radial-gradient(46% 70% at 82% 0%, color-mix(in srgb, var(--accent) 62%, transparent), transparent 72%),
    radial-gradient(34% 50% at 6% 90%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  -webkit-mask-image: radial-gradient(closest-side, #000 50%, transparent 100%); mask-image: radial-gradient(closest-side, #000 50%, transparent 100%);
}


/* no-JS fallback: plain list */
.sw-data { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

.sw-data li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.03); line-height: 1.55; color: rgba(255,255,255,.75); }

.sw-data li b { display: block; color: var(--text); font-weight: 600; }

.sw-data[hidden] { display: none; }


/* ---------- stage ---------- */
.sw-stage { display: flow-root; position: relative; width: 100%; max-width: 1100px; margin: 0 auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; }

.sw-ring {
  --m1: 38%; --m2: 52%;
  position: absolute; left: 50%; top: var(--top); width: calc(var(--R) * 2); height: calc(var(--R) * 2); transform: translateX(-50%);
  border-radius: 50%; border: 1px solid rgba(255,255,255,.16); pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 var(--m1), transparent var(--m2)); mask-image: linear-gradient(#000 var(--m1), transparent var(--m2));
}

.sw-ring::after { content: ""; position: absolute; inset: calc(var(--s) * .62); border-radius: 50%; border: 1px dashed rgba(255,255,255,.08); }

.skills-wheel[data-mode="compact"] .sw-ring { --m1: 22%; --m2: 31%; }

.sw-orbit { position: absolute; left: 50%; top: calc(var(--top) + var(--R)); width: 0; height: 0; }


.sw-item {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 14px; opacity: 0; will-change: transform;
}

.sw-ready .sw-item { transition: transform .95s var(--ease-out), opacity .6s ease; }

.sw-item svg { display: block; width: 100%; height: 100%; transition: filter .6s ease; pointer-events: none; }

.sw-item.is-active svg { filter: drop-shadow(0 0 18px var(--c)); }

.sw-item.is-off { pointer-events: none; }

.sw-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }


/* ---------- featured skill (sits inside the arc on wide screens) ---------- */
.sw-feature {
  position: absolute; left: 50%; top: calc(var(--top) + var(--R) * .36); translate: -50% 0;
  width: min(calc(var(--R) * 1.2), 94%); display: flex; align-items: center; gap: clamp(14px, 2vw, 26px);
  transition: opacity .25s ease, transform .25s ease;
}

.sw-feature.swap { opacity: 0; transform: translateY(10px); }

.sw-big { flex: none; width: clamp(84px, calc(var(--R) * .3), 120px); aspect-ratio: 1; }

.sw-big svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 26px var(--c, var(--accent))); }

.sw-cat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }

.sw-cat .tag-soft[hidden] { display: none; }

.sw-name { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2.2rem); line-height: 1.1; letter-spacing: -.02em; margin: 8px 0 10px; }

.sw-desc { color: rgba(255,255,255,.72); line-height: 1.6; font-size: .96rem; max-width: 34ch; }


/* compact (tablet/phone): the featured skill sits under the arc, in normal flow */
.skills-wheel[data-mode="compact"] .sw-feature { position: relative; left: auto; top: auto; translate: none; width: min(560px, 100%); margin: calc(var(--top) + var(--R) * .55 + var(--s) * .55) auto 0; }


/* ---------- controls ---------- */
.sw-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 26px; }

.sw-btn {
  width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text);
  transition: border-color .3s, background .3s, transform .3s var(--ease-out);
}

.sw-btn:hover { border-color: rgba(242,217,138,.7); background: rgba(242,217,138,.08); transform: translateY(-2px); }

.sw-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.sw-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sw-count { min-width: 84px; text-align: center; font-family: var(--display); font-size: .8rem; letter-spacing: .14em; color: rgba(255,255,255,.55); }

.sw-count b { color: var(--gold); font-weight: 600; }


/* ---------- the rest of the toolkit: proper cards ---------- */
.sw-also { margin-top: clamp(60px, 10svh, 104px); }

.sw-also-head { text-align: center; margin-bottom: clamp(26px, 4svh, 44px); }

.sw-also-label { font-size: .78rem; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }

.sw-also-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -.02em; line-height: 1.15; }

.tk-card {
  --cx: 50%; --cy: 0%; position: relative; overflow: hidden; flex: 1; padding: 26px 24px 28px;
  border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(170deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  transition: border-color .35s, transform .45s var(--ease-out), background .35s;
}

.tk-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--cx) var(--cy), rgba(242,217,138,.16), transparent 60%); }

.tk-card:hover { transform: translateY(-6px); border-color: rgba(242,217,138,.5); }

.tk-card:hover::before { opacity: 1; }

.tk-num { position: absolute; top: 16px; right: 20px; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(242,217,138,.2); }

.tk-ico { position: relative; width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 15px;
  border: 1px solid rgba(242,217,138,.35); background: rgba(242,217,138,.09); transition: background .35s, transform .45s var(--ease-out); }

.tk-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s; }

.tk-card:hover .tk-ico { background: var(--gold); transform: rotate(-6deg) scale(1.06); }

.tk-card:hover .tk-ico svg { stroke: #14110a; }

.tk-cat { position: relative; font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }

.tk-card h4 { position: relative; font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; margin-bottom: 10px; }

.tk-desc { position: relative; color: rgba(255,255,255,.66); font-size: .92rem; line-height: 1.55; }


/* ---------- extras on the featured skill ---------- */
.sw-big { position: relative; }

.sw-big svg { position: relative; z-index: 1; }

.sw-big::before,.sw-big::after { content: ""; position: absolute; inset: 4%; border-radius: 50%; border: 1px solid var(--c, var(--accent)); opacity: 0; animation: swPulse 3s ease-out infinite; pointer-events: none; }

.sw-big::after { animation-delay: 1.5s; }

@keyframes swPulse { 0% { transform: scale(.85); opacity: .45; } 100% { transform: scale(1.55); opacity: 0; } }
.sw-used { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }

.sw-used[hidden] { display: none; }

.sw-used > span { font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-right: 4px; }

.sw-used ul { display: contents; list-style: none; }

.sw-used li { padding: 5px 12px; border-radius: 999px; font-size: .78rem; color: var(--text); border: 1px solid rgba(255,255,255,.2); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: rgba(255,255,255,.03); }


@media (max-width: 560px) {
  .sw-controls { gap: 14px; }

  .sw-btn { width: 46px; height: 46px; }

  .sw-desc { font-size: .92rem; }

  .sw-big { width: 76px; }

  .tk-card { padding: 22px 20px 24px; }

}


/* =====================================================
   TOOLKIT v2: coloured groups, filter, level tags, learning strip
===================================================== */
.tk-card[data-group="build"] { --g: #f2d98a; }

.tk-card[data-group="backend"] { --g: #7ed957; }

.tk-card[data-group="deploy"] { --g: #f6933a; }

@keyframes tkPop { from { opacity: 0; transform: translateY(22px) scale(.95); } to { opacity: 1; transform: none; } }

/* cards: colour from the group, accent bar, floating icon, number fills in */
.tk-card { padding: 28px 24px 24px; display: flex; flex-direction: column; background: linear-gradient(170deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); transition: border-color .35s, transform .5s var(--ease-out), box-shadow .5s, background .35s; }

.tk-card::before { background: radial-gradient(340px circle at var(--cx) var(--cy), color-mix(in srgb, var(--g, #f2d98a) 24%, transparent), transparent 62%); }

.tk-card::after { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, transparent, var(--g, #f2d98a), transparent); transform: scaleX(.25); opacity: .55; transition: transform .6s var(--ease-out), opacity .4s; }

.tk-card:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--g, #f2d98a) 60%, transparent); box-shadow: 0 26px 50px -22px color-mix(in srgb, var(--g, #f2d98a) 55%, transparent); }

.tk-card:hover::after { transform: scaleX(1); opacity: 1; }

.tk-ico { border-color: color-mix(in srgb, var(--g, #f2d98a) 45%, transparent); background: color-mix(in srgb, var(--g, #f2d98a) 12%, transparent); animation: tkFloat 5s ease-in-out infinite; }

@keyframes tkFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
.tk-ico svg { stroke: var(--g, #f2d98a); }

.tk-card:hover .tk-ico { background: var(--g, #f2d98a); }

.tk-card:hover .tk-ico svg { stroke: #14110a; }

.tk-cat { color: var(--g, #f2d98a); }

.tk-num { -webkit-text-stroke: 1px color-mix(in srgb, var(--g, #f2d98a) 28%, transparent); transition: color .45s, -webkit-text-stroke-color .45s, transform .5s var(--ease-out); }

.tk-card:hover .tk-num { color: color-mix(in srgb, var(--g, #f2d98a) 16%, transparent); -webkit-text-stroke-color: color-mix(in srgb, var(--g, #f2d98a) 60%, transparent); transform: translateY(-3px) scale(1.06); }

.tk-desc { flex: 1; margin-bottom: 18px; }

@keyframes tkPing { 0% { box-shadow: 0 0 0 0 rgba(96,165,250,.7); } 100% { box-shadow: 0 0 0 9px rgba(96,165,250,0); } }

/* skills arc: "used in" chips are links now */
.sw-used li { padding: 0; }

.sw-used li a { display: block; padding: 5px 12px; border-radius: inherit; transition: background .25s, color .25s; }

.sw-used li a:hover,.sw-used li a:focus-visible { background: var(--c); color: #0b0b0b; outline: none; }


html.rm .tk-ico { animation: none; }


/* phones: 2 compact columns instead of one very long column */
@media (max-width: 600px) {
  .tk-card { padding: 18px 14px 16px; border-radius: 18px; }

  .tk-num { display: none; }

  .tk-ico { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 14px; }

  .tk-ico svg { width: 20px; height: 20px; }

  .tk-cat { font-size: .58rem; letter-spacing: .16em; }

  .tk-card h4 { font-size: .92rem; }

  .tk-desc { font-size: .8rem; line-height: 1.45; margin-bottom: 14px; }

}

