/* ==========================================================================
   Eren Kadiroğlu — Rota
   Site bir yolculuk haritasıdır: Eskişehir'den Belgrad'a kırmızı bir rota çizgisi
   kaydırdıkça çizilir, her durakta bir dönem (okul, staj) açılır. Kâğıt beyazı zemin,
   lacivert mürekkep, tek vurgu: rota kırmızısı. Koordinatlar ve tarihler gerçek veridir.
   ========================================================================== */

/* ---------- 1. Tokenlar ---------- */
:root {
  /* Kâğıt ve yüzeyler */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --line: #DDE2EA;
  --line-strong: #C3CAD5;

  /* Lacivert mürekkep */
  --ink: #0D1B2E;
  --ink-2: #4D5A70;
  --ink-3: #5F6C83;

  /* Rota kırmızısı: çizgi, duraklar, vurgu */
  --accent: #E30A17;
  --accent-hover: #C10813;
  --accent-soft: #FDE8E9;
  --accent-ink: #BF0816;
  --on-accent: #FFFFFF;

  /* Eylem düğmeleri lacivert mürekkeptir; kırmızı rotaya ayrılır */
  --action: #0D1B2E;
  --action-hover: #1E3150;
  --on-action: #FFFFFF;

  --danger: #B42318;
  --danger-soft: #FCE8E6;
  --input-bg: #FFFFFF;
  --shadow-card: 0 1px 0 rgba(13, 27, 46, 0.04), 0 22px 44px -30px rgba(13, 27, 46, 0.28);
  --shadow-lift: 0 1px 0 rgba(13, 27, 46, 0.05), 0 30px 56px -30px rgba(13, 27, 46, 0.38);

  /* Ölçüler */
  --gutter: clamp(20px, 4.4vw, 64px);
  --content-w: 1180px;
  --section-pad: clamp(72px, 9vw, 128px);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --pill: 999px;
  --topbar-h: 64px;

  /* Yazı */
  --font: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(2.75rem, 1.6rem + 4.2vw, 5.5rem);
  --fs-hero: clamp(3.25rem, 1.4rem + 7vw, 8rem);

  /* Hareket */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 180ms;
  --t-med: 320ms;
  --t-reveal: 900ms;

  /* Eski adlar: yönetim paneli, terminal, oyun ve alt sayfalar bunları kullanır */
  --bar: var(--line-strong);
  --bar-2: var(--line);
  --clear: var(--surface);
  --clear-lit: var(--surface-2);
  --seeded: var(--surface-2);
  --seeded-lit: var(--bg);
  --smoke: #0F1A2A;
  --smoke-lit: #16233A;
  --cobalt: var(--accent);
  --cobalt-lit: var(--accent-hover);
  --amber: var(--accent);
  --amber-lit: var(--accent-hover);
  --oxblood: var(--danger);
  --oxblood-lit: var(--danger);
  --line-c: var(--line-strong);
  --hairline: var(--line);
  --mullion: 12px;
  --transom: 20px;
  --pane-pad: clamp(20px, 2.2vw, 30px);
  --rail-h: var(--topbar-h);
  --accent-cyan: var(--accent);
  --accent-blue: var(--accent);
  --accent-blue-hover: var(--accent-hover);
  --accent-strong: var(--accent);
  --accent-rose: var(--danger);
  --accent-amber: #B7791F;
  --accent-emerald: #1F7A4D;
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --bg-main: var(--bg);
  --bg-deep: var(--ink);
  --bg-card: var(--surface);
  --bg-card-subtle: var(--surface-2);
  --border-card: var(--line);
  --radius-md: var(--radius-sm);
  --radius-full: var(--pill);
  --ease-spring: var(--ease-out);
  --t-lit: var(--t-med);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --rule: var(--line);
  --lit: var(--surface-2);

  color-scheme: light;
}

/* Gece rotası: lacivert gece, kırmızı daha parlak */
:root[data-theme="dark"] {
  --bg: #0A1220;
  --surface: #111C2D;
  --surface-2: #16233A;
  --line: #22314A;
  --line-strong: #35486A;

  --ink: #E8EDF5;
  --ink-2: #AAB6CA;
  --ink-3: #8D9AB1;

  --accent: #FF4D55;
  --accent-hover: #FF6B72;
  --accent-soft: #3A1620;
  --accent-ink: #FF8A90;
  --on-accent: #1A0306;

  --action: #E8EDF5;
  --action-hover: #FFFFFF;
  --on-action: #0A1220;

  --danger: #F08C84;
  --danger-soft: #3A1D1B;
  --input-bg: #0C1626;
  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.3), 0 22px 44px -26px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 1px 0 rgba(0, 0, 0, 0.3), 0 30px 56px -26px rgba(0, 0, 0, 0.8);

  color-scheme: dark;
}

