/* =============================================================
   Mert Aydın — kişisel site
   Biçim dili: react.dev — yumuşak köşeler, ince kenarlıklar,
   dağınık ve alçak gölgeler, sakin tipografi.
   Vurgu rengi: elektrik mavisi.
   ============================================================= */

/* ------------------------------------------------ 1. TOKENLAR */

:root {
  /* Yazı tipini değiştirmek için tek yer burası.
     (index.html içindeki Google Fonts bağlantısını da güncelle.) */
  --font-sans:
    "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono:
    "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.0625rem;
  --fs-xl: clamp(1.2rem, 1.02rem + 0.55vw, 1.45rem);
  --fs-2xl: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-hero: clamp(2.4rem, 1.4rem + 4.3vw, 4.3rem);

  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* Köşe yuvarlaklığı: tek yerden. Daha köşeli bir görünüm için küçült. */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 10px;

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --header-h: 66px;

  --ease: cubic-bezier(0.33, 0.9, 0.32, 1);
  --dur: 0.2s;
}

/* Koyu tema */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15181f;
  --bg-deep: #101319;
  --surface: #1d212a;
  --surface-2: #242935;
  --line: #2c3240;
  --line-2: #3c4454;
  --line-soft: rgba(196, 214, 255, 0.09);

  /* Hero'daki ışıma ve alan halkaları */
  --glow-1: rgba(78, 168, 255, 0.28);
  --glow-2: rgba(140, 120, 255, 0.2);
  --glow-3: rgba(255, 150, 176, 0.09);
  --ring: rgba(160, 190, 255, 0.08);
  --text: #eef0f4;
  --text-2: #b6bdcb;
  --muted: #8b94a5;
  --accent: #4ea8ff;
  --accent-2: #82c3ff;
  --accent-ghost: rgba(78, 168, 255, 0.14);
  --accent-ink: #0d1520;
  --grid: rgba(175, 200, 255, 0.035);
  --grid-major: rgba(175, 200, 255, 0.06);
  --header-bg: rgba(21, 24, 31, 0.82);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-md:
    0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 32px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 24px 64px -28px rgba(0, 0, 0, 0.9);
}

/* Açık tema */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg-deep: #eceef2;
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --line: #e2e5eb;
  --line-2: #ccd2dc;
  --line-soft: rgba(16, 24, 40, 0.09);

  /* Hero'daki ışıma ve alan halkaları */
  --glow-1: rgba(110, 160, 255, 0.32);
  --glow-2: rgba(172, 150, 255, 0.26);
  --glow-3: rgba(255, 190, 170, 0.24);
  --ring: rgba(11, 114, 214, 0.085);
  --text: #16181d;
  --text-2: #404652;
  --muted: #6b7280;
  --accent: #0b72d6;
  --accent-2: #085aac;
  --accent-ghost: rgba(11, 114, 214, 0.08);
  --accent-ink: #ffffff;
  --grid: rgba(30, 55, 100, 0.032);
  --grid-major: rgba(30, 55, 100, 0.055);
  --header-bg: rgba(246, 247, 249, 0.85);

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md:
    0 1px 3px rgba(16, 24, 40, 0.05), 0 12px 28px -16px rgba(16, 24, 40, 0.22);
  --shadow-lg: 0 28px 64px -28px rgba(16, 24, 40, 0.28);
}

/* ---------------------------------------------- 2. TEMEL KATMAN */

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

/* Proje penceresi açıkken arka plan sabit kalır, kaydırılamaz.
   iOS dahil her yerde çalışması için body sabitlenir; kaydırma konumu
   JavaScript tarafında saklanıp geri yüklenir (bkz. lockScroll). */
html.dialog-open {
  scrollbar-gutter: stable;
}

html.dialog-open body {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  line-height: 1.64;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size:
    28px 28px,
    28px 28px,
    140px 140px,
    140px 140px;
  -webkit-mask-image: radial-gradient(
    ellipse 110% 70% at 50% 0%,
    #000 10%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 110% 70% at 50% 0%,
    #000 10%,
    transparent 78%
  );
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-md);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip:focus {
  top: 12px;
}

.noscript {
  margin: 0;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-md);
  text-align: center;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ------------------------------------------------- 3. ÜST BAR */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-in {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  text-decoration: none;
  flex: 0 0 auto;
  margin-right: auto;
}

.brand-name {
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.018em;
}

.brand-role {
  font-size: 11.5px;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  color: var(--text-2);
  text-decoration: none;
  transition:
    color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.nav-link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transition:
    background-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.is-active {
  color: var(--accent);
}

.nav-link.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ghost);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}

/* Tek tuşlu tema ve dil anahtarı */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
  cursor: pointer;
  transition:
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

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

