/* ============================================================
   Anıl Köylü — portfolio
   white / gray · minimal · type-driven
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-soft: #555555;
  --ink-faint: #8a8a8a;
  --line: #e6e6e6;
  --line-strong: #d4d4d4;
  --card: #ffffff;
  --tile: #161616;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- dot field ---------- */

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

/* ---------- layout ---------- */

.page {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- entrance / scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 120ms);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero ---------- */

.hero {
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 120px 0 60px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 28px;
}

.name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 9.5vw, 118px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  cursor: default;
  user-select: none;
}

.subtitle {
  margin-top: 26px;
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 450;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.subtitle .sep {
  color: var(--line-strong);
  margin: 0 10px;
}

/* ---------- hero cta ---------- */

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 999px;
  overflow: hidden;
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    border-color 0.45s var(--ease-out),
    background-color 0.45s var(--ease-out),
    color 0.45s var(--ease-out);
}

.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.98); }

.btn-arrow {
  display: inline-block;
  font-size: 15px;
  transition: transform 0.45s var(--ease-out);
}

.btn:hover .btn-arrow { transform: translateY(3px); }

.btn-solid {
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
}

.btn-solid:hover {
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: #ffffff;
  box-shadow: 0 16px 32px -18px rgba(0, 0, 0, 0.22);
}

.scroll-hint {
  margin-top: auto;
  align-self: center;
  padding-top: 48px;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--ink);
  animation: scroll-drip 2.2s var(--ease-out) infinite;
}

@keyframes scroll-drip {
  0%   { top: -40%; }
  60%, 100% { top: 110%; }
}

/* ---------- particle name (dots scatter on hover) ---------- */

.name { position: relative; }

.name-text { transition: opacity 0.35s var(--ease-out); }

.name.particles-on .name-text { opacity: 0; }

.name-canvas {
  position: absolute;
  display: none;
  pointer-events: none;
}

.name.particles-on .name-canvas { display: block; }

/* ---------- sections ---------- */

.section { padding: 90px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 44px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.02em;
}

/* ---------- project cards ---------- */

.cards {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 22px;
  margin: -8px -4px 0;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.cards.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.cards::-webkit-scrollbar { height: 4px; }
.cards::-webkit-scrollbar-track { background: transparent; }
.cards::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}
.cards:hover::-webkit-scrollbar-thumb { background: var(--line-strong); }

.card {
  flex: 0 0 min(400px, 84vw);
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}

a.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.14);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f2f2f2;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
  transform: scale(1.015);
  transition: transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}

a.card:hover .card-media img {
  transform: scale(1.06);
  filter: saturate(1);
}

.card-arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 17px;
  opacity: 0;
  transform: translate(6px, 6px) scale(0.9);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

a.card:hover .card-arrow {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.card-body { padding: 24px 26px 28px; }

.card-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.card-body p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
}

/* ghost card */

.card-ghost {
  border-style: dashed;
  background: transparent;
  display: grid;
  place-items: center;
  min-height: 320px;
  cursor: inherit;
}

.ghost-inner {
  text-align: center;
  color: var(--ink-faint);
}

.ghost-plus {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  color: var(--line-strong);
  margin-bottom: 6px;
}

.ghost-inner p {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- stores ---------- */

.stores {
  display: grid;
  gap: 16px;
}

.store {
  display: flex;
  align-items: center;
  gap: 22px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 26px;
  background: var(--card);
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}

.store:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.16);
}

.store-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--tile);
  color: #ffffff;
  transition: transform 0.5s var(--ease-out);
}

.store:hover .store-icon { transform: scale(1.06) rotate(-3deg); }

.store-icon--fab svg { width: 34px; height: 22px; }

.store-icon--unity svg { width: 30px; height: 30px; }

.store-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.store-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.store-sub { color: var(--ink-faint); font-weight: 500; }

.store-text span:last-child {
  font-size: 14px;
  color: var(--ink-soft);
}

.store-arrow {
  margin-left: auto;
  font-size: 20px;
  color: var(--ink-faint);
  transition: transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.store:hover .store-arrow {
  transform: translateX(6px);
  color: var(--ink);
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 72px;
  align-items: start;
}

.about-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.about-main p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 56ch;
}

.about-main p + p { margin-top: 18px; }

.about-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.4s var(--ease-out);
}

.about-mail:hover { border-color: var(--ink); }

.about-mail-arrow {
  transition: transform 0.4s var(--ease-out);
}

.about-mail:hover .about-mail-arrow { transform: translateX(5px); }

.about-stats {
  display: grid;
  gap: 0;
}

.stat {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat:last-child { border-bottom: 1px solid var(--line); }

.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 14px;
  color: var(--ink-faint);
}

@media (max-width: 760px) {
  .about {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  color: var(--ink-faint);
  font-size: 13.5px;
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .page { padding: 0 22px; }
  .hero { min-height: 88svh; padding-top: 90px; }
  .section { padding: 64px 0; }
  .store { gap: 16px; padding: 18px 18px; }
  .store-icon { width: 48px; height: 48px; border-radius: 12px; }
  .store-text span:last-child { font-size: 13px; }
}
