/* ==========================================================================
   Alper Erdoğan — kişisel site
   Tasarım dili: teknik resim antedi + ANSYS kontur lejantı
   ========================================================================== */

:root {
  --paper: #f4f2ec;
  --paper-alt: #ebe8df;
  --card: #fbfaf6;
  --ink: #15171a;
  --ink-2: #454a52;
  --ink-3: #6c727b;
  --rule: #d5d0c4;
  --accent: #2447c7;
  --accent-dark: #1a3494;
  --viewport: #2a2d32;
  --night: #121417;
  --night-2: #1b1e22;
  --night-rule: #30343a;
  --night-ink: #eceae4;
  --night-ink-2: #a7abb2;

  /* ANSYS sonuç lejantının renk skalası — sitenin imza öğesi */
  --contour: linear-gradient(90deg, #1b2fd6 0%, #1f7bff 14%, #00c2e0 28%, #00d38a 43%, #7ddc2a 57%, #f1d01c 71%, #f7941d 86%, #e3321e 100%);

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --maxw: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

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

img, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

a { color: inherit; }

::selection { background: #c9d3f6; }

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

/* ---- İki dil: aktif olmayan dil gizlenir ---- */
html[data-lang="tr"] [lang="en"],
html[data-lang="en"] [lang="tr"] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Header
   ========================================================================== */

.contour-rule { height: 4px; background: var(--contour); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 242, 236, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: var(--contour);
}

.nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-2);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--paper-alt); }
.nav a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.header-tools { display: flex; align-items: center; gap: 0.6rem; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
}
.lang-switch button {
  font: 500 0.75rem/1 var(--f-mono);
  letter-spacing: 0.06em;
  padding: 0.45rem 0.6rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 600 0.95rem/1 var(--f-body);
  padding: 0.85rem 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 0.5rem 0.8rem; font-size: 0.85rem; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
}
/* FEA ağı (mesh) çağrışımı yapan hafif ızgara */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(21, 23, 26, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21, 23, 26, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-2);
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 3px;
  background: var(--contour);
}

.hero h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 85%;
  font-variation-settings: "wdth" 85;
  font-size: clamp(3.1rem, 8.4vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
}

.hero-lead {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36em;
  margin: 0 0 2rem;
}
.hero-lead strong { color: var(--ink); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Lejant: üç analiz alanı, kontur skalasının üstünde */
.domain-legend {
  margin-top: 2.75rem;
  max-width: 30rem;
}
.domain-legend .bar {
  height: 10px;
  background: var(--contour);
  border: 1px solid var(--ink);
}
.domain-legend .ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  color: var(--ink-3);
}
.domain-legend .ticks span { font-size: 0.7rem; }

/* Fotoğraf + teknik resim antedi */
.id-card {
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 rgba(21, 23, 26, 0.08);
}
.id-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 2px solid var(--ink);
}
.title-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}
.title-block > div {
  padding: 0.55rem 0.75rem 0.6rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  min-width: 0;
}
.title-block > div:nth-child(2n) { border-right: 0; }
.title-block > div:nth-last-child(-n+2) { border-bottom: 0; }
.title-block dt {
  font: 500 0.62rem/1.2 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.2rem;
}
.title-block dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ==========================================================================
   Stat strip
   ========================================================================== */

.stats {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--card);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 1.5rem 1.25rem 1.4rem;
  border-left: 1px solid var(--rule);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-value {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-value small { font-size: 0.45em; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.stat-label { margin-top: 0.55rem; font-size: 0.9rem; color: var(--ink-2); line-height: 1.4; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--paper-alt); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.section-head.single { grid-template-columns: 1fr; max-width: 52rem; }

.section-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-3);
  margin: 0 0 0.9rem;
}
.section-kicker b { color: var(--ink); font-weight: 500; }

h2 {
  font-family: var(--f-display);
  font-weight: 750;
  font-stretch: 88%;
  font-variation-settings: "wdth" 88;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
}
.section-intro { color: var(--ink-2); margin: 0; max-width: 36em; }

h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---- Hakkımda ---- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem 4rem;
}
.about-text p { margin: 0 0 1.1rem; color: var(--ink-2); }
.about-text p:first-child { font-size: 1.2rem; color: var(--ink); line-height: 1.5; }
.about-text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Projects
   ========================================================================== */

.project {
  border-top: 2px solid var(--ink);
  padding-top: 1.75rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}
