/* ==========================================================
   Ersel Ali Güçtemur — kişisel site
   Renkler: soğuk gri zemin + petrol mavisi vurgu
   ========================================================== */

:root {
  --paper: #F2F4F6;
  --surface: #FFFFFF;
  --ink: #16212A;
  --muted: #5A6772;
  --rule: #D6DCE1;
  --accent: #0B5F68;
  --accent-ink: #FFFFFF;
  --accent-soft: #DCEBEC;
  --danger: #A3312A;
  --ok: #1D6B3C;

  --font: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --name: clamp(2.75rem, 2rem + 3.2vw, 4.75rem);

  --radius: 6px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1A21;
    --surface: #15232C;
    --ink: #E6ECEF;
    --muted: #97A5AE;
    --rule: #26363F;
    --accent: #5FB8BF;
    --accent-ink: #062226;
    --accent-soft: #173339;
    --danger: #F08A80;
    --ok: #7FCF9E;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem .9rem; border-radius: var(--radius);
  text-decoration: none; z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---------- Yerleşim ---------- */

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(3rem, 6vw, 6rem);
  }
}

/* ---------- Sol sütun ---------- */

.intro { padding: 3rem 0 2rem; }

@media (min-width: 1024px) {
  .intro {
    position: sticky; top: 0;
    height: 100vh; height: 100dvh;
    padding: 4rem 0;
    display: flex;
  }
  .intro-inner { display: flex; flex-direction: column; min-height: 100%; width: 100%; }
}

.portrait {
  display: block;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--rule);
  margin-bottom: 1.75rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }

.name {
  font-size: var(--name);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -0.035em;
}
.name span { display: block; }

.role {
  margin-top: 1.1rem;
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  margin-top: .75rem;
  max-width: 34ch;
  color: var(--muted);
}

.toc { display: none; }

@media (min-width: 1024px) {
  .toc { display: block; margin-top: 2.75rem; }
  .toc a {
    display: flex; align-items: center; gap: .9rem;
    padding: .35rem 0;
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    font-size: var(--step--1);
    transition: color .2s;
  }
  .toc a::before {
    content: "";
    width: 1.5rem; height: 1px;
    background: currentColor;
    transition: width .25s ease, background-color .2s;
  }
  .toc a:hover, .toc a.is-active { color: var(--ink); }
  .toc a.is-active::before { width: 3.5rem; background: var(--accent); height: 2px; }
}

.actions {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: .75rem;
}

@media (min-width: 1024px) {
  .actions { margin-top: auto; padding-top: 2.5rem; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.875rem;
  padding: .7rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit; font-size: var(--step--1); font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn-ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }

.social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.social a {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  color: var(--muted);
  border-radius: 50%;
  transition: color .2s, background-color .2s;
}
.social a:hover { color: var(--ink); background: var(--accent-soft); }
.social svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }

/* ---------- Sağ sütun ---------- */

.content { padding: 1rem 0 0; }
@media (min-width: 1024px) { .content { padding: 4rem 0 0; } }

.block {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1.5rem;
}
.block:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 1024px) { .block { padding: 4rem 0; } }

.block > h2 {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.prose { max-width: 62ch; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--muted); }
.prose .prose-lead {
  color: var(--ink);
  font-size: var(--step-1);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* Odak alanları */
.focus {
  margin-top: 2.75rem;
  display: grid;
  gap: 1.75rem 2.5rem;
}
@media (min-width: 640px) { .focus { grid-template-columns: 1fr 1fr; } }
.focus li { border-top: 2px solid var(--ink); padding-top: .9rem; }
.focus h3 { font-size: var(--step-0); font-weight: 700; letter-spacing: -0.01em; }
.focus p { margin-top: .35rem; color: var(--muted); font-size: var(--step--1); line-height: 1.55; }

/* Zaman çizelgesi */
.timeline > li {
  display: grid;
  gap: .35rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.timeline > li:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 640px) {
  .timeline > li { grid-template-columns: 9rem minmax(0, 1fr); }
}
.when {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: .2rem;
}
.timeline h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.where { color: var(--muted); margin-top: .1rem; }
.timeline ul { margin-top: .9rem; max-width: 60ch; }
.timeline ul li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.55;
}
.timeline ul li + li { margin-top: .4rem; }
.timeline ul li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: .4rem; height: .4rem;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-compact h3 { font-size: var(--step-0); }

/* Yetkinlikler */
.skills > div {
  display: grid;
  gap: .2rem 2rem;
  padding: .95rem 0;
  border-top: 1px solid var(--rule);
}
.skills > div:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 640px) {
  .skills > div { grid-template-columns: 9rem minmax(0, 1fr); }
}
.skills dt { font-weight: 600; font-size: var(--step--1); padding-top: .1rem; }
.skills dd { color: var(--muted); }

/* İletişim */
.contact-intro { max-width: 56ch; color: var(--muted); }

.channels {
  margin: 2rem 0 2.5rem;
  display: grid;
  gap: 1rem 2rem;
}
@media (min-width: 640px) { .channels { grid-template-columns: repeat(3, auto); justify-content: start; } }
.channels li { display: flex; flex-direction: column; }
.channel-label { font-size: var(--step--1); color: var(--muted); }
.channels a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.channels a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  gap: 1.1rem;
}
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .4rem; }
.field label { font-size: var(--step--1); font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: .7rem .85rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { font-size: var(--step--1); color: var(--danger); }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { font-size: var(--step--1); font-weight: 500; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--danger); }
.form-note { font-size: .8125rem; color: var(--muted); }

.turnstile:empty { display: none; }

/* Bot tuzağı */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.foot {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* ---------- Açılış hareketi (tek sefer) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .portrait, .js .name span, .js .role, .js .lede {
    animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
  }
  .js .name span:nth-child(1) { animation-delay: .08s; }
  .js .name span:nth-child(2) { animation-delay: .16s; }
  .js .role { animation-delay: .26s; }
  .js .lede { animation-delay: .32s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Kısa ekranlı dizüstüler: sol sütun taşmasın */
@media (min-width: 1024px) and (max-height: 820px) {
  .intro { padding: 2.5rem 0; }
  .portrait { width: 88px; height: 88px; margin-bottom: 1.25rem; }
  .toc { display: none; }
}
