/* ============================================================
   Mert Tabak — kişisel site
   Palet: beyaz + Rolex yeşili (zengin yeşil)
   Tipografi: Fraunces (başlık) · Hanken Grotesk (metin) · IBM Plex Mono (veri)
   ============================================================ */

:root {
  /* zeminler */
  --ground: #ffffff;
  --ground-alt: #f4f7f5;        /* yeşile çalan kırık beyaz */
  --band: #063c22;             /* zengin Rolex yeşili — vitrin bölümü */

  /* mürekkep */
  --ink: #12201a;              /* yeşile çalan neredeyse siyah */
  --ink-soft: #55655c;         /* gövde metni / açıklama */
  --on-band: #eef4f0;          /* koyu yeşil üstünde metin */
  --on-band-soft: #9fc0ac;

  /* aksan */
  --rolex: #0b5d33;
  --rolex-bright: #0e7a43;
  --on-rolex: #ffffff;

  --hairline: #dce6e0;
  --hairline-band: rgba(255, 255, 255, 0.14);

  /* Meta onay rozeti */
  --meta-blue: #0866ff;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --reading: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0b120e;
    --ground-alt: #101a14;
    --band: #0c2318;
    --ink: #e9f1ec;
    --ink-soft: #9db3a8;
    --on-band: #e9f1ec;
    --on-band-soft: #8fae9d;
    --rolex: #35a266;
    --rolex-bright: #49b877;
    --on-rolex: #06140d;
    --hairline: rgba(255, 255, 255, 0.12);
    --hairline-band: rgba(255, 255, 255, 0.14);
    --meta-blue: #4d9bff;
  }
}

:root[data-theme="dark"] {
  --ground: #0b120e;
  --ground-alt: #101a14;
  --band: #0c2318;
  --ink: #e9f1ec;
  --ink-soft: #9db3a8;
  --on-band: #e9f1ec;
  --on-band-soft: #8fae9d;
  --rolex: #35a266;
  --rolex-bright: #49b877;
  --on-rolex: #06140d;
  --hairline: rgba(255, 255, 255, 0.12);
  --hairline-band: rgba(255, 255, 255, 0.14);
  --meta-blue: #4d9bff;
}

/* ---------- taban ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 120;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

::selection { background: var(--rolex); color: var(--on-rolex); }

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

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rolex);
  margin: 0 0 1.4rem;
}

.eyebrow .meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  color: var(--meta-blue);
}

.eyebrow .badge-check {
  flex-shrink: 0;
}

/* ---------- navigasyon ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--rolex);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.monogram {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--rolex);
  color: var(--on-rolex);
  border-radius: 7px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 2rem);
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding-block: 0.4rem;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--rolex);
}

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--rolex);
  color: var(--on-rolex);
}

.btn-primary:hover {
  background: var(--rolex-bright);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--hairline);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--rolex);
  color: var(--rolex);
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(3.5rem, 8vw, 6rem);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  max-width: 20ch;
}

.hero .hl {
  color: var(--rolex);
  font-style: italic;
}

.hero .lead {
  margin-top: 1.6rem;
  max-width: var(--reading);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
}

.hero .actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.rule {
  position: relative;
  height: 0;
  border-top: 1px solid var(--ink);
  opacity: 0.18;
  margin-top: clamp(3rem, 7vw, 5rem);
}

.rule::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  border-top: 1px solid var(--ink);
}

/* ---------- bölüm iskeleti ---------- */
.section {
  padding-block: clamp(4.5rem, 10vw, 8.5rem);
}

.section.alt { background: var(--ground-alt); }

#hakkimda, #referanslar, #iletisim { scroll-margin-top: 84px; }

/* aşağı inen, sağlı sollu kıvrılan kesik çizgi — "yol" */
.hero,
.section,
.band { position: relative; }

.hero > .wrap,
.section > .wrap,
.band > .band-block,
.band > .divider { position: relative; z-index: 1; }

.trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  overflow: visible;
  /* varsayılan: tümü görünür (kaydırma animasyonunu desteklemeyen tarayıcılar) */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 100% no-repeat;
          mask: linear-gradient(#000 0 0) top / 100% 100% no-repeat;
}

.trail path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 7 9;
  vector-effect: non-scaling-stroke;
}

/* kaydırdıkça yukarıdan aşağı doğru çizilsin */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .trail {
      -webkit-mask-size: 100% 0%;
              mask-size: 100% 0%;
      animation: trail-draw linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
  }
}

@keyframes trail-draw {
  to {
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
  }
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 5.5rem);
}

.aside {
  position: sticky;
  top: 6rem;
  align-self: start;
}

.aside h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.aside .note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.prose > p + p { margin-top: 1.15rem; }

.prose p {
  max-width: var(--reading);
  color: var(--ink-soft);
}

.prose p strong { color: var(--ink); font-weight: 600; }

/* ---------- metrikler ---------- */
.metrics {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px 2rem;
}

.metric {
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
  padding-bottom: 0.25rem;
}

