/* ------------------------------------------------------------------
   Renkler ve temel ölçüler. Paleti değiştirmek için sadece burayı düzenle.
------------------------------------------------------------------- */
:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --turq: #19d3c5;       /* koyu zemin üstünde vurgu */
  --turq-dark: #0a8f86;  /* açık zemin üstünde vurgu */

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Sayfa, ekrandaki bölüme göre renk değiştirir (main.js body[data-theme] ayarlar) */
body[data-theme="dark"]  { background: var(--black); color: var(--white); --accent: var(--turq); }
body[data-theme="light"] { background: var(--white); color: var(--black); --accent: var(--turq-dark); }

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem);
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.7s ease, color 0.7s ease;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--turq); color: var(--black); }

.skip {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--white); color: var(--black);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------------
   Kaydırma çubuğu ve imleç halkası
------------------------------------------------------------------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
}

.cursor {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), opacity 0.3s;
}
.cursor.is-on { opacity: 0.9; }
.cursor.is-on.is-big { opacity: 0.3; }
.cursor.is-big { width: 52px; height: 52px; margin: -26px 0 0 -26px; }

/* ------------------------------------------------------------------
   Üst menü
------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.1rem var(--gutter);
  background-color: inherit; /* gövdenin rengini alır, içerik menünün altından geçmez */
  transition: transform 0.5s var(--ease);
}
.nav.is-hidden { transform: translateY(-110%); }

.nav__name { font-weight: 600; letter-spacing: -0.01em; }

.nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav__links a, .socials a, .footer a { position: relative; padding: 0.25rem 0; }
.nav__links a::after, .socials a::after, .footer a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover::after, .socials a:hover::after, .footer a:hover::after,
.nav__links a:focus-visible::after, .socials a:focus-visible::after, .footer a:focus-visible::after {
  transform: scaleX(1); transform-origin: left;
}

.nav__cta {
  display: inline-block;
  padding: 0.55rem 1.15rem; border-radius: 999px;
  border: 1.5px solid currentColor; font-weight: 500;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: var(--black); }
body[data-theme="light"] .nav__cta:hover { color: var(--white); }

@media (max-width: 700px) { .nav__links { display: none; } }

/* ------------------------------------------------------------------
   Giriş
------------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: 7rem var(--gutter) 3.5rem;
}

.hero__hello { font-size: clamp(1.1rem, 1rem + 0.8vw, 1.6rem); font-weight: 500; color: var(--accent); }

.hero__name {
  font-size: clamp(2.9rem, 7.4vw, 8rem);
  line-height: 0.92; letter-spacing: -0.03em;
  font-variation-settings: "wght" 750, "wdth" 82;
  margin: 0.12em 0 0.32em -0.03em;
}
.hero__line { display: block; overflow: hidden; padding: 0.08em 0 0.2em; margin: -0.08em 0 -0.2em; }
.hero__line > span { display: block; }

.hero__lead { max-width: 38ch; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem); line-height: 1.4; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(1.75rem, 3vw, 2.75rem); }

.btn {
  display: inline-block; padding: 0.85rem 1.6rem; border-radius: 999px;
  border: 1.5px solid currentColor; font-weight: 600;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn--fill { background: var(--turq); border-color: var(--turq); color: var(--black); }

.hero__photo { position: relative; justify-self: end; width: 100%; max-width: 27rem; will-change: transform; }
.hero__photo-frame { aspect-ratio: 4 / 5; border-radius: 1.5rem; overflow: hidden; }
.hero__photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }

.chip {
  position: absolute; padding: 0.55rem 1.05rem; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600; white-space: nowrap;
}
.chip--role  { left: -1.75rem; bottom: 12%; background: var(--turq);  color: var(--black); }
.chip--stack { right: -1rem;   top: 9%;     background: var(--white); color: var(--black); }

/* Açılış: tek seferlik sıralı giriş */
.js .hero__hello, .js .hero__lead, .js .hero__actions { opacity: 0; animation: fade-up 0.9s var(--ease) forwards; }
.js .hero__hello { animation-delay: 0.1s; }
.js .hero__lead { animation-delay: 0.55s; }
.js .hero__actions { animation-delay: 0.7s; }
.js .hero__line > span { transform: translateY(125%); animation: rise 1.1s var(--ease) 0.2s forwards; }
.js .hero__line + .hero__line > span { animation-delay: 0.32s; }
.js .hero__photo-frame { clip-path: inset(100% 0 0 0 round 1.5rem); animation: unveil 1.3s var(--ease) 0.35s forwards; }
.js .hero__photo-frame img { scale: 1.25; animation: settle 1.8s var(--ease) 0.35s forwards; }
.js .chip { opacity: 0; scale: 0.6; animation: pop 0.6s var(--ease) forwards, float 4.5s ease-in-out infinite alternate; }
.js .chip--role  { animation-delay: 1.25s, 1.9s; }
.js .chip--stack { animation-delay: 1.4s, 2.4s; }

