/* ---------- Tasarım değerleri ---------- */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .08);
  --accent: #0071e3;
  --accent-text: #fff;
  --glass: rgba(251, 251, 253, .72);
  --shadow: 0 8px 30px rgba(0, 0, 0, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.28, .11, .32, 1);
}
[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #121214;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, .12);
  --accent: #2997ff;
  --accent-text: #000;
  --glass: rgba(22, 22, 24, .72);
  --shadow: 0 8px 30px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
ul, ol { list-style: none; }

/* ---------- Gezinme çubuğu ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 10; padding: 12px 16px; display: flex; justify-content: center; }
.nav__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 20px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--line);
  border-radius: 999px;
  max-width: 100%;
}
.nav__brand { padding: 8px 14px; color: var(--text); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; transition: opacity .2s; }
.nav__brand:hover { opacity: .7; }
.nav__list { display: flex; gap: 2px; }
.nav__link { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.nav__link:hover { color: var(--text); }
.nav__link.active { color: var(--text); background: var(--surface-2); }

/* ---------- Sayfalar (data-page) ---------- */
main { max-width: 980px; margin: 0 auto; padding: 120px 24px 60px; min-height: 100vh; }
.page { display: none; }
.page.active { display: block; animation: gecis .6s var(--ease); }
@keyframes gecis { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Tipografi ---------- */
h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.page__title { font-size: clamp(2.2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); letter-spacing: -.02em; margin: 72px 0 24px; }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 40em; margin-top: 16px; }

/* ---------- Ana Sayfa ---------- */
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 32px 0 24px; }
.hero__photo { width: 180px; height: 180px; flex: 0 0 180px; border-radius: 50%; object-fit: cover; margin-bottom: 32px; box-shadow: var(--shadow); }
.hero .lead { margin-inline: auto; }
.hero__actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.btn { padding: 12px 24px; border-radius: 999px; font-weight: 500; transition: transform .2s var(--ease), opacity .2s; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { opacity: .88; }
.btn--primary:disabled { opacity: .35; cursor: not-allowed; }
.btn--ghost { color: var(--accent); }
.btn--ghost:hover { background: var(--surface-2); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 72px; text-align: center; }
.stats strong { display: block; font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.03em; }
.stats span { color: var(--muted); font-size: 14px; }

/* ---------- Kartlar ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin-top: 8px; font-size: .95rem; }
.about-copy { max-width: 760px; margin-top: 40px; padding: clamp(24px, 5vw, 48px); border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.about-copy h2 { margin: 0 0 24px; }
.about-copy p { color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.15rem); line-height: 1.8; }
.about-copy p + p { margin-top: 18px; }

/* ---------- Deneyim ---------- */
.timeline { margin-top: 48px; border-left: 2px solid var(--line); padding-left: 28px; display: grid; gap: 36px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -35px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline time { color: var(--muted); font-size: 14px; }
.timeline p { color: var(--muted); margin-top: 4px; max-width: 38em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span, .chip { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.chips span { display: inline-flex; align-items: center; gap: 10px; }
.chips img { width: 24px; height: 24px; object-fit: contain; }

/* ---------- Hedeflerim ---------- */
.goals-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.goal-card { position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.goal-card__number { display: block; margin-bottom: 18px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.goal-card h3 { position: relative; font-size: 1.2rem; }
.goal-card p { position: relative; margin-top: 10px; color: var(--muted); }

/* ---------- Projeler ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 32px 0 28px; }
.chip { color: var(--muted); transition: all .2s; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.project { display: none; }
.project.active { display: block; animation: gecis .5s var(--ease); }
.project-link { display: block; color: inherit; text-decoration: none; }
.project-link:focus-visible { border-radius: 8px; }
.thumb { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 24px; margin-bottom: 14px; object-fit: cover; transition: transform .4s var(--ease); }
.thumb.t7 { object-fit: contain; background: var(--surface-2); }
.project:hover .thumb { transform: scale(1.02); }
.project p { color: var(--muted); font-size: 14px; }
.t1 { background: linear-gradient(135deg, #5ac8fa, #007aff); }
.t2 { background: linear-gradient(135deg, #ff9f0a, #ff375f); }
.t3 { background: linear-gradient(135deg, #bf5af2, #5e5ce6); }
.t4 { background: linear-gradient(135deg, #30d158, #0a84ff); }
.t5 { background: linear-gradient(135deg, #ff453a, #ff9f0a); }
.t6 { background: linear-gradient(135deg, #64d2ff, #bf5af2); }

/* ---------- Form ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); gap: 32px; align-items: start; margin-top: 40px; }
.form { display: grid; gap: 20px; min-width: 0; }
.form label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.form input, .form textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text); resize: vertical; transition: border-color .2s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.form .btn { justify-self: start; }
.form__status { color: var(--accent); min-height: 1.5em; }
.social-panel { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.social-panel h2 { margin: 0; font-size: 1.4rem; }
.social-panel > p { margin-top: 8px; color: var(--muted); }
.social-list { display: grid; gap: 12px; margin-top: 24px; }
.social-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-weight: 500; }
.social-item a { color: var(--text); text-decoration: none; font-weight: inherit; }
.social-item img { width: 36px; height: 36px; object-fit: contain; }
html[data-theme="light"] [data-page="iletisim"] .lead,
html[data-theme="light"] [data-page="iletisim"] .form label { color: #3f4248; }
html[data-theme="light"] [data-page="iletisim"] .form input,
html[data-theme="light"] [data-page="iletisim"] .form textarea { background: #fff; border-color: #aeb4bd; color: #1d1d1f; }
html[data-theme="light"] [data-page="iletisim"] .form input:focus,
html[data-theme="light"] [data-page="iletisim"] .form textarea:focus { border-color: #005bb5; box-shadow: 0 0 0 4px rgba(0, 91, 181, .18); }
html[data-theme="light"] [data-page="iletisim"] .social-panel { border-color: #d0d4da; box-shadow: 0 10px 30px rgba(0, 0, 0, .1); }
html[data-theme="light"] [data-page="iletisim"] .social-panel > p { color: #50545b; }
html[data-theme="light"] [data-page="iletisim"] .social-item { background: #f0f2f5; border: 1px solid #d7dbe0; }

/* ---------- Fotoğraf galerisi ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; align-items: start; }
.gallery-item { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.gallery-item:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, .14); }
.gallery-item:focus-visible { outline-offset: 4px; }
.gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface-2); }
.gallery-item span { display: block; padding: 12px 16px; font-size: 14px; font-weight: 500; }
.gallery-preview { display: none; position: fixed; z-index: 20; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 76vw; max-height: 76vh; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 60px rgba(0, 0, 0, .3); }
.gallery-preview.is-visible { display: block; }
.gallery-preview img { display: block; max-width: 74vw; max-height: 72vh; width: auto; height: auto; border-radius: 12px; object-fit: contain; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 32px 24px 48px; border-top: 1px solid var(--line); }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .goals-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { padding: 8px; }
  .nav__bar { width: 100%; min-width: 0; justify-content: space-between; gap: 4px; padding: 4px 6px; }
  .nav__list { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav__list::-webkit-scrollbar { display: none; }
  .nav__list li { flex: 0 0 auto; }
  .nav__brand, .nav__link { padding: 8px; font-size: 12px; white-space: nowrap; }
  main { padding-top: 100px; }
}
@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-preview { max-width: 90vw; max-height: 72vh; }
  .gallery-preview img { max-width: 88vw; max-height: 68vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   TEMA ANAHTARI (güneş / ay)
   ========================================================= */

/* Sayfa ilk açılırken butonun dönme animasyonu oynamasın */
.tema-yukleniyor .theme-switch *,
.tema-yukleniyor .theme-switch *::before,
.tema-yukleniyor .theme-switch *::after {
  animation: none !important;
  transition: none !important;
}

.theme-toggle-wrapper {
  align-items: center;
  width: 60px;
  height: 34px;
  display: inline-flex;
  user-select: none;
  flex-shrink: 0;
}

.theme-switch {
  width: 60px;
  height: 34px;
  display: inline-block;
  position: relative;
  margin: 0;              /* bootstrap label boşluğunu sıfırla */
  font-weight: normal;
}

.theme-switch input {
  display: block;         /* style.css'teki "nav input {display:none}" kuralını ez */
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  position: absolute;
}

.theme-switch .slider {
  cursor: pointer;
  z-index: 0;
  background-color: #2196f3;
  transition: .4s;
  position: absolute;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  overflow: hidden;
}

.theme-switch input:checked + .slider { background-color: #000; }

.theme-switch input:focus-visible + .slider {
  outline: 2px solid rgba(33, 150, 243, .55);
  outline-offset: 2px;
}

.theme-switch .slider.round { border-radius: 34px; }

.theme-switch .sun-moon {
  background-color: #ff0;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  transition: .4s;
  position: absolute;
  bottom: 4px;
  left: 4px;
}

.theme-switch input:checked + .slider .sun-moon {
  background-color: #fff;
  transform: translateX(26px);
  animation: theme-rotate-center .6s ease-in-out both;
}

.theme-switch .moon-dot,
.theme-switch .light-ray,
.theme-switch .cloud-dark,
.theme-switch .cloud-light,
.theme-switch .star {
  display: block;
  position: absolute;
}

.theme-switch .moon-dot { opacity: 0; fill: gray; transition: .4s; }
.theme-switch input:checked + .slider .moon-dot { opacity: 1; }

.theme-switch #moon-dot-1 { z-index: 4; width: 6px;  height: 6px;  top: 3px;  left: 10px; }
.theme-switch #moon-dot-2 { z-index: 4; width: 10px; height: 10px; top: 10px; left: 2px; }
.theme-switch #moon-dot-3 { z-index: 4; width: 3px;  height: 3px;  top: 18px; left: 16px; }

.theme-switch .light-ray { z-index: -1; fill: #fff; opacity: .1; }
.theme-switch #light-ray-1 { width: 43px; height: 43px; top: -8px;  left: -8px; }
.theme-switch #light-ray-2 { width: 55px; height: 55px; top: -50%; left: -50%; }
.theme-switch #light-ray-3 { width: 60px; height: 60px; top: -18px; left: -18px; }

.theme-switch .cloud-dark,
.theme-switch .cloud-light {
  animation-name: theme-cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
}
.theme-switch .cloud-dark  { fill: #ccc; animation-delay: 1s; }
.theme-switch .cloud-light { fill: #eee; }

.theme-switch #cloud-1 { width: 40px; top: 15px; left: 30px; }
.theme-switch #cloud-2 { width: 20px; top: 10px; left: 44px; }
.theme-switch #cloud-3 { width: 30px; top: 24px; left: 18px; }
.theme-switch #cloud-4 { width: 40px; top: 18px; left: 36px; }
.theme-switch #cloud-5 { width: 20px; top: 14px; left: 48px; }
.theme-switch #cloud-6 { width: 30px; top: 26px; left: 22px; }

.theme-switch .stars {
  opacity: 0;
  transition: .4s;
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: translateY(-32px);
}
.theme-switch input:checked + .slider .stars { opacity: 1; transform: translateY(0); }

.theme-switch .star {
  fill: #fff;
  transition: .4s;
  animation-name: theme-star-twinkle;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}
.theme-switch #star-1 { width: 20px; top: 2px;  left: 3px;  animation-delay: .3s; }
.theme-switch #star-2 { width: 6px;  top: 16px; left: 3px; }
.theme-switch #star-3 { width: 12px; top: 20px; left: 10px; animation-delay: .6s; }
.theme-switch #star-4 { width: 18px; top: 0;    left: 18px; animation-delay: 1.3s; }

@keyframes theme-rotate-center {
  0%   { transform: translateX(26px) rotate(0deg); }
  100% { transform: translateX(26px) rotate(360deg); }
}
@keyframes theme-cloud-move {
  0%, 100% { transform: translateX(0); }
  40% { transform: translateX(4px); }
  80% { transform: translateX(-4px); }
}
@keyframes theme-star-twinkle {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.2); }
  80% { transform: scale(.8); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-switch .sun-moon, .theme-switch .slider, .theme-switch .stars,
  .theme-switch .star, .theme-switch .cloud-dark, .theme-switch .cloud-light {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .theme-toggle-wrapper { transform: scale(.8); transform-origin: right center; margin-left: -8px; }
}
