/* Yetenek ağacı: sağdaki ağaç resmi + dal dal yol haritası paneli */

/* ---------- Sağdaki ağaç düğmesi ---------- */
.tree-fab {
  position: fixed; right: 14px; bottom: 16px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  width: 104px; padding: 6px 4px 8px; border: 0; background: none; cursor: pointer; color: var(--text);
  filter: drop-shadow(0 12px 18px rgba(120, 60, 10, .25));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.tree-fab:hover { transform: translateY(-4px) scale(1.04); }
.tree-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 18px; }
.tree-svg { width: 100%; height: auto; overflow: visible; align-self: stretch; }
.tree-svg .foliage { transform-origin: 60px 60px; animation: tsway 5s ease-in-out infinite; }
@keyframes tsway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.tree-fab:hover .foliage { animation-duration: 2.4s; }
.tree-svg .climber { transform-box: view-box; }
.tree-label {
  display: inline-flex; align-items: center; gap: 6px; margin-top: -4px; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 11.5px; line-height: 1; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.tree-label b { font-weight: 800; }
.tree-pct { color: #fff; font-weight: 800; padding: 3px 7px; border-radius: 999px; background: var(--grad); }
.tree-fab.climbing .foliage { animation-duration: .7s; }
.tree-fab.arrived .foliage { animation: none; transform: scale(1.06); transition: transform .3s; }
.sk-lock .tree-fab { opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .tree-fab { width: 70px; right: 8px; bottom: 10px; } .tree-label { font-size: 10.5px; padding: 3px 4px 3px 8px; } .tree-label b { display: none; } .tree-label { padding: 3px; } }
@media (prefers-reduced-motion: reduce) { .tree-svg .foliage { animation: none; } }

/* ---------- Panel ---------- */
html.sk-lock, html.sk-lock body { overflow: hidden; }
.skills {
  position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column; color: var(--text);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  opacity: 0; transform: scale(.97) translateY(14px); transform-origin: 90% 92%;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.skills[hidden] { display: none; }
.skills.open { opacity: 1; transform: none; }

.sk-head { display: flex; align-items: flex-start; gap: 18px 28px; padding: 18px max(18px, 3vw) 10px; flex-wrap: wrap; position: relative; }
.sk-head-main { flex: 1 1 320px; min-width: 0; }
.sk-head h2 { font-size: clamp(26px, 4vw, 40px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 900; margin-top: 4px; }
.sk-sub { margin-top: 8px; color: var(--muted); font-size: 14.5px; max-width: 620px; }
.sk-total { display: grid; gap: 6px; min-width: 210px; padding: 12px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); margin-right: 52px; }
.sk-total-num { font-size: 34px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: var(--accent-ink); }
.sk-total-bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.sk-total-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: 99px; background: var(--grad); transition: width 1s .2s cubic-bezier(.2, .8, .2, 1); }
.sk-total-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sk-close { position: absolute; top: 16px; right: max(16px, 2.4vw); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 16px; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s, background-color .2s, color .2s; }
.sk-close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }

.sk-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 6px max(18px, 3vw) 12px; }
.sk-branches { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-chip {
  --c: var(--accent); position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 9px; border-radius: 12px; overflow: hidden; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--text); background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--border));
  transition: transform .2s, box-shadow .2s;
}
.sk-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 28%, transparent); }
.sk-chip b { color: var(--c); font-weight: 900; }
.sk-chip-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: var(--c); border-radius: 0 3px 3px 0; }
.sk-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sk-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sk-legend .lg { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.lg.done { background: var(--accent); }
.lg.doing { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); border: 1.5px solid var(--accent); }
.lg.todo { border: 1.5px dashed var(--muted); }
.sk-expand { font: inherit; font-size: 13px; font-weight: 800; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--accent-ink); cursor: pointer; }
.sk-expand:hover { background: var(--accent); color: #fff; }

/* ---------- Ağaç alanı ---------- */
.sk-scroll { position: relative; flex: 1; overflow: auto; overscroll-behavior: contain; padding: 4px max(8px, 2vw) 40px; outline: none; }
.sk-canvas { position: relative; transition: width .4s, height .4s; }
.sk-links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.sk-links path { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; opacity: .85; }
.sk-links path.todo { stroke-dasharray: 5 6; opacity: .45; }
.sk-links path.doing { opacity: .7; }
.sk-links.draw path { animation: skdraw .5s .1s ease-out both; }
@keyframes skdraw { from { opacity: 0; } }

.sk-node {
  --c: var(--accent); position: absolute; left: 0; top: 0; width: var(--nw); height: var(--nh); display: flex; align-items: center; gap: 8px;
  padding: 0 10px; border-radius: 12px; text-align: left; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; overflow: hidden;
  color: var(--text); background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 6px 16px rgba(80, 40, 10, .08);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .35s, box-shadow .25s, background-color .25s, border-color .25s;
}
.sk-node:hover { box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 35%, transparent); }
.sk-node:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.sk-node.is-hidden { opacity: 0; pointer-events: none; }
.sk-ic { font-size: 16px; flex: none; }
.sk-node .sk-name:first-child { padding-left: 2px; }
.sk-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-meta { flex: none; font-size: 12px; font-weight: 900; color: var(--c); }
.sk-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: var(--c); border-radius: 0 3px 3px 0; transition: width .6s; }

