/* ==========================================================================
   ahmetyigit.com — v4 (minimal)
   Dar tek kolon, solda mono bölüm etiketleri. Süs yok; hareket imleçte.
   ========================================================================== */

:root {
  --bg: #0e0e0d;
  --bg-2: #171716;
  --fg: #ededea;
  --muted: #8f8e89;
  --dim: #5c5b57;
  --line: rgba(237, 237, 234, 0.08);
  --line-2: rgba(237, 237, 234, 0.14);
  --accent: #ff5b29;

  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --page: 720px;
  --pad: 32px;
  --gutter: 92px;
  --gap: 32px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --spring: cubic-bezier(0.3, 1.5, 0.5, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafaf8;
  --bg-2: #f0efeb;
  --fg: #161615;
  --muted: #6b6a65;
  --dim: #a3a29c;
  --line: rgba(22, 22, 21, 0.08);
  --line-2: rgba(22, 22, 21, 0.15);
  --accent: #ec4a15;

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
::selection { background: var(--fg); color: var(--bg); }

:focus-visible { outline: 1.5px 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); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--fg); color: var(--bg); border-radius: 8px;
  transition: top 0.2s;
}
.skip:focus { top: 16px; }

/* --------------------------------------------------------------------------
   İskelet
   -------------------------------------------------------------------------- */
.page {
  width: min(100%, var(--page));
  margin-inline: auto;
  padding-bottom: 140px;
}

.row {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  column-gap: var(--gap);
  padding-inline: var(--pad);
}

.section { padding-block: 44px; }

.sec-label {
  position: sticky; top: 32px; align-self: start;
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  line-height: 1.5; text-align: right;
  padding-top: 3px;
  display: flex; flex-direction: column; align-items: flex-end;
}
.sec-num { color: var(--dim); }
.sec-name { color: var(--muted); }

/* --------------------------------------------------------------------------
   Üst satır
   -------------------------------------------------------------------------- */
.topline {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 32px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.status { display: inline-flex; align-items: center; gap: 9px; }
.pulse { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #3ccf7e; }
.pulse::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid #3ccf7e; opacity: 0;
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.8); opacity: 0; } }
.clock time { color: var(--fg); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding-top: 96px; padding-bottom: 44px; align-items: start; }
.gutter { display: flex; justify-content: flex-end; padding-top: 4px; }

.avatar { width: 56px; height: 56px; flex: none; }
.avatar img,
.avatar > span {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-2); font-weight: 600; font-size: 18px;
  filter: grayscale(1);
  transition: filter 0.6s var(--ease), transform 0.6s var(--spring);
}
.avatar:hover img { filter: none; transform: rotate(-6deg) scale(1.04); }

.hero-name {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  display: flex; flex-wrap: wrap; column-gap: 0.26em;
}
.hero-name .word { display: inline-flex; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero-name .ch { display: inline-block; }
.js .hero-name .ch {
  transform: translateY(105%);
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--i) * 35ms + 100ms);
}
.js.loaded .hero-name .ch { transform: none; }

.hero-role { margin-top: 2px; color: var(--muted); }
.hero-role em { font-size: 1.1em; }

.hero-intro {
  margin-top: 28px; max-width: 40ch;
  font-size: 19px; line-height: 1.5;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero-intro em { font-size: 1.12em; }

/* --------------------------------------------------------------------------
   Hakkımda
   -------------------------------------------------------------------------- */
.prose { display: grid; gap: 14px; color: var(--muted); text-wrap: pretty; }
.prose p:first-child { color: var(--fg); }
.tag { color: var(--fg); }

/* --------------------------------------------------------------------------
   Rakamlar
   -------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stat { display: grid; gap: 4px; align-content: start; }
.stat-value {
  font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 13px; line-height: 1.4; color: var(--muted); }

/* --------------------------------------------------------------------------
   Projeler — hepsi aynı boyutta tek liste
   -------------------------------------------------------------------------- */
.plist { display: grid; margin-top: -10px; }
.pitem { position: relative; }
.prow {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 16px;
  align-items: center; gap: 16px;
  padding: 12px 0;
}
.prow::before {
  content: ""; position: absolute; inset: 0 -12px; z-index: -1;
  border-radius: 12px; background: var(--bg-2);
  opacity: 0; transition: opacity 0.25s;
}
.pitem:hover .prow::before { opacity: 1; }

.pthumb { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }

.pmain { display: grid; min-width: 0; }
.pname { font-weight: 500; letter-spacing: -0.01em; }
.psum { color: var(--muted); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkind { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.parrow { color: var(--dim); transition: transform 0.4s var(--spring), color 0.25s; }
.pitem:hover .parrow { color: var(--fg); transform: translate(2px, -2px); }

.psub {
  display: inline-flex; align-items: center; gap: 3px;
  margin: -6px 0 8px 56px;
  font-family: var(--mono); font-size: 11.5px; color: var(--dim);
  transition: color 0.2s;
}
.psub:hover { color: var(--fg); }

/* İmleci takip eden önizleme */
.preview {
  position: fixed; left: 0; top: 0; z-index: 50;
  width: 280px; pointer-events: none;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.5);
  background: var(--bg-2);
  opacity: 0;
  transform-origin: 0 0;
  will-change: transform, opacity;
}
.preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.preview.is-ios { width: 160px; border-radius: 16px; }
.preview.is-ios img { aspect-ratio: 9 / 19.5; }

/* --------------------------------------------------------------------------
   Stack
   -------------------------------------------------------------------------- */
.stack { display: grid; gap: 10px; }
.stack-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; }
.stack dt { color: var(--muted); }

/* --------------------------------------------------------------------------
   İletişim
   -------------------------------------------------------------------------- */
.contact-title { font-size: 26px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.25; }
.contact-title em { font-size: 1.1em; }
.contact-text { margin-top: 10px; color: var(--muted); max-width: 46ch; }

.mailbox { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.mail {
  font-weight: 500;
  border-bottom: 1px solid var(--line-2); padding-bottom: 1px;
  transition: border-color 0.25s;
}
.mail:hover { border-color: var(--fg); }
.copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px;
  font-family: var(--mono); font-size: 11.5px; color: var(--dim);
  transition: color 0.2s;
}
.copy:hover { color: var(--fg); }
.copy .i-check { display: none; }
.copy.done { color: #3ccf7e; }
.copy.done .i-copy { display: none; }
.copy.done .i-check { display: block; }

.socials { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 20px; }
.socials a { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); transition: color 0.2s; }
.socials a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-top: 44px;
  font-family: var(--mono); font-size: 11.5px; color: var(--dim);
}