.project:first-of-type { margin-top: 0; }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-bottom: 1.1rem;
}
.project-no {
  font: 500 0.85rem/1 var(--f-mono);
  background: var(--ink);
  color: var(--paper);
  padding: 0.35rem 0.5rem;
}
.project-kind { color: var(--ink); font-weight: 500; }
.chip {
  font: 500 0.72rem/1 var(--f-mono);
  letter-spacing: 0.04em;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink-2);
  border-radius: 3px;
  white-space: nowrap;
}

.project h3 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin: 0 0 1.75rem;
  max-width: 24em;
  text-wrap: balance;
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 2rem clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.project-summary { margin: 0 0 1.5rem; color: var(--ink-2); }

.spec {
  margin: 0;
  border-top: 1px solid var(--ink);
}
.spec > div {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.8fr) 1.2fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  font: 500 0.7rem/1.5 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.15rem;
}
.spec dd { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.spec-title {
  font: 500 0.72rem/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.75rem 0 0.6rem;
}
.spec-title:first-child { margin-top: 0; }

/* ---- Görüntüleyici (ANSYS çıktıları) ---- */
.viewer { min-width: 0; }
.viewer-frame {
  position: relative;
  background: var(--viewport);
  border: 1px solid var(--ink);
  overflow: hidden;
}
.viewer-frame img,
.viewer-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.viewer-frame.ar-radiator { aspect-ratio: 1047 / 715; background: #6d8fd6; }
.viewer-frame.ar-wide { aspect-ratio: 2.58 / 1; }

.zoom-btn {
  position: absolute;
  left: 0.6rem; bottom: 0.6rem;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(18, 20, 23, 0.72);
  color: #fff;
  border-radius: 4px;
  cursor: zoom-in;
  opacity: 0.85;
}
.zoom-btn:hover { opacity: 1; background: rgba(18, 20, 23, 0.9); }
.zoom-btn svg { width: 16px; height: 16px; }

.viewer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
  align-items: center;
}
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
}
.seg button {
  font: 500 0.82rem/1 var(--f-body);
  padding: 0.6rem 0.8rem;
  border: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--ink); background: var(--paper-alt); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg-label { color: var(--ink-3); }

.viewer-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.viewer-caption .mono { font-size: 0.68rem; white-space: nowrap; padding-top: 0.15rem; }