/* öğrendim: dal renginde dolu */
.sk-node.done { color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000)); border-color: transparent; box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 40%, transparent); }
.sk-node.done .sk-meta { color: #fff; }
.sk-node.done .sk-bar { background: rgba(255, 255, 255, .8); }
/* öğreniyorum: soldan yüzde kadar dolu */
.sk-node.doing { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 28%, var(--surface)) var(--p), var(--surface) var(--p)); }
/* sırada: soluk, kesik çizgili */
.sk-node.todo { color: var(--muted); border-style: dashed; border-color: color-mix(in srgb, var(--muted) 50%, transparent); box-shadow: none; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.sk-node.todo .sk-meta { color: var(--muted); }
.sk-node.sel { outline: 3px solid color-mix(in srgb, var(--c) 60%, transparent); outline-offset: 2px; }
/* ana dallar ve kök biraz büyük */
.sk-node.root { font-size: 15px; font-weight: 900; }
.sk-node.has-kids::after { content: '›'; position: absolute; right: 6px; top: 50%; transform: translateY(-52%); font-size: 17px; font-weight: 900; opacity: .0; }
.sk-node.has-kids .sk-meta { margin-right: 10px; }
.sk-node.has-kids::after { opacity: .75; transition: transform .3s; }
.sk-node.has-kids.open::after { transform: translateY(-52%) rotate(90deg); }

/* ---------- Bilgi kartı ---------- */
.sk-card {
  position: fixed; z-index: 90; width: min(330px, calc(100vw - 24px)); padding: 16px 18px 18px; border-radius: 18px; --c: var(--accent);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--border)); box-shadow: 0 24px 60px rgba(60, 30, 5, .28);
  opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.sk-card.show { opacity: 1; transform: none; pointer-events: auto; }
.sk-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; border-radius: 18px 18px 0 0; background: var(--c); }
.sk-card-top { display: flex; align-items: center; gap: 12px; }
.sk-card-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 21px; background: color-mix(in srgb, var(--c) 16%, var(--surface-2)); }
.sk-card-ttl { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.sk-card h3 { font-size: 18px; font-weight: 850; letter-spacing: -0.01em; line-height: 1.15; }
.sk-pill { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.sk-pill.done { color: #fff; background: var(--c); }
.sk-pill.doing { color: var(--c); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.sk-pill.todo { color: var(--muted); border: 1px dashed var(--muted); }
.sk-x { align-self: flex-start; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 12px; }
.sk-x:hover { background: var(--accent); color: #fff; }
.sk-prog { margin-top: 12px; height: 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.sk-prog i { display: block; height: 100%; width: var(--p); background: var(--c); border-radius: 99px; }
.sk-pct { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sk-note { margin-top: 10px; font-size: 14px; line-height: 1.5; }
.sk-where { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 9%, var(--surface-2)); border-left: 4px solid var(--c); }
.sk-where b { display: block; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--c); margin-bottom: 3px; }
.sk-where p { font-size: 13.5px; line-height: 1.45; }
.sk-since { margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.sk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sk-tags li { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }

/* ---------- Telefon ---------- */
@media (max-width: 720px) {
  .sk-head { padding: 12px 64px 4px 16px; gap: 8px; flex-direction: column; }
  .sk-head-main { flex: none; }
  .sk-head .kicker, .sk-sub { display: none; }
  .sk-head h2 { font-size: 24px; margin-top: 0; }
  .sk-total { margin-right: 0; width: 100%; padding: 8px 12px; border-radius: 14px; grid-template-columns: auto 1fr; align-items: center; gap: 2px 12px; }
  .sk-total-num { font-size: 22px; grid-row: 1 / span 2; }
  .sk-total-sub { grid-column: 2; font-size: 11.5px; }
  .sk-toolbar { padding: 4px 16px 8px; gap: 8px; }
  .sk-tools { width: 100%; justify-content: flex-end; }
  .sk-expand { padding: 6px 12px; font-size: 12px; }
  .sk-close { top: 10px; right: 10px; width: 38px; height: 38px; }
  .sk-legend { display: none; }
  .sk-branches { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 4px; width: calc(100% + 36px); }
  .sk-chip { flex: none; }
  .sk-card { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 56vh; overflow: auto; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .skills, .sk-node, .sk-card, .sk-canvas { transition: none; }
  .sk-links.draw path { animation: none; }
}

/* ---------- Kodlu kart ---------- */
.sk-card.has-code { width: min(520px, calc(100vw - 24px)); }
.sk-card { max-height: calc(100vh - 100px); overflow: auto; }
.sk-code { margin-top: 12px; border-radius: 12px; overflow: hidden; background: #1e1a2e; border: 1px solid rgba(255, 255, 255, .08); }
.sk-code-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 7px 10px; background: rgba(255, 255, 255, .06); font-size: 11.5px; color: #cfc8e6; }
.sk-code-file { font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; flex: 1 0 auto; max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-code-repo { color: #ffb36b; font-weight: 700; text-decoration: none; white-space: nowrap; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.sk-code-repo:hover { text-decoration: underline; }
.sk-code-copy { font: inherit; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #fff; cursor: pointer; }
.sk-code-copy:hover { background: rgba(255, 255, 255, .14); }
.sk-code pre { margin: 0; padding: 12px 14px; max-height: 260px; overflow: auto; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #e6e1f5; tab-size: 4; outline: none; }
.sk-code pre:focus-visible { box-shadow: inset 0 0 0 2px var(--c); }
.sk-code code { white-space: pre; }
.tk-c { color: #7c8aa5; font-style: italic; }
.tk-s { color: #a5e075; }
.tk-a { color: #ffb36b; }
.tk-n { color: #ffd479; }
.tk-k { color: #c792ea; font-weight: 700; }
.tk-t { color: #82aaff; }
.tk-f { color: #7fdbca; }
.sk-code-badge { flex: none; margin-left: 4px; font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 3px 5px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.sk-node.done .sk-code-badge { background: rgba(255, 255, 255, .22); color: #fff; }
@media (max-width: 720px) { .sk-card.has-code { width: auto; } .sk-code pre { max-height: 32vh; } }