/* ---------- 2. Taban ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
  transition: background-color var(--t-med) ease, color var(--t-med) ease;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

kbd {
  font-family: var(--font-mono);
  font-size: max(0.75em, 11px);
  font-weight: 500;
  padding: 0.1em 0.42em;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  line-height: 1.3;
  color: var(--ink-2);
}

[hidden] {
  display: none !important;
}

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

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

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--pill);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 3. Yüzeyler ---------- */
/* .pane: içerik kartı. Renk değiştiren eski varyantlar yeni paletin iki tonuna iner. */
.pane {
  position: relative;
  min-width: 0;
  padding: var(--pane-pad);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pane--seeded {
  background: var(--surface-2);
}

.pane--cobalt,
.pane--amber,
.pane--oxblood {
  background: var(--accent-soft);
  border-color: transparent;
}

.pane-title {
  font-size: var(--fs-h3);
  font-weight: 650;
}

.pane-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pane-admin:empty {
  display: none;
}

.pane-admin {
  margin-top: 12px;
}

.prose p + p {
  margin-top: 1em;
}

.prose a {
  color: var(--accent-ink);
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tile {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 11px;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.pane--seeded .tile {
  background: var(--surface);
}

.empty-text {
  color: var(--ink-3);
}


/* ---------- 4. Üst çubuk: ana sayfa ve alt sayfalar ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.rail-pane {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(var(--content-w) + var(--gutter) * 2);
  height: var(--topbar-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Okuma ilerlemesi: üst çubuğun altında ince kırmızı rota */
.rail-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
}

.rail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  background: var(--surface-2);
}

.rail-name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rail-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.rail-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--pill);
  font-size: var(--fs-small);
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}

.rail-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.rail-nav a.active {
  color: var(--ink);
}

.rail-nav a.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--accent);
}

.rail-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.rail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 38px;
  height: 38px;
  padding: 0 9px;
  border-radius: var(--pill);
  color: var(--ink-2);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}

.rail-btn:hover {
  background: var(--surface);
  color: var(--ink);
}

.rail-btn .ico {
  width: 19px;
  height: 19px;
}