.metric .num {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.metric .cap {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.footnote {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- yeşil vitrin bandı ---------- */
.band {
  background: var(--band);
  color: var(--on-band);
}

.band .eyebrow { color: var(--on-band-soft); }

.band :focus-visible { outline-color: var(--on-band); }

.band-block { padding-block: clamp(4.5rem, 10vw, 8rem); }

.band h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  max-width: 16ch;
}

.brand-grid {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.brand {
  border-top: 1px solid var(--hairline-band);
  padding: clamp(1.05rem, 2.6vw, 1.6rem) 0.4rem;
  text-align: center;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: 0.01em;
  color: var(--on-band);
}

.divider {
  border: 0;
  border-top: 1px solid var(--hairline-band);
  margin: 0;
}

/* iletişim */
.contact h2 { max-width: 18ch; }

.contact .lead {
  margin-top: 1.2rem;
  max-width: 52ch;
  color: var(--on-band-soft);
}

.mail {
  display: inline-block;
  margin-top: 2rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--on-band);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.mail:hover { border-color: var(--on-band); }

.meta-row {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--on-band-soft);
}

.meta-row a {
  color: var(--on-band-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.meta-row a:hover { color: var(--on-band); }

.band-note {
  margin-top: 3rem;
  text-align: center;
  background: color-mix(in srgb, var(--band) 84%, #fff 16%);
  border-top: 1px solid color-mix(in srgb, var(--on-band) 26%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--on-band) 26%, transparent);
  padding: clamp(1.6rem, 4vw, 2.5rem) clamp(1.25rem, 5vw, 3rem);
}

.band-note p {
  margin: 0 auto;
  max-width: 60ch;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--on-band-soft);
}

.band-note strong {
  color: var(--on-band);
  font-weight: 600;
}

.band-note + .legal {
  border-top: none;
}

.legal {
  border-top: 1px solid var(--hairline-band);
  padding-block: 1.6rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.78rem;
  color: var(--on-band-soft);
}

/* ---------- giriş animasyonu (dinlenme hâli görünür) ---------- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.pre {
  opacity: 0;
  transform: translateY(14px);
}

/* ============================================================
   Makale sayfası (ör. MES Dijital / Kocaeli)
   ============================================================ */

.article-header {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 5vw, 3rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 1.8rem;
  transition: color 0.15s ease;
}

.back-link:hover { color: var(--rolex); }

.article-header h1 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  max-width: 24ch;
}

.article-header .lead {
  margin-top: 1.5rem;
  max-width: var(--reading);
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.article-header .lead + .lead { margin-top: 1rem; }

/* içindekiler */
.toc {
  margin-top: 2.75rem;
  padding: 1.5rem 1.7rem;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--ground-alt);
}

.toc .toc-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rolex);
  margin: 0 0 1rem;
}

.toc ol {
  counter-reset: toc;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.55rem 1.5rem;
}

.toc li { counter-increment: toc; }

.toc a {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex-shrink: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  color: var(--rolex);
}

.toc a:hover { color: var(--ink); }

/* makale bölümleri */
.a-section {
  padding-block: clamp(2.75rem, 6vw, 4.25rem);
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 84px;
}

.a-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  max-width: 24ch;
}

.a-section .lead-note {
  margin-top: 1rem;
  max-width: var(--reading);
  color: var(--ink-soft);
}

.a-section .prose { margin-top: 1.6rem; }

/* uzmanlık listesi */
.skills {
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2.5rem;
  max-width: 56rem;
}

.skills li {
  break-inside: avoid;
  padding-block: 0.6rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* sektör çalışmaları */
.sectors {
  margin-top: 2.2rem;
  display: grid;
  gap: 2.25rem;
}

.sector {
  padding-left: 1.35rem;
  border-left: 2px solid var(--rolex);
}

.sector h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.sector .prose { margin-top: 0.7rem; }

/* yaklaşım — anlamlı sıra taşıyan 4 soru */
.approach-list {
  counter-reset: approach;
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.approach-list li {
  counter-increment: approach;
  background: var(--ground);
  padding: 1.3rem 1.4rem;
  font-size: 0.98rem;
  color: var(--ink);
}

.approach-list li::before {
  content: counter(approach, decimal-leading-zero);
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--rolex);
  margin-bottom: 0.5rem;
}

/* bağlantı / sosyal medya listesi */
.link-list {
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  border-top: 1px solid var(--hairline);
  padding-block: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.link-list li:last-child { border-bottom: 1px solid var(--hairline); }

.link-list strong {
  color: var(--ink);
  font-weight: 600;
  min-width: 6.5rem;
}

.link-list a {
  color: var(--rolex);
  text-decoration: none;
}

.link-list a:hover { text-decoration: underline; }

/* ---------- duyarlı ---------- */
@media (max-width: 800px) {
  .section-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .aside { position: static; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .skills { columns: 1; }
}

@media (max-width: 460px) {
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.8rem; }
  .brand span.full { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
