/* ==========================================================================
   Egemen Tuncer — Portfolyo
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --fg: #efefe9;
  --muted: #8b8b85;
  --line: rgba(239, 239, 233, 0.12);
  --accent: #c6ff3d;
  --accent-dim: rgba(198, 255, 61, 0.12);
  --ink: #0a0a0a;

  --f-display: 'Syne', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --section-y: clamp(110px, 16vw, 220px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html { background: var(--bg); scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }

::selection { background: var(--accent); color: var(--ink); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
svg { display: block; }

:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }

/* Özel imleç varken sistem imlecini gizle */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ==========================================================================
   Katmanlar: WebGL, grain, imleç, ilerleme
   ========================================================================== */

.webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main, .nav, .footer { position: relative; z-index: 2; }

.grain {
  position: fixed;
  inset: -100%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-5%, 3%); }
  40%  { transform: translate(4%, -6%); }
  60%  { transform: translate(-3%, 7%); }
  80%  { transform: translate(6%, 2%); }
  100% { transform: translate(-2%, -4%); }
}

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 95;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.cursor { position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none; display: none; }
body.has-cursor .cursor { display: block; }
.cursor.is-hidden { opacity: 0; }
.cursor__dot,
.cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; }
.cursor__dot { width: 6px; height: 6px; background: var(--accent); }
.cursor__ring {
  width: 42px; height: 42px;
  border: 1px solid rgba(239, 239, 233, 0.45);
  display: grid; place-items: center;
  transition: width .4s var(--ease), height .4s var(--ease), background-color .4s, border-color .4s;
}
.cursor.is-hover .cursor__ring { width: 68px; height: 68px; background: var(--accent-dim); border-color: var(--accent); }
.cursor.has-label .cursor__ring { width: 84px; height: 84px; background: var(--accent); border-color: var(--accent); }
.cursor__label { color: var(--ink); font-family: var(--f-mono); font-size: 18px; opacity: 0; transition: opacity .3s; }
.cursor.has-label .cursor__label { opacity: 1; }
.cursor.has-label .cursor__dot { opacity: 0; }

/* ==========================================================================
   Preloader
   ========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px var(--gutter);
  clip-path: inset(0 0 0 0);
}
.preloader__top { display: flex; justify-content: space-between; color: var(--muted); }
.preloader__count {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(6rem, 24vw, 22rem);
  line-height: .8;
  letter-spacing: -0.05em;
  overflow: hidden;
}
.preloader__count span { display: inline-block; }
.preloader__bar { height: 2px; background: var(--line); }
.preloader__bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ==========================================================================
   Navigasyon
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  color: var(--fg);
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0 0 -40px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(rgba(10, 10, 10, .92), rgba(10, 10, 10, .6) 55%, transparent);
}

/* Logo: E + T monogramı ve açılan isim */
.logo { display: inline-flex; align-items: center; gap: 0; }
.logo__mark {
  width: 34px; height: 34px;
  fill: none;
  stroke: var(--fg);
  stroke-width: 3;
  stroke-linecap: square;
  overflow: visible;
}
.logo__dot { fill: var(--accent); stroke: none; }

.logo__name {
  display: inline-flex;
  gap: .32em;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  transition: max-width .7s var(--ease), margin-left .7s var(--ease);
}
.logo__name > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform .6s var(--ease);
}
.logo__name > span + span { transition-delay: .06s; }
.logo:hover .logo__name { max-width: 170px; margin-left: 12px; }
.logo:hover .logo__name > span { transform: translateY(0); }

.nav__links { display: flex; gap: clamp(18px, 3vw, 44px); }
.nav__links a {
  position: relative;
  display: flex; gap: 6px; align-items: baseline;
  font-size: 14px; font-weight: 500;
}
.nav__links .mono-num { font-family: var(--f-mono); font-size: 10px; opacity: .55; }
.nav__links 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__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.lang { display: flex; gap: 6px; align-items: center; font-family: var(--f-mono); font-size: 12px; }
.lang button { opacity: .45; transition: opacity .3s; padding: 4px 2px; position: relative; }
.lang button.is-active { opacity: 1; }
.lang button.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: -3px;
  width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateX(-50%);
}
.lang span { opacity: .35; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 104px var(--gutter) 36px;
}
.hero__meta { display: flex; justify-content: space-between; color: var(--muted); }