.rail-kbd,
.rail-btn-text {
  display: none;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  margin-right: 2px;
  border-radius: var(--pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.lang-btn {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink-3);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}

.lang-btn.active {
  background: var(--action);
  color: var(--on-action);
}

.theme-toggle-btn .ico-sun,
:root[data-theme="dark"] .theme-toggle-btn .ico-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle-btn .ico-sun {
  display: block;
}

.hamburger-btn,
.mobile-menu {
  display: none;
}

/* Sayfa genişliği */
main {
  min-width: 0;
}

main:focus {
  outline: none;
}

.bay,
.hero,
.site-footer {
  width: 100%;
  max-width: calc(var(--content-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.coord {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- 5. İlk ekran: rotanın başlangıcı ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
  padding-top: clamp(56px, 11vh, 128px);
  padding-bottom: clamp(32px, 5vh, 56px);
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.05em;
}

.hero-title .to {
  display: block;
  color: var(--accent);
}

.hero-start {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.pin-dot {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.hero-side {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.hero-id {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-portrait {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line);
}

.hero-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-role {
  color: var(--ink-2);
  font-size: var(--fs-small);
}

.hero-intro {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 40ch;
}

.hero-intro b {
  color: var(--ink);
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.hero-formats a {
  color: var(--ink-2);
  text-decoration-color: var(--line-strong);
}

.hero-formats a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

/* CV bölünmüş düğmesi: ana düğme sayfanın dilindeki PDF'i indirir, ok tüm biçimleri açar */
.cv-split {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.cv-split .cv-main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 18px;
}

.cv-split .cv-toggle {
  min-width: 48px;
  padding: 0 14px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--on-action) 22%, transparent);
}

.cv-split .cv-toggle .ico {
  transition: transform var(--t-med) var(--ease-out);
}

.cv-split .cv-toggle[aria-expanded="true"] .ico {
  transform: rotate(180deg);
}

.cv-tag {
  padding: 2px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--on-action) 16%, transparent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.cv-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  width: min(360px, calc(100vw - 32px));
  padding: 8px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 28px 56px -24px rgba(13, 27, 46, 0.4);
  transform-origin: top left;
}

@media (prefers-reduced-motion: no-preference) {
  .cv-menu:not([hidden]) {
    animation: menu-in 0.24s var(--ease-out);
  }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.cv-menu-title {
  padding: 8px 12px 6px;
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--ink-3);
}

.cv-menu a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  transition: background-color var(--t-fast) ease;
}

.cv-menu a:hover,
.cv-menu a:focus-visible {
  background: var(--surface-2);
}

.cv-menu a .ico {
  color: var(--ink-3);
}

.cv-menu a:hover .ico {
  color: var(--accent);
}

.cv-item-web {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  padding-top: 14px !important;
}

.cv-item-text {
  display: grid;
  gap: 1px;
  line-height: 1.25;
}

.cv-item-text b {
  font-weight: 650;
}

.cv-item-text small {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.file-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 46px;
  border-radius: 6px 12px 6px 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: #FFFFFF;
}

.file-badge.is-pdf { background: #D9342B; }
.file-badge.is-doc { background: #2B5DB9; }
.file-badge.is-web { background: var(--ink); color: var(--bg); }

/* Rota özeti: tüm duraklar tek satırda; her biri kendi bölümüne gider */
.route-preview {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--stops, 5), minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(24px, 4vh, 48px);
  padding-top: 26px;
}

.route-preview::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 18px);
}

.route-preview a {
  position: relative;
  display: grid;
  gap: 2px;
  text-decoration: none;
  min-width: 0;
}

.route-preview a::before {
  content: '';
  position: absolute;
  top: -26px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 3px var(--accent);
  transition: background-color var(--t-fast) ease;
}

.route-preview a:hover::before,
.route-preview a.is-last::before {
  background: var(--accent);
}

.route-preview b {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-preview span {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.route-preview a:hover b {
  color: var(--accent-ink);
}

.hero-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.hero-meta p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-status {
  color: var(--ink);
  font-weight: 600;
}

.status-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1F9D57;
}

@media (prefers-reduced-motion: no-preference) {
  .status-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: status-ping 2.4s var(--ease-out) infinite;
  }
}

@keyframes status-ping {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
}

.hero-links a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.hero-links a:hover {
  color: var(--accent-ink);
}

/* İlk açılış: başlık iki satırda yerine oturur, rota özeti soldan çizilir */
@media (prefers-reduced-motion: no-preference) {
  .hero-intro-anim .hero-title > span {
    display: block;
    animation: hero-rise 1s var(--ease-out) both;
  }

  .hero-intro-anim .hero-title .to {
    animation-delay: 0.12s;
  }

  .hero-intro-anim .hero-side {
    animation: hero-rise 1s var(--ease-out) 0.25s both;
  }

  .hero-intro-anim .route-preview::before {
    animation: route-draw 1.4s var(--ease-out) 0.45s both;
    transform-origin: left;
  }

  .hero-intro-anim .route-preview a {
    animation: hero-rise 0.8s var(--ease-out) both;
    animation-delay: calc(0.55s + var(--n, 0) * 0.12s);
  }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes route-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- 6. Kaydırınca beliren içerik ---------- */
/* Sınıf yalnızca betik çalışır ve hareket azaltma kapalıyken eklenir; aksi halde her şey görünür */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out);
  transition-delay: calc(min(var(--i, 0), 5) * 90ms);
}

.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 7. Bölümler ---------- */
.bay {
  display: grid;
  gap: 20px;
  padding-top: var(--section-pad);
}

/* Bölüm başlığı bir durak tabelasıdır: kırmızı nokta, büyük ad, altında künye */
.bay-head {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  padding: 0 0 0 34px;
  background: none;
  border: 0;
  border-radius: 0;
}

.bay-head::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.bay-head h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.bay-head-sub {
  max-width: 60ch;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.bay-head-link {
  font-size: var(--fs-small);
}

.bay-head-link a {
  font-weight: 650;
  color: var(--accent-ink);
}

.bay-body {
  display: grid;
  gap: 20px;
}

.pane-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pane {
  box-shadow: var(--shadow-card);
  border-color: transparent;
}

:root[data-theme="dark"] .pane {
  border-color: var(--line);
}

/* Hakkımda */
#about {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(24px, 4vw, 56px);
}

#about .bay-head,
#about .about-tech,
#about .about-play {
  grid-column: 1 / -1;
}

.about-bio {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.about-bio .prose p:first-child {
  color: var(--ink);
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  line-height: 1.38;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.facts {
  display: grid;
}

.fact {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.fact:first-child {
  border-top: 0;
  padding-top: 0;
}

.fact dt {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.fact dd {
  font-weight: 650;
}

.fact.is-highlight dd {
  color: var(--accent-ink);
}

.tech-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 36px;
}

.tech-group h4 {
  margin-bottom: 12px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
}

.tech-group .tile {
  min-height: 36px;
  padding: 4px 15px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
}

.about-play {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
}

/* Komut satırı: boşta bir davet, açılınca js/terminal.js kabuğa çevirir. Her temada koyu. */
.about-terminal {
  --ink: #E7ECF3;
  --ink-2: #A9B5C8;
  --ink-3: #8D9AB1;
  --line: rgba(231, 236, 243, 0.12);
  --line-strong: rgba(231, 236, 243, 0.24);
  --surface: #0D1828;
  --surface-2: #142236;
  --action: #E7ECF3;
  --on-action: #0D1828;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #0D1828;
  color: var(--ink);
  border-color: #0D1828;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line);
}

.terminal-header::before {
  content: '';
  flex: none;
  width: 44px;
  height: 10px;
  background:
    radial-gradient(circle at 5px 5px, #FF5F57 4.5px, transparent 5px),
    radial-gradient(circle at 22px 5px, #FEBC2E 4.5px, transparent 5px),
    radial-gradient(circle at 39px 5px, #28C840 4.5px, transparent 5px);
}

.terminal-filename {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0;
}

.terminal-actions-group {
  display: flex;
  gap: 6px;
}

.terminal-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.shell-intro {
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.shell-intro kbd {
  color: var(--ink);
}

.shell-commands {
  display: grid;
  gap: 2px;
}

.shell-command {
  display: grid;
  grid-template-columns: minmax(0, 15em) minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  text-align: left;
  font-size: var(--fs-small);
  transition: background-color var(--t-fast) ease;
}

.shell-command:hover {
  background: var(--surface-2);
}

.shell-command code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #FFB4B8;
}

.shell-command code::before {
  content: '$ ';
  color: var(--ink-3);
}

.shell-command span {
  color: var(--ink-2);
}

.terminal-action-btn,
.terminal-launch-btn {
  min-height: 34px;
}

.terminal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: var(--pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color var(--t-fast) ease;
}

.terminal-action-btn:hover {
  background: var(--surface-2);
}

.terminal-action-btn svg {
  width: 16px;
  height: 16px;
}

.play-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: var(--pane-pad);
  text-align: left;
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}

.play-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.play-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 220px;
  margin-bottom: 6px;
}

.play-board i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--line);
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.play-board i.o {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.play-board i.n1 { color: #2459D6; }
.play-board i.n2 { color: #1F7A4D; }
.play-board i.f { background: var(--accent); }

:root[data-theme="dark"] .play-board i.n1 { color: #8FB0FF; }
:root[data-theme="dark"] .play-board i.n2 { color: #7DD3A8; }

.play-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.play-sub {
  color: var(--ink-2);
  font-size: var(--fs-small);
}

.play-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-weight: 650;
  color: var(--accent-ink);
}

/* Rota: eğitim ve deneyim duraklarını birleştiren kırmızı çizgi */
.route {
  position: relative;
  padding-block: 8px 24px;
}

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.route-svg .base {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
}

.route-svg .draw {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  --stop-gap: clamp(48px, 7vw, 112px);
  gap: var(--stop-gap);
  padding-block: clamp(40px, 7vh, 72px);
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

.stop-pin {
  position: absolute;
  left: calc((100% - var(--stop-gap)) / 2.15 + var(--stop-gap) / 2 - 11px);
  top: 50%;
  z-index: 2;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 3px var(--line-strong);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.stop.in .stop-pin,
.no-route-anim .stop-pin {
  background: var(--accent);
  box-shadow: 0 0 0 7px var(--accent-soft);
}

.stop-place {
  display: grid;
  gap: 8px;
  min-width: 0;
  container-type: inline-size;
}

.stop-anchor {
  position: absolute;
  top: 0;
  left: 0;
}

.stop-when {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--accent-ink);
}

.stop-city {
  font-size: min(6rem, 14cqi);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.stop-kind {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: var(--pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--ink-2);
}

.stop-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.stop:nth-child(even of .stop) .stop-place {
  order: 2;
}

.stop-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stop-card .role {
  margin-top: 4px;
  color: var(--accent-ink);
  font-weight: 650;
}

.stop-card .desc {
  color: var(--ink-2);
}

.stop--next .stop-city {
  color: var(--accent);
}

/* Kart, rota çizgisi durağa ulaşınca yan taraftan açılır */
.js-route .stop .stop-card {
  clip-path: inset(0 0 0 100% round var(--radius));
  transition: clip-path 1s var(--ease-out);
}

.js-route .stop:nth-child(even of .stop) .stop-card {
  clip-path: inset(0 100% 0 0 round var(--radius));
}

.js-route .stop .stop-place {
  opacity: 0.3;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 1s var(--ease-out);
}

.js-route .stop.in .stop-card,
.js-route .stop.in:nth-child(even of .stop) .stop-card {
  clip-path: inset(-40px -40px -60px -40px round var(--radius));
}

.js-route .stop.in .stop-place {
  opacity: 1;
  transform: none;
}

.exp-points,
.detail-list,
.legal ul {
  display: grid;
  gap: 9px;
}

.exp-points li,
.detail-list li,
.legal li {
  position: relative;
  padding-left: 20px;
}

.exp-points li::before,
.detail-list li::before,
.legal li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 2px;
  background: var(--accent);
}

.exp-points li {
  color: var(--ink-2);
}

/* Projeler */
#projects .bay-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

#projects .bay-head > * {
  grid-column: 1;
}

#projects .bay-head-link {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}

.filter-btn:hover {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.filter-btn[aria-pressed="true"] {
  background: var(--action);
  color: var(--on-action);
  box-shadow: none;
}

.filter-count {
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.project-wall {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* Proje kartı: görsel üstte (kategori ve yıl üzerinde), altta açıklama, teknolojiler ve eylemler */
.project {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}

.project:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-4px);
}

.project-shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  text-align: left;
}

.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.project-shot.is-contain img {
  object-fit: contain;
  padding: 18px 18px 8px;
}

.project:hover .project-shot img {
  transform: scale(1.045);
}

.project-shot::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.project:hover .project-shot::after {
  transform: scaleX(1);
}

.project-shot-mark {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 5rem;
  font-weight: 700;
  color: var(--line-strong);
}

.project-badge,
.project-year {
  position: absolute;
  top: 14px;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: var(--fs-xs);
  font-weight: 650;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.project-badge {
  left: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(13, 27, 46, 0.12);
}

.project-year {
  right: 14px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 500;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 22px 24px 22px;
}

.project-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.project-title button {
  text-align: left;
}

.project-title button:hover {
  color: var(--accent-ink);
}

.project-desc {
  color: var(--ink-2);
  font-size: var(--fs-small);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tech li {
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}

.project-tech li.more {
  background: none;
  color: var(--ink-3);
}

.project-actions,
.record-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: auto;
  padding-top: 8px;
}

.project-actions {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: var(--fs-small);
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}

.project-action:hover {
  color: var(--accent-ink);
}

.project-action .ico {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast) ease;
}

.project-action:hover .ico {
  transform: translateX(2px);
}

@media (min-width: 1100px) {
  .project.is-wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }

  .project.is-wide .project-shot {
    height: 100%;
    aspect-ratio: auto;
    min-height: 380px;
  }

  .project.is-wide .project-body {
    padding: 36px;
    justify-content: center;
  }

  .project.is-wide .project-title {
    font-size: 2rem;
  }

  .project.is-wide .project-desc {
    -webkit-line-clamp: 5;
    font-size: 1.0625rem;
  }
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  grid-column: 1 / -1;
  padding: var(--pane-pad);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* Kayıt kartları: sertifika, kurs, referans */
.record {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}

.bay-body > .record:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.record-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.org-mark,
.ref-avatar {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.org-mark {
  width: 42px;
  height: 42px;
  font-size: 0.9375rem;
}

.record-org {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-size: var(--fs-small);
  line-height: 1.3;
}

.record-org b {
  font-weight: 650;
}

.record-org span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.record-head .record-state {
  margin-left: auto;
}

.record-title {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.record-sub {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: var(--fs-small);
}

.record-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: var(--fs-small);
  color: var(--ink-3);
}

.record-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 11px;
  border-radius: var(--pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: var(--fs-xs);
  font-weight: 650;
  white-space: nowrap;
}

.record-state .ico {
  width: 14px;
  height: 14px;
}

.record-state.is-done {
  background: #E5F5EC;
  color: #145C36;
}

:root[data-theme="dark"] .record-state.is-done {
  background: #13301F;
  color: #8FE0B0;
}

.record-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
}

.stop-card .record-facts {
  padding: 0;
  border: 0;
}

.record-facts dt {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.record-facts dd {
  font-weight: 600;
}

.record-desc {
  color: var(--ink-2);
  font-size: var(--fs-small);
}

/* Sertifika: yatay kart, belge önizlemesi solda */
.cert-grid {
  grid-template-columns: minmax(0, 1fr);
}

.cert {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.cert.no-image {
  grid-template-columns: minmax(0, 1fr);
}

.cert-shot {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 28px;
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--surface-2);
  overflow: hidden;
}

.cert-shot img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 18px 36px -18px rgba(13, 27, 46, 0.45);
  transform: rotate(-1.2deg);
  transition: transform 0.7s var(--ease-out);
}

.cert-shot:hover img {
  transform: rotate(0deg) scale(1.03);
}

.cert-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--bg);
  font-size: var(--fs-xs);
  font-weight: 650;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease-out);
}

.cert-zoom .ico {
  width: 14px;
  height: 14px;
}

.cert-shot:hover .cert-zoom,
.cert-shot:focus-visible .cert-zoom {
  opacity: 1;
  transform: none;
}

.cert-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 2.6vw, 34px);
}

/* Referans: kartvizit */
.ref {
  position: relative;
  overflow: hidden;
}

.ref::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 18px);
}

.ref-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ref-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 1.125rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.ref-org {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: var(--fs-small);
}

.ref-org .ico {
  color: var(--ink-3);
}

.cert-shot:focus-visible,
.project-shot:focus-visible {
  outline-offset: -3px;
}

/* İletişim: rotanın son durağı */
#contact {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

#contact .bay-head {
  grid-column: 1;
  grid-row: 1;
}