/* ---- Sonuç kutucukları ---- */
.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ink);
  background: var(--card);
  margin-top: 2rem;
}
.result {
  padding: 1.1rem 1.2rem 1.2rem;
  border-left: 1px solid var(--rule);
}
.result:first-child { border-left: 0; }
.result-value {
  font-weight: 600;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.result-value small { font-size: 0.5em; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.result-label { margin-top: 0.4rem; font-size: 0.88rem; color: var(--ink-2); line-height: 1.4; }

/* ---- Tablolar ---- */
.table-wrap { overflow-x: auto; margin-top: 2rem; border: 1px solid var(--ink); background: var(--card); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}
table.data caption {
  text-align: left;
  padding: 0.8rem 1rem;
  font: 500 0.72rem/1.3 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
table.data th, table.data td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data thead th {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--ink-3);
  background: var(--paper);
}
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody th { font-weight: 600; white-space: nowrap; }
table.data td:not(.num) { min-width: 15rem; }
table.data tr.is-active { background: #e6ebfb; }
table.data tr.is-active th { box-shadow: inset 3px 0 0 var(--accent); }

.takeaway {
  margin: 1.75rem 0 0;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--card);
  color: var(--ink-2);
  font-size: 0.98rem;
}
.takeaway strong { color: var(--ink); }

/* ---- Çubuk grafik (küçük çoklu) ---- */
.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.chart {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--ink);
  padding: 1.1rem 1.25rem 1rem;
}
.chart figcaption { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2rem; }
.chart .chart-sub { font-size: 0.8rem; color: var(--ink-3); margin: 0 0 1rem; }
.chart-plot {
  position: relative;
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  row-gap: 14px;
  padding-top: 22px;
}
.chart-cat { font-size: 0.82rem; color: var(--ink-2); align-self: center; white-space: nowrap; }
.chart-track { position: relative; height: 22px; }
.chart-grid { position: absolute; inset: 0 0 0 5.2rem; pointer-events: none; }
.chart-grid .g {
  position: absolute; top: 0; bottom: -4px;
  width: 1px; background: #e4e0d6;
}
.chart-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  cursor: default;
}
.chart-bar:hover, .chart-bar:focus-visible { background: var(--accent-dark); }
.chart-val {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 0.8rem; font-weight: 600; color: var(--ink);
  padding-left: 6px; white-space: nowrap;
  pointer-events: none;
}
.chart-ref {
  position: absolute; top: 0; bottom: -4px; width: 0;
  border-left: 1.5px solid var(--ink);
  pointer-events: none;
}
.chart-ref span {
  position: absolute; top: -2px; left: 6px;
  font: 500 0.66rem/1 var(--f-mono); letter-spacing: 0.04em;
  color: var(--ink); white-space: nowrap;
}
.chart-axis {
  position: relative;
  margin: 0.45rem 0 0 5.2rem;
  height: 1rem;
  font-size: 0.7rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.chart-axis span { position: absolute; transform: translateX(-50%); }
.chart-axis span:first-child { transform: none; }
.chart-axis span:last-child { transform: translateX(-100%); }

.tooltip {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 0.55rem 0.7rem;
  border-radius: 4px;
  max-width: 240px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.tooltip b { font-weight: 600; }

/* ==========================================================================
   Enerji
   ========================================================================== */

.energy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
  background: var(--card);
}
.energy-card {
  padding: 1.5rem 1.35rem 1.6rem;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}
.energy-card:first-child { border-left: 0; }
.energy-card .icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.energy-card .icon svg { width: 22px; height: 22px; }
.energy-card .when { color: var(--ink-3); margin-bottom: 0.4rem; font-size: 0.68rem; }
.energy-card h3 { font-size: 1.3rem; margin: 0 0 0.6rem; }
.energy-card p { margin: 0; font-size: 0.93rem; color: var(--ink-2); line-height: 1.55; }

/* ==========================================================================
   Yapay zekâ (koyu bant)
   ========================================================================== */

.section-dark {
  background: var(--night);
  color: var(--night-ink);
  position: relative;
}
.section-dark::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--contour);
}
.section-dark .section-kicker { color: var(--night-ink-2); }
.section-dark .section-kicker b { color: var(--night-ink); }
.section-dark .section-intro { color: var(--night-ink-2); }

.ai-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--night-rule);
  border: 1px solid var(--night-rule);
}
.ai-card {
  background: var(--night-2);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.ai-card .tag { color: #8ea6ff; margin-bottom: 0.9rem; font-size: 0.7rem; }
.ai-card h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin: 0 0 0.7rem; color: #fff; }
.ai-card p { margin: 0; color: var(--night-ink-2); font-size: 0.97rem; }
.ai-card.is-lead { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  counter-reset: step;
}
.flow li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--night-rule);
  background: var(--night);
  font-size: 0.92rem;
  color: var(--night-ink);
}
.flow li::before {
  content: counter(step, decimal-leading-zero);
  font: 500 0.72rem/1 var(--f-mono);
  color: var(--night-ink-2);
}
.flow li.hot { border-color: #3b56d9; box-shadow: inset 3px 0 0 #6f8cff; }

/* ==========================================================================
   Deneyim
   ========================================================================== */

.timeline { border-top: 2px solid var(--ink); }
.job {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 1rem 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}
.job:last-child { border-bottom: 0; }
.job-when { color: var(--ink-3); margin-bottom: 0.5rem; }
.job h3 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); margin: 0 0 0.35rem; }
.job-role { font-weight: 600; margin: 0 0 0.2rem; }
.job-where { color: var(--ink-3); font-size: 0.92rem; margin: 0; }
.job ul { margin: 0; padding: 0; list-style: none; }
.job li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
  color: var(--ink-2);
}
.job li:last-child { margin-bottom: 0; }
.job li::before {
  content: "";
  position: absolute; left: 0; top: 0.72em;
  width: 8px; height: 1.5px; background: var(--ink);
}

/* ==========================================================================
   Eğitim & yetkinlikler
   ========================================================================== */