@keyframes fade-up { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes rise { to { transform: none; } }
@keyframes unveil { to { clip-path: inset(0 round 1.5rem); } }
@keyframes settle { to { scale: 1; } }
@keyframes pop { to { opacity: 1; scale: 1; } }
@keyframes float { to { translate: 0 -0.6rem; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 6.5rem; }
  .hero__photo { justify-self: start; max-width: 100%; }
  .hero__photo-frame { aspect-ratio: 1; }
  .chip--role { left: 0.75rem; bottom: 6%; }
  .chip--stack { right: 0.75rem; top: 6%; }
}

/* ------------------------------------------------------------------
   Kayan yazı
------------------------------------------------------------------- */
.marquee { padding: clamp(3rem, 7vw, 6rem) 0; overflow: hidden; }
.marquee__row {
  display: flex; width: max-content;
  font-size: clamp(2.5rem, 7.5vw, 7rem); line-height: 1.1;
  font-weight: 700; letter-spacing: -0.03em;
  font-variation-settings: "wdth" 80;
  white-space: nowrap; will-change: transform;
}
.marquee__row span { display: inline-flex; align-items: center; }
.marquee__row span::after {
  content: "✺"; font-size: 0.45em; margin: 0 0.9em; color: var(--turq);
  -webkit-text-stroke: 0;
}
.marquee__row--outline { font-weight: 300; opacity: 0.55; }

/* ------------------------------------------------------------------
   Bölümler (ortak)
------------------------------------------------------------------- */
.section { padding: clamp(5rem, 11vw, 10rem) var(--gutter); }

.section__title {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500; letter-spacing: -0.01em;
  padding-bottom: 1rem; margin-bottom: clamp(2.5rem, 6vw, 5rem);
  border-bottom: 1.5px solid color-mix(in srgb, currentColor 30%, transparent);
}

/* Görünüme girince açılma */
.js .reveal {
  clip-path: inset(0 0 100% 0); transform: translateY(0.6em);
  transition: clip-path 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.is-in { clip-path: inset(-10% -10% -10% -10%); transform: none; }

/* ------------------------------------------------------------------
   Hakkımda
------------------------------------------------------------------- */
.about__big {
  font-size: clamp(1.6rem, 1rem + 2.9vw, 3.6rem);
  line-height: 1.14; letter-spacing: -0.025em; font-weight: 500;
  max-width: 24em;
}
.about__big .word { opacity: 0.14; transition: opacity 0.5s ease; }
.about__big .word.is-on { opacity: 1; }

.about__cols {
  display: grid; gap: clamp(2rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}
.about__rest { display: grid; gap: 1em; max-width: 62ch; align-content: start; }

.facts { display: grid; gap: 1.25rem; align-content: start; }
.facts div { padding-top: 1rem; border-top: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); }
.facts dt { opacity: 0.6; font-size: 0.9em; }
.facts dd { font-weight: 600; }

@media (max-width: 860px) { .about__cols { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------
   Projeler
------------------------------------------------------------------- */
.projects__grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(2.75rem, 5vw, 4rem) clamp(1.25rem, 2.5vw, 2.5rem);
}
@media (min-width: 700px)  { .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .projects__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; gap: 0.6rem; }

.card__media {
  position: relative; display: block; aspect-ratio: 2 / 1; margin-bottom: 0.5rem;
  border-radius: 1rem; overflow: hidden; background: #161616;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: scale 0.9s var(--ease);
}
.card__go {
  position: absolute; top: 0.75rem; right: 0.75rem;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: 50%; background: var(--turq); color: var(--black);
  scale: 0; rotate: -90deg;
  transition: scale 0.45s var(--ease), rotate 0.45s var(--ease);
}

.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.card__title {
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.3rem); line-height: 1.05; letter-spacing: -0.02em;
  font-variation-settings: "wght" 700, "wdth" 85;
  transition: color 0.3s;
}
.card__tech { opacity: 0.65; font-size: 0.9em; white-space: nowrap; }
.card__desc { opacity: 0.8; max-width: 44ch; }
.card__link { font-weight: 600; color: var(--accent); }

a.card:hover .card__media img, a.card:focus-visible .card__media img { scale: 1.07; }
a.card:hover .card__go, a.card:focus-visible .card__go { scale: 1; rotate: 0deg; }
a.card:hover .card__title, a.card:focus-visible .card__title { color: var(--accent); }

/* ------------------------------------------------------------------
   Deneyim
------------------------------------------------------------------- */
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: currentColor;
  transform: scaleY(var(--p, 1)); transform-origin: top;
}
.timeline + .section__title { margin-top: clamp(4rem, 9vw, 8rem); }
.timeline__item {
  display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
  gap: 0.5rem 2rem;
  padding: clamp(1.25rem, 2.6vw, 2.25rem) 0 clamp(1.25rem, 2.6vw, 2.25rem) clamp(1.25rem, 3vw, 2.5rem);
}
.timeline__when { font-variant-numeric: tabular-nums; font-weight: 500; padding-top: 0.5em; }
.timeline__item h3 {
  font-size: clamp(1.5rem, 1rem + 2.2vw, 3rem); line-height: 1.05;
  letter-spacing: -0.025em; font-weight: 650;
}
.timeline__item p { margin-top: 0.5rem; max-width: 52ch; }

@media (max-width: 700px) {
  .timeline + .section__title { margin-top: clamp(4rem, 9vw, 8rem); }
.timeline__item { grid-template-columns: 1fr; }
  .timeline__when { padding-top: 0; }
}

/* ------------------------------------------------------------------
   İletişim
------------------------------------------------------------------- */
.contact { min-height: 100svh; display: flex; flex-direction: column; padding-bottom: 1.5rem; }

.contact__title {
  font-size: clamp(2.75rem, 9vw, 10rem); line-height: 0.95;
  letter-spacing: -0.02em;
  font-variation-settings: "wght" 700, "wdth" 85;
  max-width: 16ch;
}

.contact__mail {
  align-self: flex-start;
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding: 1rem 1.6rem; border-radius: 999px;
  background: var(--turq); color: var(--black);
  transition: background-color 0.3s;
}
.contact__mail:hover { background: var(--white); }
.contact__mail-text { font-size: clamp(0.95rem, 4.2vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; text-align: left; }
.contact__mail-hint { font-size: 0.9rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--black); color: var(--white); }

.socials { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; margin-top: clamp(2rem, 4vw, 3.5rem); font-size: 1.15em; font-weight: 500; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  margin-top: auto; padding-top: 1.5rem;
  border-top: 1.5px solid color-mix(in srgb, currentColor 30%, transparent);
  font-size: 0.95em;
}
.contact .socials { margin-bottom: clamp(4rem, 9vw, 8rem); }

/* ------------------------------------------------------------------
   Hareketi azalt tercihi
------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .hero__hello, .js .hero__lead, .js .hero__actions, .js .chip { opacity: 1; scale: 1; }
  .js .hero__line > span { transform: none; }
  .js .hero__photo-frame { clip-path: none; }
  .js .hero__photo-frame img { scale: 1; }
  .js .reveal { clip-path: none; transform: none; }
  .about__big .word { opacity: 1; }
  .cursor { display: none; }
}