#contact .bay-head h2 {
  color: var(--accent);
}

.contact-links {
  grid-column: 1;
  grid-row: 2;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.contact-links .pane-title {
  margin-bottom: 8px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
}

.contact-form-pane {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.link-rows li + li {
  border-top: 1px solid var(--line);
}

.link-rows a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  text-decoration: none;
}

.link-row-name {
  font-weight: 650;
}

.link-row-val {
  color: var(--ink-2);
  font-size: var(--fs-small);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-rows .ico {
  color: var(--ink-3);
  transition: transform var(--t-fast) ease, color var(--t-fast) ease;
}

.link-rows a:hover .link-row-val {
  color: var(--ink);
}

.link-rows a:hover .ico {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.contact-form-pane .pane-title {
  margin-bottom: 20px;
}

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

.cform-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: var(--fs-small);
  font-weight: 600;
}

.field input,
.field textarea,
.form-control {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field [aria-invalid="true"] {
  border-color: var(--danger);
}

.cform-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cform-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.cform-note {
  flex: 1 1 220px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.cform-status {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  background: var(--surface-2);
}

.cform-status.is-success {
  background: #E5F5EC;
  color: #145C36;
}

:root[data-theme="dark"] .cform-status.is-success {
  background: #13301F;
  color: #8FE0B0;
}

.cform-status.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.cform-status a {
  font-weight: 650;
}

/* Alt bilgi */
.site-footer {
  margin-top: var(--section-pad);
  padding-bottom: 36px;
}

.footer-pane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 24px 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  font-size: var(--fs-small);
  color: var(--ink-3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a,
.footer-links .link-btn {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links .link-btn:hover {
  color: var(--ink);
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.footer-top .ico {
  width: 16px;
  height: 16px;
}

/* ---------- 8. Butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-fast) ease;
}

.btn:hover {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn .ico {
  width: 18px;
  height: 18px;
}

.btn-amber,
.btn-accent {
  background: var(--action);
  color: var(--on-action);
  box-shadow: none;
}

.btn-amber:hover,
.btn-accent:hover {
  background: var(--action-hover);
  box-shadow: none;
}

.btn-ink,
.btn-primary {
  background: var(--action);
  color: var(--on-action);
  box-shadow: none;
}

.btn-ink:hover,
.btn-primary:hover {
  background: var(--action-hover);
  box-shadow: none;
}

.btn-ghost,
.btn-secondary,
.btn-outline {
  color: var(--ink);
}

.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: var(--fs-small);
}

.mt-2 {
  margin-top: 8px;
}

.link-btn {
  font-size: inherit;
  font-weight: inherit;
}

/* CV indirme düğmeleri (alt sayfalar ve yönetim paneli de kullanır) */
.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--pill);
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--t-fast) ease;
}

.cv-btn:hover {
  background: var(--action-hover);
}

.cv-btn + .cv-btn {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.cv-btn + .cv-btn:hover {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.cv-admin-row {
  margin-top: 8px;
}

/* ---------- 9. Diyaloglar ---------- */
dialog {
  color: var(--ink);
}

.custom-modal {
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.custom-modal:focus,
.custom-modal:focus-visible {
  outline: none;
}

.custom-modal::backdrop {
  background: rgba(10, 12, 14, 0.55);
  backdrop-filter: blur(3px);
}

@media (prefers-reduced-motion: no-preference) {
  .custom-modal[open] > * {
    animation: sheet-in 0.36s var(--ease-out);
  }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.sheet {
  width: min(560px, calc(100vw - 24px));
}

.sheet--wide {
  width: min(760px, calc(100vw - 24px));
}

.sheet-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100svh - 48px);
  overflow: auto;
  padding: var(--pane-pad);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.35);
}

.sheet-pane > * {
  flex-shrink: 0;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sheet-title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 680;
  letter-spacing: -0.03em;
}

.sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  margin: -6px -6px 0 0;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color var(--t-fast) ease;
}

.sheet-close:hover {
  background-color: var(--surface-2);
}

.sheet-close .ico {
  width: 22px;
  height: 22px;
}

.sheet-meta {
  margin-top: 8px;
}

.sheet-lead {
  color: var(--ink-2);
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
}

.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.setting-name {
  font-size: 1.0625rem;
  font-weight: 650;
}

.setting-hint {
  margin-top: 4px;
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.setting-state {
  margin-top: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
}

.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  margin-top: 2px;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--pill);
  background: var(--line-strong);
  transition: background-color 240ms var(--ease-out);
}

.switch-track::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 240ms var(--ease-out);
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(22px);
}

.switch input:focus-visible + .switch-track {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}

.legal h4 {
  margin: 1.4em 0 0.4em;
  font-size: 1.0625rem;
}

.legal ul {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.legal .legal-badge-pill {
  display: none;
}

/* Proje detayı */
.project-sheet {
  width: min(1040px, calc(100vw - 24px));
}

.project-sheet .sheet-pane {
  gap: 22px;
}

.gallery {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  display: none;
}

.gallery-slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 64px;
}

.gallery-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background-color var(--t-fast) ease;
}

.gallery-nav:hover {
  background: var(--surface-2);
}

.gallery-nav.prev {
  left: 10px;
}

.gallery-nav.next {
  right: 10px;
}

.gallery-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 10px;
  border-radius: var(--pill);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
}

