/* =========================================================
   GELİŞMİŞ EFEKTLER
   ========================================================= */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* Kaydırma çubuğu ve ilerleme */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--mc), var(--dc)); border-radius: 10px; border: 2px solid var(--bg); }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--mc), var(--accent), var(--dc)); box-shadow: 0 0 12px var(--mc); }

/* Arka plan katmanları */
.blob-c { background: var(--accent); width: 380px; height: 380px; top: 40%; left: 45%; opacity: .15; animation: float 26s ease-in-out infinite; }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Sabit boyutlu ışık; JS sadece transform ile kaydırır (yeniden boyama yok) */
.spotlight { position: absolute; left: 0; top: 0; width: 1200px; height: 1200px; transform: translate3d(calc(50vw - 600px), calc(30vh - 600px), 0); background: radial-gradient(closest-side, rgba(124,131,255,.09), transparent 100%); will-change: transform; }
/* Gren dokusu sabit (animasyonlu tam ekran katman kaldırıldı) */
.noise { position: absolute; inset: 0; opacity: .05; background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.blob { will-change: transform; }
#particles { will-change: contents; }
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }

/* Hero iki sütun */
.hero { position: relative; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
.caret { color: var(--mc); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.grad { background-size: 200% auto; animation: shine 6s linear infinite; padding-bottom: .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@keyframes shine { to { background-position: 200% center; } }

.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn > span { position: relative; z-index: 1; }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
.btn-primary:hover::after { transform: translateX(120%); }
.magnetic { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .2s, background .2s; }

/* Kod editörü */
.hero-visual { position: relative; perspective: 1400px; }
.editor {
  position: relative; border-radius: 16px; overflow: hidden;
  background: rgba(13, 17, 26, .95);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), 0 0 80px -20px rgba(124,131,255,.35);
  transition: transform .2s ease-out;
}
.editor::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: conic-gradient(from var(--angle), transparent 0 60%, var(--mc), var(--dc), transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite;
}
@keyframes spin { to { --angle: 360deg; } }
.editor-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 7px; flex-shrink: 0; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.editor-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.editor-tabs::-webkit-scrollbar { display: none; }
.editor-tab { font: 500 .78rem var(--mono); color: var(--muted); background: none; border: 1px solid transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 7px; transition: all .2s; }
.editor-tab::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--muted)); }
.editor-tab:hover { color: var(--text); }
.editor-tab.active { color: var(--text); background: rgba(255,255,255,.06); border-color: var(--border); }
.editor-body { display: flex; height: 380px; overflow: hidden; font: 400 .8rem/1.7 var(--mono); }
.gutter { margin: 0; padding: 16px 12px 16px 16px; text-align: right; color: #3f4a5c; user-select: none; min-width: 44px; border-right: 1px solid var(--border); font: inherit; }
.code { margin: 0; padding: 16px 18px; flex: 1; min-width: 0; color: #d4dae5; white-space: pre; overflow: hidden; tab-size: 4; font: inherit; }
.code code { font: inherit; }
.cursor { display: inline-block; width: 8px; height: 1.15em; vertical-align: text-bottom; background: var(--mc); margin-left: 1px; animation: blink 1s steps(1) infinite; box-shadow: 0 0 10px var(--mc); }
.editor-status { display: flex; justify-content: space-between; gap: 12px; padding: 6px 14px; font: .72rem var(--mono); color: var(--muted); background: rgba(124,131,255,.08); border-top: 1px solid var(--border); }
.editor-status > span { display: flex; align-items: center; gap: 6px; }
.dot-ok { width: 7px; height: 7px; border-radius: 50%; background: var(--mc); box-shadow: 0 0 8px var(--mc); }

/* Sözdizimi renkleri */
.tk-kw { color: #c792ea; }
.tk-str { color: #c3e88d; }
.tk-com { color: #5c6b82; font-style: italic; }
.tk-num { color: #f78c6c; }
.tk-ann { color: #ffcb6b; }
.tk-fn { color: #82aaff; }
.tk-type { color: #4ade80; }
.tk-key { color: #89ddff; }

/* Yüzen rozetler */
.float-badge { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(13,17,26,.88); font-size: .82rem; box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); animation: bob 6s ease-in-out infinite; z-index: 4; }
.float-badge b { display: block; font-size: .8rem; letter-spacing: .02em; }
.float-badge small { color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.fb-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; }
.fb-icon.ok { background: rgba(74,222,128,.15); color: var(--mc); }
.fb-icon.dc { background: rgba(124,131,255,.18); color: var(--dc); }
.fb-1 { left: -36px; bottom: -26px; }
.fb-2 { right: -24px; top: -28px; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-12px); } }

.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--mc); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Teknoloji şeridi */
.marquee { overflow: hidden; padding: 22px 0; border-block: 1px solid var(--border); background: rgba(255,255,255,.015); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font: 600 1.05rem var(--mono); color: #5d677a; white-space: nowrap; display: flex; align-items: center; gap: 48px; padding-right: 48px; transition: color .2s; }
.marquee-track span::after { content: "◆"; font-size: .6rem; color: var(--mc); opacity: .6; }
.marquee-track span:hover { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Terminal */
.terminal { margin-top: 32px; border-radius: 16px; overflow: hidden; background: rgba(5,7,11,.85); border: 1px solid var(--border-strong); box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); }
.term-title { font: .78rem var(--mono); color: var(--muted); margin-inline: auto; padding-right: 50px; }
.term-body { margin: 0; padding: 18px 20px; height: 260px; overflow: hidden; font: .8rem/1.75 var(--mono); color: #b9c2d0; white-space: pre-wrap; word-break: break-word; display: flex; flex-direction: column; justify-content: flex-end; }
.term-line { opacity: 0; transform: translateX(-8px); animation: termIn .35s forwards; }
@keyframes termIn { to { opacity: 1; transform: none; } }
.term-time { color: #4b5568; }
.term-info { color: #7dd3fc; }
.term-ok { color: var(--mc); }
.term-warn { color: #fbbf24; }
.term-dc { color: var(--dc); }
.term-prompt { color: var(--mc); }

/* Kart efektleri: dönen kenar + 3B */
.product, .skill-card { transform-style: preserve-3d; }
.product::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: conic-gradient(from var(--angle), transparent 0 70%, var(--c), transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 3.5s linear infinite paused;
}
.product:hover::after { opacity: 1; animation-play-state: running; }
.product-icon { transition: transform .4s cubic-bezier(.2,.8,.2,1); transform: translateZ(30px); }
.product:hover .product-icon { transform: translateZ(40px) rotate(-8deg) scale(1.08); }
.product.tilting, .skill-card.tilting { transition: border-color .3s, opacity .3s; }

/* Başlık alt çizgisi */
.section-head .kicker { display: block; }
.section-head h2 { position: relative; display: inline-block; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: -10px; height: 3px; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--mc), var(--dc)); transition: width 1s .3s cubic-bezier(.2,.8,.2,1); }
.section-head.in h2::after { width: 64px; }

/* Zaman çizelgesi */
.timeline li { transition: transform .3s, border-color .3s; }
.timeline li:hover { transform: translateX(6px); border-color: rgba(74,222,128,.4); }
.timeline li:hover::before { background: var(--mc); box-shadow: 0 0 16px var(--mc); }

/* Kademeli belirme */
.reveal { transition-delay: var(--d, 0s); }

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 72px; }
  .hero-visual { max-width: 640px; width: 100%; }
  .fb-1 { left: 8px; } .fb-2 { right: 8px; }
}
@media (max-width: 720px) {
  .editor-body { height: 300px; font-size: .7rem; }
  .gutter { min-width: 34px; padding-inline: 8px; }
  .code { padding-inline: 12px; }
  .float-badge { padding: 9px 12px; font-size: .74rem; }
  .fb-1 { bottom: -34px; } .fb-2 { top: -36px; }
  .term-title { display: none; }
  .term-body { height: 230px; font-size: .72rem; padding: 14px; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .noise, #particles { display: none; }
}
