/* =========================================================
   Yiğit Ali Çiftçi: kişisel site
   ========================================================= */

:root {
  --bg: #09090b;
  --bg-2: #111216;
  --bg-3: #191b20;
  --line: #23262d;
  --text: #eeebe6;
  --muted: #8a8f98;
  --accent: #c6ff3d;
  --accent-ink: #0b0d02;
  --cyan: #6be4ff;
  --pink: #ff7aa2;
  --orange: #ffb35c;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------------- Menü ---------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(16px, 4vw, 40px);
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: rgba(9, 9, 11, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: var(--line);
}
.logo { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.logo .dot { color: var(--accent); }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 32px); }
.nav nav a { color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.nav nav a.nav-cta {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 500;
}
.nav nav a.nav-cta:hover { color: var(--accent-ink); filter: brightness(1.08); }
@media (max-width: 680px) { .nav nav a:not(.nav-cta) { display: none; } }

/* ---------------- Giriş ---------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 50% 42%, rgba(198, 255, 61, .06), transparent 70%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 70%);
  opacity: .45;
}
#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: pan-y;
}
.hero-meta {
  position: absolute;
  left: 50%;
  top: var(--below, 60%);
  transform: translateX(-50%);
  width: calc(100% - 32px);
  text-align: center;
  pointer-events: none;
}
.typer {
  font-size: clamp(17px, 2vw, 22px);
  min-height: 1.6em;
}
.caret {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -.18em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
.hint {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.scroll-cue i {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--accent), transparent);
  transform-origin: top;
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------------- Kayan bant ---------------- */
.band-wrap {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 48px 0;
  margin: -48px 0;
  pointer-events: none;
}
.band {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: 110%;
  margin-left: -5%;
  transform: rotate(-2deg);
  background: var(--accent);
  color: var(--accent-ink);
  overflow: hidden;
  padding: 14px 0;
  box-shadow: 0 20px 60px rgba(198, 255, 61, .12);
}
.band-track {
  display: flex;
  width: max-content;
  font-size: clamp(1.25rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  /* --copies: grup sayısı, --dur: süre (ikisini de script.js ayarlar) */
  animation: marquee var(--dur, 30s) linear infinite;
}
/* Her grup sonundaki boşluğu da içerir, böylece kopyalar arasında dikiş yeri olmaz */
.band-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}
.band-track b { font-weight: 400; font-size: .7em; }
.band:hover .band-track { animation-play-state: paused; }
/* Tam olarak bir grup genişliği kadar kayar (yüzde, piksel yuvarlamasından etkilenmez) */
@keyframes marquee { to { transform: translateX(calc(-100% / var(--copies, 1))); } }

/* ---------------- Bölümler ---------------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(90px, 13vw, 150px) clamp(16px, 4vw, 40px) 0;
}
.label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

h2 {
  font-size: clamp(2.1rem, 5.4vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 700;
}
h2 em {
  font-style: normal;
  color: var(--accent);
}
.lead {
  margin-top: 16px;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* hakkımda */
.about {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.about-text p {
  margin-top: 22px;
  max-width: 580px;
  color: #c9c7c2;
  font-size: 1.12rem;
}
.about-text p.aside {
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 1rem;
}
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

.info {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 26px 10px;
}
.info-title { font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; }
.info dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.info dl > div:last-child { border-bottom: 0; }
.info dt { color: var(--muted); }
.info dd { text-align: right; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(198, 255, 61, .6); }
  70% { box-shadow: 0 0 0 10px rgba(198, 255, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 255, 61, 0); }
}

/* neler yapıyorum */
.services {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.service {
  padding: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color .3s;
}
.service:hover { border-color: #3a3f47; }
.service svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(198, 255, 61, .1);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service h3 { font-size: 1.35rem; letter-spacing: -.02em; margin: 18px 0 8px; }
.service p { color: var(--muted); font-size: 16px; }
.services .reveal:nth-child(2) { transition-delay: .1s; }
.services .reveal:nth-child(3) { transition-delay: .2s; }

.tools { margin-top: 36px; }
.tools p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.tools ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tools li {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
}

/* projeler */
.projects {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 270px;
  padding: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s var(--ease), border-color .3s;
}
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(198, 255, 61, .13), transparent 45%);
  opacity: 0;
  transition: opacity .3s;
}
.project:hover { transform: translateY(-6px); border-color: #363a42; }
.project:hover::before { opacity: 1; }
.project .num {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.project .arrow { font-size: 18px; transition: transform .3s var(--ease), color .3s; }
.project:hover .arrow { transform: translate(4px, -4px); color: var(--accent); }
.project h3 { font-size: 1.65rem; line-height: 1.15; letter-spacing: -.025em; margin-top: 18px; }
.project p { color: var(--muted); font-size: 15.5px; }
.tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 13px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.project.wip { border-style: dashed; }
.project.wip .arrow { opacity: .3; }
.progress {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-3);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent));
  animation: loading 2.4s var(--ease) infinite;
}
@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}