.detail-grid h3 {
  margin-bottom: 10px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.lightbox-sheet {
  width: min(1200px, calc(100vw - 24px));
}

.lightbox-sheet .sheet-pane {
  padding: 12px;
  gap: 10px;
}

.lightbox-img {
  width: 100%;
  max-height: calc(100svh - 160px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.lightbox-caption {
  padding: 4px 8px;
  font-weight: 600;
}

/* Sitede ara (komut paleti) */
.palette {
  width: min(680px, calc(100vw - 24px));
  margin-top: 12vh;
}

.palette-pane {
  display: flex;
  flex-direction: column;
  max-height: 72svh;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.35);
}

.palette-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 20px;
  border-bottom: 1px solid var(--line);
}

.palette-bar > .ico {
  width: 20px;
  height: 20px;
  color: var(--ink-3);
}

.palette-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  background: transparent;
  border: 0;
  font-size: 1.125rem;
  color: var(--ink);
}

.palette-input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.palette-input:focus {
  outline: none;
}

.palette-clear {
  height: 34px;
  padding: 0 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-2);
}

.palette-clear:hover {
  color: var(--ink);
  text-decoration: underline;
}

.palette .sheet-close {
  margin: 0;
}

.palette-results {
  flex: 1;
  overflow: auto;
  padding: 6px 8px 10px;
}