.edu-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.edu-card {
  background: var(--card);
  border: 1px solid var(--ink);
  padding: 1.6rem 1.6rem 1.5rem;
}
.edu-card .mono { color: var(--ink-3); margin-bottom: 0.5rem; }
.edu-card h3 { font-size: 1.6rem; margin: 0 0 0.3rem; }
.edu-card .sub { margin: 0 0 1.1rem; color: var(--ink-2); }
.edu-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ink);
  background: var(--card);
}
.skill-group {
  padding: 1.35rem 1.4rem 1.5rem;
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.skill-group:nth-child(3n+1) { border-left: 0; }
.skill-group:nth-child(-n+3) { border-top: 0; }
.skill-group h3 {
  font: 500 0.72rem/1.3 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
  color: var(--ink);
}
.skill-group ul { list-style: none; margin: 0; padding: 0; }
.skill-group li {
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 0.95rem;
  display: flex; justify-content: space-between; gap: 0.75rem;
}
.skill-group li:last-child { border-bottom: 0; }
.skill-group li span.lvl { color: var(--ink-3); font-size: 0.85rem; text-align: right; }

/* ==========================================================================
   İletişim
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem 4rem;
  align-items: start;
}
.contact-mail {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 90%;
  font-variation-settings: "wdth" 90;
  font-size: clamp(1.4rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
  margin: 1.5rem 0 2rem;
  word-break: break-all;
}
.contact-mail:hover { color: var(--accent); }
.contact-list { margin: 0; border-top: 1px solid var(--ink); }
.contact-list > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact-list dt { font: 500 0.7rem/1.6 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.contact-list dd { margin: 0; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.contact-list a:hover { border-color: var(--ink); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--ink);
  padding: 1.5rem 0 2rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1600px);
  max-height: 94vh;
}
.lightbox::backdrop { background: rgba(10, 11, 13, 0.88); }
.lightbox img { max-width: 100%; max-height: 86vh; margin: 0 auto; border: 1px solid #444; }
.lightbox p { color: #d9d7d0; font-size: 0.85rem; margin: 0.6rem 0 0; text-align: center; }
.lightbox-close {
  position: fixed; right: 1rem; top: 1rem;
  width: 42px; height: 42px;
  border: 1px solid #555; border-radius: 4px;
  background: #1b1e22; color: #fff; cursor: pointer;
  font-size: 1.3rem; line-height: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .nav a { padding: 0.35rem 0.45rem; font-size: 0.85rem; }
  .energy-grid { grid-template-columns: repeat(2, 1fr); }
  .energy-card:nth-child(3) { border-left: 0; }
  .energy-card:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

@media (max-width: 920px) {
  :root { --header-h: 104px; }
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 0.7rem; gap: 0.5rem 1rem; }
  .header-tools { margin-left: auto; }
  .nav {
    order: 3;
    width: 100%;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0.25rem var(--gutter) 0.55rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .id-card { max-width: 420px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .section-head, .about-grid, .project-body, .job, .contact-grid, .edu-grid { grid-template-columns: 1fr; }
  .project-body .viewer { order: -1; }
  .ai-card.is-lead { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr 1fr; }
  .skill-group:nth-child(n) { border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); }
  .skill-group:nth-child(2n+1) { border-left: 0; }
  .skill-group:nth-child(-n+2) { border-top: 0; }
  .charts { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .header-tools .btn-cv span { display: none; }
  .results { grid-template-columns: 1fr; }
  .result { border-left: 0; border-top: 1px solid var(--rule); }
  .result:first-child { border-top: 0; }
  .energy-grid, .ai-grid, .skills { grid-template-columns: 1fr; }
  .energy-card { border-left: 0 !important; border-top: 1px solid var(--rule); }
  .energy-card:first-child { border-top: 0; }
  .ai-card.is-lead { grid-column: auto; }
  .skill-group:nth-child(n) { border-left: 0; border-top: 1px solid var(--rule); }
  .skill-group:first-child { border-top: 0; }
  .spec > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .contact-list > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .viewer-caption { flex-direction: column; gap: 0.2rem; }
}

/* Dar ekranda seçiciler tam genişlik, eşit sütun; uzun etiket kendi hücresinde kırılır */
@media (max-width: 600px) {
  .viewer-controls { flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .seg button { white-space: normal; line-height: 1.25; padding: 0.6rem 0.35rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .contour-rule, .hero::before, .viewer-controls, .zoom-btn, .lang-switch { display: none !important; }
  body { background: #fff; }
  .section { padding: 2rem 0; }
  .section-dark { background: #fff; color: #000; }
  .ai-card { background: #fff; }
  .ai-card h3, .ai-card p { color: #000; }
}