.icon-btn:hover {
  color: var(--accent);
  background: var(--accent-ghost);
}

.icon-btn-wide {
  width: auto;
  padding: 0 13px 0 11px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.burger {
  display: none;
}

/* --------------------------------------------- 4. DÜĞMELER */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 6px 18px -8px var(--accent);
}

.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.btn-ghost {
  background: var(--surface);
  border-color: transparent;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  color: var(--accent);
  border-color: var(--accent-ghost);
  background: var(--accent-ghost);
}

/* --------------------------------------------- 5. HERO */

.hero {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(70vh, 700px);
  min-height: min(70svh, 700px);
  padding-block: clamp(48px, 8vw, 100px);
}

/* Yumuşak ışıma */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 44% at 50% 40%, var(--glow-1), transparent 72%),
    radial-gradient(30% 36% at 33% 30%, var(--glow-2), transparent 72%),
    radial-gradient(28% 32% at 68% 62%, var(--glow-3), transparent 72%);
}

/* Adın arkasından dışa doğru yayılan halkalar */
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: -1;
  width: 1600px;
  height: 1600px;
  margin: -800px 0 0 -800px;
  pointer-events: none;
  background: repeating-radial-gradient(
    circle at center,
    var(--ring) 0,
    var(--ring) 1px,
    transparent 2px,
    transparent var(--ring-gap)
  );
  -webkit-mask-image: radial-gradient(
    circle at center,
    #000 0%,
    rgba(0, 0, 0, 0.55) 26%,
    transparent 52%
  );
  mask-image: radial-gradient(
    circle at center,
    #000 0%,
    rgba(0, 0, 0, 0.55) 26%,
    transparent 52%
  );
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-name {
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-role {
  margin-top: var(--sp-4);
  font-size: var(--fs-xl);
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.014em;
}

.hero-focus {
  margin-top: 8px;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--accent);
}

.hero-lede {
  margin-top: var(--sp-5);
  max-width: 54ch;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}

/* --------------------------------------------- 6. BÖLÜM ÇERÇEVESİ */

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(52px, 7.5vw, 96px);
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: clamp(26px, 4vw, 44px);
}

.section-title {
  font-size: var(--fs-2xl);
  letter-spacing: -0.025em;
}

.section-lede {
  margin-top: var(--sp-4);
  max-width: 62ch;
  color: var(--text-2);
}

.sub-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.016em;
  margin-bottom: var(--sp-5);
}

/* ----------------------------------------------- 7. PROFİL */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(28px, 4.5vw, 60px);
  align-items: start;
}

.prose {
  max-width: 62ch;
  color: var(--text-2);
}

.prose p + p {
  margin-top: var(--sp-5);
}

.facts {
  padding: var(--sp-3);
  border: 1px solid transparent;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.fact {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
}

.fact-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.fact-key::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}

.fact-val,
.fact-list {
  padding-left: 14px;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
}

.fact-list {
  display: grid;
  gap: 2px;
}

.fact-val.mono {
  font-family: var(--font-mono);
  color: var(--accent);
}

/* ---------------------------------------------- 8. EĞİTİM */

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(24px, 3.5vw, 48px);
}

.edu-list {
  display: grid;
  gap: var(--sp-3);
}

.edu-item {
  display: grid;
  gap: 3px;
  padding: var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.edu-title {
  font-size: var(--fs-md);
  font-weight: 600;
}

.edu-org {
  font-size: var(--fs-md);
  color: var(--text-2);
}

.edu-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
}

.edu-note {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.cert-list {
  display: grid;
  gap: var(--sp-3);
}

.cert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 15px var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: var(--fs-md);
  font-weight: 500;
}

.cert-org {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--muted);
}

.cert-year {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent);
}

/* ---------------------------------------------- 9. DENEYİM */

.timeline {
  display: grid;
  gap: clamp(26px, 3.4vw, 44px);
}

.job {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
}

.job-when {
  padding-top: 3px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.job-when b {
  display: block;
  font-weight: 600;
  color: var(--text-2);
}

.job-body {
  position: relative;
  padding-left: clamp(20px, 2.6vw, 32px);
  border-left: 1px solid var(--line);
}

.job-body::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-2);
}

.job.is-current .job-body::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ghost);
}

.job.is-current .job-when span {
  color: var(--accent);
  font-weight: 600;
}

.job-role {
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.job-org {
  margin-top: 5px;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--accent);
}

.job-org span {
  color: var(--muted);
  font-weight: 400;
}

.job-points {
  margin-top: var(--sp-4);
  display: grid;
  gap: 9px;
}

.job-points li {
  position: relative;
  padding-left: 19px;
  font-size: var(--fs-md);
  color: var(--text-2);
}

.job-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
}