.palette-group {
  padding: 14px 12px 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
}

.palette-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
}

.palette-item .ico {
  width: 20px;
  height: 20px;
  justify-self: center;
  color: var(--ink-2);
}

.palette-thumb {
  width: 36px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}

.palette-item-title {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.palette-item-desc {
  display: block;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-item-hint {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
}

.palette-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.palette-item.is-active .ico,
.palette-item.is-active .palette-item-desc,
.palette-item.is-active .palette-item-hint {
  color: var(--accent-ink);
}

.palette-item mark,
.palette-item .cmd-match-highlight {
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.palette-empty {
  padding: 22px 12px;
  color: var(--ink-2);
}

.palette-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.palette-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.palette-foot kbd {
  margin-right: 3px;
}

.palette-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* ---------- 10. Bildirim (toast) ---------- */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--bg);
  font-size: var(--fs-small);
  font-weight: 550;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.3);
  transition: opacity 300ms ease, transform 300ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  .toast-pill {
    animation: hero-rise 0.4s var(--ease-out);
  }
}

.toast-pill .ico {
  width: 18px;
  height: 18px;
}

.toast-pill.toast-error,
.toast-pill.toast-warning {
  background: var(--danger);
  color: #FFFFFF;
}

.toast-fadeout {
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- 11. Portföy asistanı (kural tabanlı) ---------- */
.chatbot-floating-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  transition: opacity 300ms ease, visibility 300ms, transform 300ms var(--ease-out);
}

