:root {
  --bg: #000;
  --bg-2: #0e0e14;
  --fg: #f2f1ec;
  --muted: #8d8c96;
  --line: rgba(242, 241, 236, 0.12);
  --acc: #c6ff3d;
  --acc-2: #7b5cff;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-width: none; } /* kaydırma çubuğu gizli, kaydırma çalışır */
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--acc); color: #000; }
em { font-style: normal; color: var(--acc); }

/* ---------- Canvas & overlays ---------- */
#webgl {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.grain {
  /* Sabit kumlanma: hareketli hali ekranın 4 katı büyüklükte bir katmanı sürekli yeniden çizdiriyordu */
  position: fixed; inset: 0;
  z-index: 50; pointer-events: none;
  opacity: 0.035;
  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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { position: relative; } /* z-index yok: başlık 3D sahneyle karışabilsin */
.footer { position: relative; z-index: 2; }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  transition: clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
#loader.done { clip-path: inset(0 0 100% 0); }
.loader-inner { display: grid; gap: 14px; justify-items: center; }
.loader-count {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(64px, 14vw, 160px); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.loader-bar { width: min(260px, 60vw); height: 2px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--acc); }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 90;
  pointer-events: none; border-radius: 50%;
  mix-blend-mode: difference;
}
.cursor {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid #fff;
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s;
}
.cursor span { font-size: 11px; font-weight: 700; color: #000; opacity: 0; letter-spacing: .08em; text-transform: uppercase; }
.cursor.is-hover { width: 74px; height: 74px; margin: -37px 0 0 -37px; background: #fff; }
.cursor.is-view { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: #fff; }
.cursor.is-view span { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }
@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  color: #fff;
}
.logo {
  font-family: var(--display); font-weight: 800; font-size: 18px;
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.6); border-radius: 50%;
}
.nav nav { display: flex; gap: 34px; font-size: 14px; font-weight: 500; }
.nav nav a { position: relative; }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  font-size: 14px; font-weight: 700;
  padding: 11px 22px; border-radius: 99px;
  background: #fff; color: #000;
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 45; }
.progress i { display: block; height: 100%; background: var(--acc); transform-origin: left; transform: scaleX(0); }