/* iletişim */
.contact { padding-bottom: clamp(90px, 12vw, 140px); }
h2.big { font-size: clamp(2.8rem, 9.5vw, 7.4rem); line-height: .95; letter-spacing: -.045em; }
.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
}
.btn-mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .3s;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.btn-mail:hover { box-shadow: 0 10px 50px rgba(198, 255, 61, .28); }
.btn-ico { font-size: 1.2em; font-weight: 400; }
.btn-ghost {
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* alt bilgi */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px) 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.link-btn {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--mono);
  font-size: .92em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- Terminal ---------------- */
.term {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 5, 7, .62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.term.open { opacity: 1; visibility: visible; transition: opacity .25s, visibility 0s; }
.term-win {
  width: min(780px, 100%);
  height: min(500px, 80vh);
  display: flex;
  flex-direction: column;
  background: #0d0e11;
  border: 1px solid #2a2e35;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .65), 0 0 80px rgba(198, 255, 61, .05);
  font-family: var(--mono);
  font-size: 14px;
  transform: translateY(18px) scale(.98);
  transition: transform .35s var(--ease);
}
.term.open .term-win { transform: none; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: #121318;
  border-bottom: 1px solid #1f2228;
}
.term-bar p { flex: 1; text-align: center; color: var(--muted); font-size: 12.5px; }
.term-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.term-close:hover { color: var(--text); }
.term-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  line-height: 1.6;
  cursor: text;
}
.term-body { scrollbar-width: thin; scrollbar-color: #2a2e35 transparent; }
.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-thumb { background: #2a2e35; border-radius: 4px; }
.term-body .line { white-space: pre-wrap; word-break: break-word; }
.term-body .line + .line { margin-top: 1px; }
.term-body a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.term-form { display: flex; gap: 10px; }
.term-form label { color: var(--accent); white-space: nowrap; }
.term-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
  caret-color: var(--accent);
}
.t-acc { color: var(--accent); }
.t-mut { color: var(--muted); }
.t-cya { color: var(--cyan); }
.t-pnk { color: var(--pink); }
.t-org { color: var(--orange); }
.t-err { color: #ff6b6b; }
@media (max-width: 520px) {
  .term-win { font-size: 12.5px; }
  .term-form label { display: none; }
  .term-form::before { content: "$"; color: var(--accent); }
}

/* ---------------- Matrix & bildirim ---------------- */
#matrix {
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .7s;
}
#matrix.on { opacity: .92; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border: 1px solid #2a2e35;
  border-radius: 999px;
  background: #121318;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  white-space: nowrap;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Görünme animasyonu ---------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
.projects .reveal:nth-child(2) { transition-delay: .1s; }
.js .project.reveal.in { transition: opacity .9s var(--ease), transform .4s var(--ease), border-color .3s; }
.js .project.reveal.in:hover { transform: translateY(-6px); transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