.chatbot-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px 0 16px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: var(--fs-small);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.45);
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease;
}

.chatbot-trigger-btn:hover {
  background-color: var(--ink-2);
}

.chatbot-trigger-btn .ico {
  width: 20px;
  height: 20px;
}

.chatbot-trigger-btn .trigger-close-icon,
.chatbot-trigger-btn.open .trigger-bot-icon {
  display: none;
}

.chatbot-trigger-btn.open .trigger-close-icon {
  display: block;
}

.chatbot-window {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 91;
  display: none;
  flex-direction: column;
  width: min(400px, calc(100vw - 24px));
  height: min(600px, calc(100svh - 120px));
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.35);
}

.chatbot-window.is-open,
.chatbot-window.open,
.chatbot-window.active {
  display: flex;
}

@media (prefers-reduced-motion: no-preference) {
  .chatbot-window.is-open,
  .chatbot-window.open,
  .chatbot-window.active {
    animation: sheet-in 0.32s var(--ease-out);
  }
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px 12px 20px;
  border-bottom: 1px solid var(--line);
}

.chatbot-header-info {
  display: grid;
  gap: 1px;
}

.chatbot-bot-title {
  font-size: 1rem;
  font-weight: 650;
}

.chatbot-header-status {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.chatbot-header-actions {
  display: flex;
}

.chatbot-hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color var(--t-fast) ease;
}

.chatbot-hdr-btn:hover {
  background: var(--surface-2);
}

.chatbot-hdr-btn .ico {
  width: 19px;
  height: 19px;
}

.chatbot-messages-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--surface-2);
}

.chat-msg-bubble {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: var(--fs-small);
  line-height: 1.5;
}

.bot-bubble {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.user-bubble {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 6px;
}

.chat-msg-content p + p {
  margin-top: 0.6em;
}

.chat-msg-content ul {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.chat-inline-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.chat-link {
  font-weight: 600;
}

.chat-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-chip-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: var(--fs-xs);
  font-weight: 550;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color var(--t-fast) ease;
}

.chat-chip-btn:hover {
  background: var(--accent-soft);
}

.chat-project-cards-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-project-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.chat-card-title {
  font-weight: 650;
}

.chat-card-desc {
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}

.chat-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.75rem;
}

.chat-card-tags span {
  padding: 1px 8px;
  border-radius: var(--pill);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.chat-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-card-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.chat-card-btn.highlight {
  background: var(--ink);
  color: var(--bg);
  box-shadow: none;
}

.typing-bubble {
  display: flex;
  gap: 5px;
  align-items: center;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: typing-step 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-step {
  50% {
    opacity: 0.25;
    transform: translateY(-2px);
  }
}

.chatbot-footer {
  padding: 10px;
  border-top: 1px solid var(--line);
}

.chatbot-input-form {
  display: flex;
  gap: 8px;
}

.chatbot-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  background: var(--input-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
}

.chatbot-input:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.chatbot-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

.chatbot-send-btn:hover {
  background: var(--accent-hover);
}

.chatbot-footer-brand {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* Asistan karşılama balonu: siteye girdikten birkaç saniye sonra köşeden çıkar */
.chatbot-speech-bubble {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 92;
  display: grid;
  gap: 12px;
  width: min(340px, calc(100vw - 32px));
  padding: 16px 16px 16px 18px;
  border-radius: var(--radius) var(--radius) 6px var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 28px 56px -22px rgba(13, 27, 46, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
  .chatbot-speech-bubble {
    animation: bubble-in 0.6s var(--ease-out);
  }
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.bubble-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bubble-avatar {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
}

.bubble-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
}

.bubble-avatar::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1F9D57;
  box-shadow: 0 0 0 2px var(--surface);
}

.bubble-title {
  font-weight: 700;
  font-size: var(--fs-small);
}

.bubble-close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 auto;
  border-radius: 50%;
  color: var(--ink-3);
}

.bubble-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.bubble-close .ico {
  width: 16px;
  height: 16px;
}

.bubble-text {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-2);
}

.bubble-start {
  justify-self: start;
}

/* Başa dön: asistan düğmesinin hemen üstünde, sayfa biraz kaydırılınca belirir */
.to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 89;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 12px 28px -12px rgba(13, 27, 46, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease-out), visibility var(--t-med), background-color var(--t-fast) ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--action);
  color: var(--on-action);
}

.to-top .ico {
  width: 20px;
  height: 20px;
}

/* Karşılama balonu açıkken ok onun arkasında kalmasın */
.bubble-open .to-top {
  opacity: 0;
  visibility: hidden;
}