.job .tags {
  margin-top: var(--sp-4);
}

/* --------------------------------------------- 10. UZMANLIK */

.skills-list {
  display: grid;
}

.skill-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--line);
}

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

.skill-name {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.016em;
}

.skill-note {
  margin-top: 5px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 7px;
}

.skill-row .tags {
  padding-top: 3px;
}

.tag {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-2);
  white-space: nowrap;
}

/* --------------------------------------------- 11. PROJELER */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.filter {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
  font-size: var(--fs-md);
  font-weight: 500;
  cursor: pointer;
  transition:
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.filter:hover {
  color: var(--text);
  background: var(--surface-2);
}

.filter[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.filter-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-5);
}

.proj {
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  text-align: left;
  border: 1px solid transparent;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.proj:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.proj-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.proj-cat {
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--accent-ghost);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.proj-year {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.proj-title {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.proj-sum {
  display: block;
  margin-top: 9px;
  font-size: var(--fs-md);
  color: var(--text-2);
}

.proj .tags {
  margin-top: var(--sp-5);
}

.proj-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
}

.proj-open svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease);
}

.proj:hover .proj-open svg {
  transform: translateX(3px);
}

.proj-empty {
  padding: var(--sp-10) 0;
  color: var(--muted);
  text-align: center;
}

/* -------------------------------------------- 12. İLETİŞİM */

.mail-block {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.mail-link {
  font-size: clamp(1.4rem, 1rem + 2vw, 2.4rem);
  overflow-wrap: anywhere;
  font-weight: 700;
  letter-spacing: -0.028em;
  color: var(--text);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition:
    background-size 0.3s var(--ease),
    color var(--dur) var(--ease);
}

.mail-link:hover {
  color: var(--accent);
  background-size: 100% 2px;
}

.copy {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  cursor: pointer;
  transition:
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.copy:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.copy svg {
  width: 15px;
  height: 15px;
}

.social-list {
  margin-top: var(--sp-10);
  display: grid;
}

.social {
  display: grid;
  grid-template-columns: 34px 120px minmax(0, 1fr) 18px;
  align-items: center;
  gap: var(--sp-4);
  padding: 18px 4px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition:
    padding-left var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

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

.social:hover {
  padding-left: 12px;
  color: var(--accent);
}

.social-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--accent-ghost);
  color: var(--accent);
}

.social-icon svg {
  width: 17px;
  height: 17px;
}

.social-label {
  font-weight: 600;
  font-size: var(--fs-md);
}

.social-value {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-go {
  width: 16px;
  height: 16px;
  color: var(--muted);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.social:hover .social-go {
  opacity: 1;
  color: var(--accent);
}

/* ---------------------------------------------- 13. PENCERE */

.dialog {
  width: min(820px, calc(100vw - 2 * var(--gutter)));
  max-height: min(86vh, 900px);
  max-height: min(86dvh, 900px);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dialog::backdrop {
  background: rgba(10, 13, 20, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* iOS sayfalarındaki gibi: yayılarak açılır, aşağı süzülerek kapanır */
.dialog[open] {
  animation: dialog-in 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.dialog.is-closing {
  animation: dialog-out 0.26s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.dialog[open]::backdrop {
  animation: backdrop-in 0.34s ease;
}

.dialog.is-closing::backdrop {
  animation: backdrop-out 0.26s ease forwards;
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}

@keyframes backdrop-out {
  to {
    opacity: 0;
  }
}

@keyframes dialog-out {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}

.dialog-in {
  display: flex;
  flex-direction: column;
  max-height: min(86vh, 900px);
  max-height: min(86dvh, 900px);
}

.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 12px 14px 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.dialog-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}

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

.dialog-close svg {
  width: 16px;
  height: 16px;
}

.dialog-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.gallery {
  position: relative;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

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

.gallery-stage > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.gallery-nav {
  position: absolute;
  inset-inline: 10px;
  top: 50%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.gallery-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(10, 14, 22, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #eaf0ff;
  cursor: pointer;
  pointer-events: auto;
}

.gallery-btn:hover {
  background: rgba(10, 14, 22, 0.92);
}

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

.gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 11px;
  border-radius: var(--r-md);
  background: rgba(10, 14, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: #e6ecf7;
}

.dialog-content {
  padding: clamp(22px, 3.4vw, 34px);
}

.dialog-title {
  font-size: var(--fs-2xl);
  letter-spacing: -0.03em;
}

.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.dialog-body {
  margin-top: var(--sp-6);
  color: var(--text-2);
}

.dialog-body p + p {
  margin-top: var(--sp-5);
}

.dialog-block {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}

.dialog-block-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: var(--sp-3);
  margin: 0;
}

.spec-cell {
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.spec-cell dt {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.spec-cell dd {
  margin: 5px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--accent);
}

.dialog-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* ------------------------------------------------ 14. ALT BAR */

.footer {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-10);
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

.footer-left {
  display: grid;
  gap: 6px;
}

.footer-name {
  font-weight: 600;
}

.footer-made {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* Yavaşça nefes alan küçük bir gösterge LED'i */
.led {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  animation: breathe 3.2s var(--ease) infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.4;
    box-shadow: 0 0 0 0 var(--accent-ghost);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 0 4px var(--accent-ghost);
  }
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  text-decoration: none;
}

.top-link:hover {
  color: var(--accent);
}

.top-link svg {
  width: 15px;
  height: 15px;
}

/* ------------------------------- 14b. AÇILIŞ VE GİRİŞ HAREKETİ */

/* Açılış ekranı sadece CSS ile sönümlenir; JavaScript beklemez,
   bu yüzden betik yüklenmese bile sayfa açılır. */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
  animation: preloader-out 0.92s var(--ease) forwards;
}

@keyframes preloader-out {
  0%,
  48% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.preloader-mark {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.preloader-name {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-2);
  opacity: 0;
  animation: preloader-name 0.4s var(--ease) 0.06s forwards;
}

@keyframes preloader-name {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.preloader-bar {
  position: relative;
  width: 78px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.preloader-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: preloader-bar 0.55s var(--ease) 0.04s forwards;
}

@keyframes preloader-bar {
  to {
    transform: scaleX(1);
  }
}

/* Sayfa açılırken içerik hafifçe yukarıdan iner */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.has-js .rise {
  animation: rise 0.62s var(--ease) both;
  animation-delay: var(--d, 0s);
}

/* Kaydırırken görünür olan bloklar için aynı hareket */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(-14px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}

.has-js [data-reveal].reveal-late {
  transition-delay: 0.09s;
}

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

/* -------------------------------------------- 15. BİLDİRİM */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-md);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* ------------------------------------------ 16. MOBİL MENÜ */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: var(--bg);
}

.drawer.is-open {
  display: block;
}

.drawer-in {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--gutter);
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--header-h) - var(--gutter) + 12px);
}

.drawer-nav {
  display: grid;
  gap: 2px;
  margin-top: var(--sp-8);
}

.drawer-link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--text);
  text-decoration: none;
}

.drawer-link span {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--accent);
}

.drawer-foot {
  margin-top: auto;
  padding-top: var(--sp-6);
}

/* ------------------------------------------- 17. DUYARLILIK */

@media (max-width: 1040px) {
  .nav {
    display: none;
  }
  .burger {
    display: inline-flex;
  }
}

@media (max-width: 900px) {
  body {
    font-size: var(--fs-base);
  }
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .job,
  .skill-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-3);
  }
  .job-body {
    padding-left: var(--sp-5);
  }
}