.status { display: inline-flex; align-items: center; gap: 10px; }
.status__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(198, 255, 61, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(198, 255, 61, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(198, 255, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 255, 61, 0); }
}

.hero__name {
  margin-top: auto;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3rem, 11.5vw, 14rem);
  line-height: .86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero__line { display: block; overflow: hidden; padding: .05em .03em .02em; }
.hero__line--indent { padding-left: 10vw; }
.hero__line--outline .char { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
.char { display: inline-block; will-change: transform; }

.hero__bottom {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 32px;
  align-items: end;
  margin-top: clamp(28px, 5vh, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero__role { display: flex; flex-direction: column; gap: 8px; }
.hero__role-text {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.1;
  color: var(--accent);
  white-space: nowrap;
  min-height: 1.1em;
}
.hero__role-text .glyph { color: var(--muted); }
.hero__intro { max-width: 36ch; font-size: clamp(15px, 1.15vw, 18px); color: rgba(239, 239, 233, .78); }

.hero__scroll { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.hero__scroll-line { position: relative; width: 1px; height: 56px; background: var(--line); overflow: hidden; }
.hero__scroll-line::after {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: var(--accent);
  animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* ==========================================================================
   Marquee
   ========================================================================== */

.marquee {
  position: relative;
  z-index: 3;
  margin: clamp(30px, 6vw, 70px) -2vw 0;
  padding: clamp(14px, 1.6vw, 22px) 0;
  background: var(--accent);
  color: var(--ink);
  transform: rotate(-2deg);
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; }
.marquee__group span {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 5.2rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1;
  padding: 0 clamp(16px, 2.2vw, 36px);
}
.marquee__group i { font-style: normal; font-size: clamp(1.2rem, 3vw, 2.6rem); }

/* ==========================================================================
   Ortak bölüm stilleri
   ========================================================================== */

.section { position: relative; padding: var(--section-y) var(--gutter); }

.section__head {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section__rule { flex: 1; height: 1px; background: var(--line); }

.title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: .95;
  letter-spacing: -0.035em;
}
.mask-line { display: block; overflow: hidden; padding-bottom: .06em; }
.mask-line > span { display: inline-block; }

/* ==========================================================================
   Hakkımda
   ========================================================================== */

.manifesto {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.4vw, 4.3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 19em;
}
.manifesto em { font-style: normal; color: var(--accent); }
.manifesto .word { display: inline-block; }

.about__sub {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(40px, 6vw, 80px);
}
.about__sub p { max-width: 42ch; font-size: clamp(16px, 1.3vw, 20px); color: rgba(239, 239, 233, .75); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(60px, 9vw, 120px);
  border-top: 1px solid var(--line);
}
.pillar {
  position: relative;
  padding: 36px 32px 40px 0;
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.pillar + .pillar { padding-left: 32px; }
.pillar:last-child { border-right: 0; }
.pillar::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--ease);
}
.pillar:hover::before { transform: scaleX(1); }
.pillar__num { color: var(--accent); }
.pillar h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -0.02em;
  margin: 18px 0 12px;
}
.pillar p { color: var(--muted); max-width: 34ch; }

/* ==========================================================================
   Yetenekler
   ========================================================================== */

.skills__intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.skills__intro p { max-width: 30ch; }

.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  perspective: 1200px;
}

.skill-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(16, 16, 16, .55);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color .5s;
}
.skill-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(198, 255, 61, .13), transparent 45%);
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.skill-card:hover { border-color: rgba(198, 255, 61, .35); }
.skill-card:hover::before { opacity: 1; }

.skill-card__head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.skill-card__head svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.skill-card h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  letter-spacing: -0.025em;
  margin: clamp(36px, 5vw, 64px) 0 20px;
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.pills li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color .3s, color .3s, border-color .3s;
}
.pills li:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.pill--learning { display: inline-flex; align-items: center; gap: 8px; border-style: dashed !important; }
.pill--learning em {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
}
.pill--learning:hover em { color: var(--ink); }