/* --------------------------------------------------------------------------
   Dock
   -------------------------------------------------------------------------- */
.dock {
  position: fixed; left: 50%; bottom: 18px; z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 2px;
  padding: 5px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.js .dock { animation: dock-in 0.9s var(--ease) 0.8s both; }
@keyframes dock-in { from { transform: translate(-50%, 140%); opacity: 0; } }

.dock-item {
  --s: 1;
  position: relative;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 11px;
  color: var(--muted);
  transform: scale(var(--s)); transform-origin: 50% 100%;
  margin-inline: calc((var(--s) - 1) * 9px);
  transition: color 0.2s, background 0.2s, transform 0.18s ease-out, margin 0.18s ease-out;
}
.dock-item:hover { color: var(--fg); background: var(--bg-2); }
.dock-item::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translate(-50%, 4px) scale(calc(1 / var(--s)));
  padding: 4px 8px; border-radius: 6px;
  background: var(--fg); color: var(--bg);
  font-family: var(--mono); font-size: 11px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.dock-item:hover::after { opacity: 1; transform: translate(-50%, 0) scale(calc(1 / var(--s))); }
.dock-sep { width: 1px; height: 20px; align-self: center; background: var(--line-2); margin-inline: 4px; }
.dock-lang { font-family: var(--mono); font-size: 11.5px; }

.theme-btn .i { position: absolute; transition: transform 0.5s var(--spring), opacity 0.3s; }
:root[data-theme="dark"] .theme-btn .i-moon,
:root[data-theme="light"] .theme-btn .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }

/* --------------------------------------------------------------------------
   Artı imleç
   -------------------------------------------------------------------------- */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9999;
  width: 0; height: 0;
  pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
  will-change: transform;
}
.cursor.is-visible { opacity: 1; }
.cursor-x {
  position: absolute; left: -12px; top: -12px; width: 24px; height: 24px;
  transition: transform 0.5s var(--spring);
}
.cursor-x::before,
.cursor-x::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: var(--fg);
  border-radius: 1px;
  transition: background 0.25s, width 0.4s var(--spring), height 0.4s var(--spring);
}
.cursor-x::before { width: 16px; height: 1.5px; transform: translate(-50%, -50%); }
.cursor-x::after { width: 1.5px; height: 16px; transform: translate(-50%, -50%); }
.cursor-ring {
  position: absolute; left: -19px; top: -19px; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--accent);
  opacity: 0; transform: scale(0.3);
  transition: opacity 0.3s, transform 0.5s var(--spring);
}
.cursor-dot {
  position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); opacity: 0; transition: opacity 0.2s;
}
.cursor.is-link .cursor-x { transform: rotate(45deg) scale(1.1); }
.cursor.is-link .cursor-x::before,
.cursor.is-link .cursor-x::after { background: var(--accent); }
.cursor.is-link .cursor-ring { opacity: 1; transform: scale(1); }
.cursor.is-text .cursor-x::before { width: 2px; }
.cursor.is-text .cursor-x::after { height: 20px; }
.cursor.is-down .cursor-x { transform: scale(0.7) rotate(90deg); }
.cursor.is-link.is-down .cursor-x { transform: rotate(135deg) scale(0.85); }
.cursor.is-preview .cursor-ring { opacity: 0; }
.cursor.is-preview .cursor-dot { opacity: 1; }

/* --------------------------------------------------------------------------
   Görünüme girerken
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 680px) {
  :root { --pad: 22px; --gap: 0px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .sec-label { position: static; flex-direction: row; gap: 8px; margin-bottom: 14px; padding-top: 0; }
  .section { padding-block: 36px; }
  .topline { padding-top: 22px; font-size: 11px; }
  .hero { padding-top: 56px; padding-bottom: 36px; }
  .gutter { justify-content: flex-start; padding-top: 0; margin-bottom: 18px; }
  .hero-intro { font-size: 18px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .stat-value { font-size: 24px; }
  .pkind { display: none; }
  .prow { grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 14px; }
  .psum { white-space: normal; line-height: 1.45; }
  .stack-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dock { bottom: 12px; }
  .dock-item::after { display: none; }
}

@media (max-width: 370px) {
  .dock-item { width: 32px; height: 32px; }
  .dock-sep { margin-inline: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .js .hero-name .ch { transform: none; }
}