/* ---------- Sections ---------- */
section { padding: 140px var(--gutter); position: relative; }
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 32px;
}
.eyebrow span {
  font-family: var(--display); color: var(--acc);
  border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px;
}
.section-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(40px, 7vw, 104px); line-height: 1; letter-spacing: -.03em;
  margin: 0 0 48px;
}
.muted { color: var(--muted); max-width: 46ch; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 120px; padding-bottom: 40px;
}
.hero-hi {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font-size: 14px; margin: 0 0 28px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px;
  background: rgba(20,20,26,.85);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 var(--acc); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 70%, transparent); }
  70%, 100% { box-shadow: 0 0 0 12px transparent; }
}
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(48px, 11vw, 190px);
  line-height: .92; letter-spacing: -.045em;
  margin: 0; max-width: 11ch;
  position: relative; z-index: 1;
}
.hero-title .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-right: .22em; }
.hero-title .word:last-child { margin-right: 0; }
.hero-title .ch {
  display: inline-block; transform: translateY(110%) rotate(8deg);
  transition: transform 1.2s var(--ease);
}
.hero-title .ch.hl { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
body.ready .hero-title .ch { transform: none; }
.hero-role {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(18px, 2.6vw, 34px);
  margin: 26px 0 0; height: 1.3em; overflow: hidden;
}
.role-word { display: inline-block; color: var(--acc); }
.role-word.out { animation: roleOut .45s var(--ease) forwards; }
.role-word.in { animation: roleIn .6s var(--ease) forwards; }
@keyframes roleOut { to { transform: translateY(-110%); opacity: 0; } }
@keyframes roleIn { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-sub { max-width: 44ch; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); margin: 26px 0 0; }
.hero-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 60px; font-size: 13px; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
}
.scroll-hint { display: inline-flex; align-items: center; gap: 12px; }
.scroll-hint i { width: 1px; height: 46px; background: var(--line); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: var(--acc); animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

.reveal-up { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.ready .reveal-up { opacity: 1; transform: none; }
body.ready .hero-sub { transition-delay: .5s; }
body.ready .hero-meta { transition-delay: .7s; }

/* ---------- Marquee ---------- */
.marquee {
  position: relative; z-index: 2;
  transform: rotate(-3deg) scale(1.05);
  background: var(--acc); color: #000;
  padding: 18px 0; overflow: hidden; margin: 40px 0;
}
.marquee-track {
  display: flex; gap: 40px; width: max-content; align-items: center;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(28px, 5vw, 64px); line-height: 1;
  animation: marquee 22s linear infinite;
}
.marquee-track b { font-size: .6em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.about-text {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(24px, 3.6vw, 54px); line-height: 1.22; letter-spacing: -.02em;
  max-width: 22ch; margin: 0;
  max-width: 26ch;
}
.about-text .w { opacity: .14; transition: opacity .4s; }
.about-text .w.on { opacity: 1; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 90px; max-width: 900px; }
.stat { border-top: 1px solid var(--line); padding-top: 20px; }
.stat b {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(38px, 5vw, 72px); line-height: 1; color: var(--fg);
}
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Skills ---------- */
.skills {
  min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 40px;
}
.sphere { position: relative; width: 100%; aspect-ratio: 1; max-width: 620px; justify-self: center; touch-action: pan-y; }
.sphere span {
  position: absolute; left: 50%; top: 50%;
  white-space: nowrap; font-weight: 700;
  font-size: clamp(13px, 1.5vw, 19px);
  padding: 6px 14px; border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(14,14,20,.88);
  will-change: transform, opacity;
  transition: background .3s, color .3s;
}
.sphere span:hover { background: var(--acc); color: #000; }

/* ---------- Work ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; perspective: 1400px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column;
  min-height: 520px; padding: 30px; border-radius: 28px; overflow: hidden;
  background: var(--c2); border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease), border-color .4s;
  opacity: 0; translate: 0 80px;
}
.card.in { opacity: 1; translate: 0 0; transition: transform .6s var(--ease), border-color .4s, opacity 1s var(--ease), translate 1s var(--ease); }
.card:nth-child(even) { margin-top: 90px; }
.card:hover { border-color: rgba(255,255,255,.3); }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(255,255,255,.14), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.card:hover::before { opacity: 1; }
.card-art {
  position: relative; flex: 1; min-height: 240px; border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, var(--c1), transparent 55%),
    radial-gradient(circle at 75% 70%, color-mix(in srgb, var(--c1) 55%, #fff), transparent 50%),
    var(--c2);
  transform: translateZ(40px);
}
.card-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, #000, transparent 75%);
}
.card-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.card:hover .card-art img { transform: scale(1.05); }
.card-art.has-img::after { display: none; }
.card-art.has-img .card-num { -webkit-text-stroke-color: rgba(255,255,255,.85); text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.card-num {
  position: absolute; right: 18px; bottom: 6px; z-index: 1;
  font-family: var(--display); font-weight: 800; font-size: clamp(80px, 10vw, 150px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.55);
  transition: transform .8s var(--ease);
}
.card:hover .card-num { transform: translateY(-10px) scale(1.06); }
.card-orb {
  position: absolute; left: 50%; top: 45%; width: 42%; aspect-ratio: 1; border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--c1) 35%, color-mix(in srgb, var(--c1) 40%, #000) 75%);
  box-shadow: 0 30px 80px -10px var(--c1);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px) rotate(8deg); } }
.card-body { transform: translateZ(60px); padding-top: 26px; }
.card-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.card h3 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 40px); margin: 10px 0 10px; letter-spacing: -.02em; line-height: 1.1; }
.card p { margin: 0; color: #c9c8cf; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); }
.card-link { display: inline-flex; margin-top: 18px; font-weight: 700; color: var(--c1); }

/* ---------- Contact ---------- */
.contact { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.contact-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(48px, 10vw, 170px); line-height: .95; letter-spacing: -.045em; margin: 0 0 56px;
}
.mail-btn {
  position: relative; display: inline-flex; flex-direction: column; gap: 4px;
  padding: 28px 40px; border-radius: 999px;
  background: var(--acc); color: #000; overflow: hidden; max-width: 100%;
}
.mail-btn-label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.mail-btn-addr { font-family: var(--display); font-weight: 600; font-size: clamp(16px, 2.6vw, 34px); overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.socials a {
  padding: 12px 22px; border-radius: 99px; border: 1px solid var(--line); font-weight: 700; font-size: 14px;
  background: rgba(20,20,26,.85);
  transition: background .3s, color .3s;
}
.socials a:hover { background: var(--fg); color: #000; }

.footer {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 28px var(--gutter); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.to-top:hover { color: var(--fg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  section { padding: 110px var(--gutter); }
  .nav nav { display: none; }
  .skills { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .card:nth-child(even) { margin-top: 0; }
  .card { min-height: 460px; padding: 22px; }
  .stats { grid-template-columns: 1fr; gap: 18px; margin-top: 60px; }
  .hero-title { font-size: clamp(44px, 15vw, 120px); }
  .mail-btn { padding: 22px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