/* ==========================================================================
   Yolculuk
   ========================================================================== */

.journey__grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}
.journey__aside { position: sticky; top: 120px; }
.journey__aside p { margin-top: 24px; max-width: 30ch; }

.timeline { position: relative; padding-left: 44px; }
.timeline__line { position: absolute; left: 6px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.timeline__progress {
  position: absolute; inset: 0;
  background: linear-gradient(var(--accent), rgba(198, 255, 61, .3));
  transform: scaleY(0);
  transform-origin: top;
}

.tl-item { position: relative; padding-bottom: clamp(70px, 9vw, 120px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__dot {
  position: absolute;
  left: -44px; top: 14px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: var(--bg);
  transition: background-color .5s, border-color .5s, box-shadow .5s;
}
.tl-item.is-active .tl-item__dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(198, 255, 61, .12), 0 0 24px rgba(198, 255, 61, .5);
}
.tl-item__year {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(239, 239, 233, .35);
  transition: color .7s var(--ease), -webkit-text-stroke-color .7s;
}
.tl-item.is-active .tl-item__year { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.tl-item h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  letter-spacing: -0.02em;
  margin: 18px 0 10px;
}
.tl-item p { max-width: 46ch; }

/* ==========================================================================
   İletişim
   ========================================================================== */

.contact { padding-bottom: clamp(80px, 10vw, 140px); }

.contact__big {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 9.6vw, 11rem);
  line-height: .9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}
.contact__big .mask-line > span { transition: color .5s var(--ease), -webkit-text-stroke-color .5s; }
.contact__big--outline > span { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
.contact__big .mask-line:hover > span { color: var(--accent); -webkit-text-stroke-color: var(--accent); }

.contact__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin: clamp(40px, 6vw, 72px) 0 clamp(60px, 8vw, 100px);
}
.contact__note { max-width: 34ch; font-size: clamp(16px, 1.3vw, 19px); }

.contact__cta {
  flex: none;
  width: clamp(150px, 15vw, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 20px);
  transition: box-shadow .5s;
}
.contact__cta:hover { box-shadow: 0 0 60px rgba(198, 255, 61, .45); }
.contact__cta svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .5s var(--ease); }
.contact__cta:hover svg { transform: rotate(45deg); }

.socials { border-top: 1px solid var(--line); }
.socials li { border-bottom: 1px solid var(--line); }
.socials a {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr auto 40px;
  align-items: center;
  gap: 16px;
  padding: clamp(20px, 2.6vw, 34px) 0;
  overflow: hidden;
  isolation: isolate;
}
.socials a::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .6s var(--ease);
  z-index: -1;
}
.socials a:hover::before { transform: scaleY(1); }
.socials a:hover, .socials a:hover .muted { color: var(--ink); }
.socials a > * { transition: transform .6s var(--ease), color .3s; }
.socials a:hover > * { transform: translateX(14px); }
.socials__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.socials__handle { color: var(--muted); }
.socials svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.socials a:hover svg { transform: translateX(-14px) rotate(45deg); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer a { display: inline-block; color: var(--fg); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .nav__links { display: none; }
  .logo__name { display: none; }
  .logo__mark { width: 30px; height: 30px; }

  .hero { padding-top: 92px; }
  .hero__name { font-size: 12.6vw; margin-bottom: 0; }
  .hero__line--indent { padding-left: 4vw; }
  .hero__bottom { grid-template-columns: 1fr; gap: 22px; }
  .hero__scroll { display: none; }

  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 28px 0 32px; border-right: 0; border-bottom: 1px solid var(--line); }

  .skills__intro { flex-direction: column; align-items: flex-start; }
  .skills__grid { grid-template-columns: 1fr; }

  .journey__grid { grid-template-columns: 1fr; }
  .journey__aside { position: static; }

  .contact__row { flex-direction: column; align-items: flex-start; }
  .socials a { grid-template-columns: 34px 1fr 28px; }
  .socials__handle { display: none; }
  .socials svg { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .status__dot, .hero__scroll-line::after { animation: none; }
  html { scroll-behavior: auto; }
}