@media (max-width: 620px) {
  :root {
    --ring-gap: 34px;
  }
  .brand-role {
    display: none;
  }
  .hero {
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    padding-block: 40px 56px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
  }
  .social {
    grid-template-columns: 34px minmax(0, 1fr);
    row-gap: 2px;
  }
  .social-value {
    grid-column: 2;
  }
  .social-go {
    display: none;
  }
  .footer-in {
    flex-direction: column;
    align-items: flex-start;
  }
  .dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    max-height: 92dvh;
    margin: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .dialog[open] {
    animation: sheet-in 0.36s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .dialog.is-closing {
    animation: sheet-out 0.28s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }
  .dialog-in {
    max-height: 92vh;
    max-height: 92dvh;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}

@keyframes sheet-out {
  to {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------- 18. YAZDIRMA */

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --text: #000;
    --text-2: #222;
    --muted: #555;
    --line: #bbb;
    --line-2: #999;
    --accent: #0b5fb0;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.45;
  }
  .has-js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  body::before,
  .preloader,
  .header,
  .drawer,
  .hero::before,
  .hero::after,
  .hero-actions,
  .filters,
  .toast,
  .footer-right,
  .noscript,
  .top-link,
  .copy,
  .proj-open {
    display: none !important;
  }
  .section {
    padding-block: 14pt;
    break-inside: avoid;
  }
  .hero {
    min-height: 0;
    padding-block: 0 12pt;
  }
  .hero-inner {
    align-items: flex-start;
    text-align: left;
  }
  .hero-name {
    font-size: 24pt;
  }
  .proj-grid {
    grid-template-columns: 1fr 1fr;
  }
  .proj,
  .job,
  .skill-row,
  .edu-item,
  .cert-item {
    break-inside: avoid;
    box-shadow: none;
  }
  a {
    text-decoration: none;
  }
  @page {
    margin: 14mm;
  }
}
