/* Dr. Sezin Canpolat — site styles. Mobile first. */

/* Light theme: soft light blue. */
:root {
  --bg: #eaf4fc;
  --surface: #ffffff;
  --tint: #d9ebf9;
  --header: rgb(255 255 255 / 88%);
  --text: #1b2b3c;
  --muted: #546577;
  --line: #c9dcec;
  --primary: #2a78b3;
  --primary-strong: #1d5d8e;
  --accent: #e5864f;
  --on-primary: #ffffff;
  --success-bg: #e3f5e9;
  --success-text: #1f6b3a;
  --error-bg: #fdecec;
  --error-text: #a12a2a;
  --radius: 14px;
  --shadow: 0 6px 24px rgb(42 120 179 / 12%);
  --container: 1120px;
  --narrow: 760px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Dark theme: only when the visitor picks it. */
:root[data-theme="dark"] {
  --bg: #0f1720;
  --surface: #16212c;
  --tint: #121c26;
  --header: rgb(22 33 44 / 90%);
  --text: #e6edf3;
  --muted: #9aa8b6;
  --line: #26333f;
  --primary: #6bb3e6;
  --primary-strong: #93c8ee;
  --accent: #f5ad85;
  --on-primary: #0f1720;
  --success-bg: #12301f;
  --success-text: #8fd9a8;
  --error-bg: #3a1717;
  --error-text: #f2a3a3;
  --shadow: 0 6px 24px rgb(0 0 0 / 35%);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-strong); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); }

.sr-only,
.skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 8px 12px; background: var(--surface); border-radius: 8px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 8px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--text); text-decoration: none; }
.header-tools { display: flex; align-items: center; gap: 4px; }

.theme-toggle {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  color: var(--on-primary); background: var(--primary);
}
.brand-name { display: block; font-size: 1.05rem; }
.brand-tagline { display: block; font-size: .8rem; color: var(--muted); line-height: 1.3; }

.menu-toggle {
  display: grid; gap: 5px; padding: 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer;
}
.menu-bar { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; }
.main-nav a {
  display: block; padding: 12px 14px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.main-nav a:hover { background: var(--tint); }
.main-nav a[aria-current="page"] { color: var(--primary); background: var(--tint); }

@media (min-width: 860px) {
  .menu-toggle { display: none; }
  .main-nav { display: block; position: static; background: none; border: 0; box-shadow: none; }
  .main-nav ul { display: flex; gap: 4px; padding: 0; }
  .main-nav a { padding: 8px 14px; }
}

/* Buttons and notices */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 22px; border: 2px solid var(--primary); border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.button:hover { background: var(--primary-strong); border-color: var(--primary-strong); color: var(--on-primary); }
.button-ghost { background: transparent; color: var(--primary); }
.button-ghost:hover { background: var(--tint); color: var(--primary-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.notice { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; }
.notice-success { background: var(--success-bg); color: var(--success-text); }
.notice-error { background: var(--error-bg); color: var(--error-text); }
.notice ul { margin: 0; padding-left: 18px; }

/* Hero */
.hero { padding: 40px 0 24px; background: linear-gradient(180deg, var(--tint), var(--bg)); }
.hero-inner { display: grid; gap: 32px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; border-radius: 24px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }

@media (min-width: 860px) {
  .hero { padding: 72px 0 48px; }
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 56px; }
}

/* Sections */
.section { padding: 40px 0; }
.section-tint { background: var(--tint); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.page-head { margin-bottom: 24px; }

/* Page content */
.prose { overflow-wrap: anywhere; }
.prose::after { content: ""; display: table; clear: both; }
.prose p { margin: 0 0 1em; }
.prose img { border-radius: var(--radius); }
.float-photo { width: 100%; margin: 0 0 20px; box-shadow: var(--shadow); }
@media (min-width: 640px) {
  .float-photo { float: right; width: 44%; margin: 4px 0 16px 24px; }
}
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Photo grid */
.photo-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 560px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .photo-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.photo-grid a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--tint); }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.photo-grid a:hover img { transform: scale(1.04); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

/* Comments */
.count {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: .9rem; vertical-align: middle;
}
.comment-list, .comment-replies { list-style: none; margin: 0; padding: 0; }
.comment {
  margin: 0 0 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.comment p { margin: 6px 0 0; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.comment-meta time { color: var(--muted); font-size: .9rem; }
.comment-replies { margin-top: 12px; }
.comment-reply { margin: 0; border-left: 3px solid var(--primary); background: var(--tint); }
.reply-link, .reply-cancel {
  margin-top: 8px; padding: 0; border: 0; background: none;
  color: var(--primary); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}

.comment-form {
  margin-top: 32px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.comment-form h3 { margin-bottom: 4px; }
.field { display: grid; gap: 6px; margin: 16px 0; }
.field label { font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.has-error input, .has-error textarea { border-color: var(--error-text); }
.error { color: var(--error-text); }
.replying { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 10px; background: var(--tint); }
.replying[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 56px 12px;
  background: rgb(8 12 18 / 92%);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 78vh; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { margin-top: 12px; color: #e6edf3; }
.lightbox button {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 999px;
  background: rgb(255 255 255 / 12%); color: #fff; font-size: 1.6rem; cursor: pointer;
}
.lightbox button:hover { background: rgb(255 255 255 / 24%); }
.lightbox .lb-close { top: 12px; right: 12px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Footer */
.site-footer { margin-top: 40px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-inner p { margin: 0; }

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