/* Asistan düğmesi ile ok aynı sağ kenara hizalanır; okun ortası düğmenin sağ yarısına denk gelir */
.chatbot-floating-container {
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.bubble-fadeout {
  opacity: 0;
  transition: opacity 300ms ease;
}

/* ---------- 12. Yönetim (yalnızca yerel CMS açıkken görünen düğmeler) ---------- */
.btn-admin-box-edit,
.btn-admin-quick-edit,
.section-add-btn,
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-admin-box-edit:hover,
.btn-admin-quick-edit:hover,
.section-add-btn:hover,
.admin-btn:hover {
  background: var(--surface-2);
}

.admin-btn.delete-btn {
  color: var(--danger);
}

.admin-card-controls {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.section-add-btn {
  justify-self: start;
}

/* Yönetim diyalogları kendi koyu bileşenleriyle çizilir */
dialog[class*="admin-"] {
  --surface: #16191B;
  --surface-2: #1E2224;
  --clear: #16191B;
  --clear-lit: #1E2224;
  --seeded: #1C2022;
  --ink: #E9EDEB;
  --ink-2: #BAC3BF;
  --ink-3: #9AA49F;
  --line: rgba(233, 237, 235, 0.14);
  --hairline: rgba(233, 237, 235, 0.14);
  --input-bg: #0E1112;
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --lit: var(--clear-lit);
  color: var(--ink);
  color-scheme: dark;
}

.modal-dialog-content {
  position: relative;
  max-height: calc(100svh - 48px);
  overflow: auto;
  padding: var(--pane-pad);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.125rem;
  color: var(--ink);
  z-index: 2;
}

.modal-close-btn:hover {
  background: var(--surface-2);
}


/* ---------- 14. Duyarlı düzen ---------- */
@media (max-width: 1140px) {
  .rail-nav {
    display: none;
  }

  .rail-tools {
    margin-left: auto;
  }

  .hamburger-btn {
    display: inline-flex;
  }

  .mobile-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: grid;
    gap: 2px;
    padding: 10px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.3);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), visibility var(--t-med);
  }

  .mobile-menu.show {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .mobile-menu a,
  .mobile-menu-settings {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    border-radius: var(--radius-xs);
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    text-align: left;
  }

  .mobile-menu a.active {
    background: var(--surface);
    color: var(--accent-ink);
  }

  .mobile-menu-settings {
    margin-top: 8px;
    border-top: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink-2);
  }
}

@media (max-width: 1000px) {
  .hero,
  #about,
  #contact {
    grid-template-columns: minmax(0, 1fr);
  }

  #contact .bay-head,
  .contact-links,
  .contact-form-pane {
    grid-column: 1;
    grid-row: auto;
  }

  .about-play {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Rota tek sütuna iner: çizgi solda, kartlar sağında alt alta */
@media (max-width: 820px) {
  .stop {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-left: 40px;
    padding-block: 32px;
  }

  .stop-pin {
    left: 4px;
    top: 44px;
    margin-top: 0;
  }

  .stop:nth-child(even of .stop) .stop-place {
    order: 0;
  }

  .js-route .stop:nth-child(even of .stop) .stop-card {
    clip-path: inset(0 0 0 100% round var(--radius));
  }

  .js-route .stop.in .stop-card,
  .js-route .stop.in:nth-child(even of .stop) .stop-card {
    clip-path: inset(-40px -40px -60px -40px round var(--radius));
  }
}

@media (max-width: 900px) {
  .cert {
    grid-template-columns: minmax(0, 1fr);
  }

  .cert-shot {
    min-height: 220px;
  }
}

@media (max-width: 760px) {
  :root {
    --pane-pad: 20px;
    --radius: 16px;
    --section-pad: 80px;
  }

  .pane-pair,
  .project-wall,
  .cform-row,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 40px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-links {
    margin-left: 0;
  }

  .route-preview {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    overflow-x: auto;
    scrollbar-width: none;
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
  }

  .route-preview::before {
    right: auto;
    width: calc(132px * var(--stops, 5) + 12px * (var(--stops, 5) - 1));
  }

  #projects .bay-head {
    grid-template-columns: minmax(0, 1fr);
  }

  #projects .bay-head-link {
    grid-column: 1;
    grid-row: auto;
  }

  .shell-command {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .link-rows a {
    grid-template-columns: 80px minmax(0, 1fr) auto;
  }

  .gallery-slide.active {
    padding: 10px 44px;
  }

  .gallery-nav {
    width: 36px;
    height: 36px;
    margin-top: -18px;
  }

  .chatbot-trigger-btn .chatbot-trigger-text {
    display: none;
  }

  .chatbot-trigger-btn {
    width: 52px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 440px) {
  .rail--home .rail-search,
  .rail--home .rail-name {
    display: none;
  }
}

/* ---------- 15. Hareket azaltma ve baskı ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  :root,
  :root[data-theme="dark"] {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #FFFFFF;
    --ink: #000000;
    --ink-2: #222222;
    --ink-3: #444444;
  }

  .layout {
    display: block;
  }

  .rail,
  .about-play,
  .contact-form-pane,
  .chatbot-floating-container,
  .chatbot-window,
  .filter-list,
  .project-actions,
  .hero-actions,
  .footer-top {
    display: none !important;
  }

  .js-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .pane {
    box-shadow: none;
    border: 1px solid #999999;
    break-inside: avoid;
  }

  .hero {
    min-height: 0;
  }
}
