:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #eef0f8;
  --ink: #17182b;
  --muted: #646880;
  --line: #e1e4ef;
  --primary: #3a5bff;
  --primary-ink: #ffffff;
  --primary-soft: #e8ecff;
  --accent: #ff7a59;
  --ok: #17a673;
  --ok-soft: #e2f6ee;
  --warn: #e69b00;
  --warn-soft: #fff4d9;
  --danger: #e5484d;
  --danger-soft: #fde8e9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 50, .05), 0 4px 16px rgba(20, 22, 50, .06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101120;
    --surface: #191a2e;
    --surface-2: #23243b;
    --ink: #eceefa;
    --muted: #9da1bd;
    --line: #2d2f4a;
    --primary: #6b84ff;
    --primary-soft: #252c58;
    --ok-soft: #12352a;
    --warn-soft: #3a2f10;
    --danger-soft: #3d1a1d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }

/* ---------- üst çubuk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 800;
  box-shadow: 3px 3px 0 var(--accent);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .menu-btn { display: none; }

/* ---------- yerleşim ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 60px); }
.sidebar {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
  padding: 18px 12px 40px; border-right: 1px solid var(--line); background: var(--surface);
}
.nav-group { margin-bottom: 14px; }
.nav-group-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 10px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); font-weight: 500; font-size: .93rem;
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-link .ico { width: 22px; text-align: center; }
.view { padding: 28px clamp(16px, 4vw, 44px) 80px; max-width: 1100px; width: 100%; outline: none; }
.backdrop { display: none; }

@media (max-width: 860px) {
  .topbar .menu-btn { display: inline-grid; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 60px; bottom: 0; width: 270px; z-index: 40; height: auto;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  body.nav-open .backdrop { display: block; position: fixed; inset: 60px 0 0; background: rgba(0,0,0,.3); z-index: 35; }
}

/* ---------- bileşenler ---------- */
.page-head { margin-bottom: 22px; }
.page-head p { color: var(--muted); max-width: 680px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 140px; }
.stack > * + * { margin-top: 12px; }
.spacer { flex: 1; }

label.field { display: block; }
label.field > span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { resize: vertical; min-height: 80px; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
input[type="color"] { padding: 2px; height: 40px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; border: 1.5px solid transparent;
  background: var(--primary); color: var(--primary-ink); transition: transform .05s, filter .15s, background .15s;
  white-space: nowrap; text-decoration: none !important;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--primary-soft); color: var(--primary); }
.btn.danger { background: var(--danger); }
.btn.danger-ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 1rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--surface-2); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted);
}
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }

.result {
  border-radius: var(--radius); padding: 18px 20px; background: var(--surface-2);
  border: 1.5px solid var(--line);
}
.result.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.result.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.result.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.big-num { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.result .label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; border-radius: inherit; background: var(--ok); transition: width .3s; }
.progress.warn > div { background: var(--warn); }
.progress.danger > div { background: var(--danger); }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 6px 6px; }
.tbl td { padding: 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl input, .tbl select { padding: 7px 9px; }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ico { font-size: 2rem; margin-bottom: 6px; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; flex-wrap: wrap; }
.tabs button {
  font: inherit; font-weight: 600; font-size: .88rem; border: 0; cursor: pointer; padding: 7px 14px; border-radius: 9px;
  background: transparent; color: var(--muted);
}
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ana sayfa */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 34px clamp(20px, 4vw, 40px); margin-bottom: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #6a3cff 100%); color: #fff;
}
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 8px; }
.hero p { opacity: .9; max-width: 560px; font-size: 1.05rem; }
.hero::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: var(--accent); opacity: .85;
}
.hero > * { position: relative; z-index: 1; }
.hero .btn { background: #fff; color: var(--primary); }
.tool-card {
  display: block; padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tool-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.tool-card .ico { font-size: 1.6rem; margin-bottom: 8px; }
.tool-card h3 { margin-bottom: 4px; }
.tool-card p { color: var(--muted); font-size: .88rem; margin: 0; }
.section-title { margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; }

/* liste öğeleri */
.item {
  padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.item + .item { margin-top: 10px; }
.item-head { display: flex; gap: 10px; align-items: flex-start; }
.item-title { font-weight: 700; font-size: 1.02rem; }
.item-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: .82rem; color: var(--muted); }
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(10, 12, 30, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h2 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* bildirim */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); animation: pop .2s ease; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* ders programı */
.timetable { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); min-width: 640px; }
.tt-scroll { overflow-x: auto; }
.tt-head { background: var(--surface-2); font-weight: 700; font-size: .82rem; text-align: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tt-time { font-size: .72rem; color: var(--muted); text-align: right; padding: 2px 6px; border-top: 1px dashed var(--line); }
.tt-col { position: relative; border-left: 1px solid var(--line); }
.tt-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.tt-block {
  position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 6px; font-size: .75rem; color: #fff;
  overflow: hidden; line-height: 1.25; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.tt-block b { display: block; font-size: .8rem; }
.tt-block.conflict { outline: 3px solid var(--danger); outline-offset: -1px; }

/* bilgi kartları */
.flashcard { perspective: 1000px; height: 240px; cursor: pointer; user-select: none; }
.flashcard-inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 18px; display: grid; place-items: center;
  padding: 24px; text-align: center; font-size: 1.25rem; font-weight: 600; border: 1.5px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow); overflow-y: auto;
}
.flashcard-face.back { transform: rotateY(180deg); background: var(--primary-soft); }
.choice { text-align: left; justify-content: flex-start; white-space: normal; }
.choice.correct { background: var(--ok); color: #fff; }
.choice.wrong { background: var(--danger); color: #fff; }

/* pomodoro */
.timer-ring { width: 260px; height: 260px; margin: 10px auto; position: relative; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring .t { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.timer-ring .t .big-num { font-size: 3.4rem; font-variant-numeric: tabular-nums; }

/* CV */
.cv-paper { background: #fff; color: #1a1a1a; padding: 36px 40px; border-radius: 6px; box-shadow: var(--shadow); font-size: 13px; line-height: 1.45; }
.cv-paper h1 { font-size: 26px; margin: 0; color: #111; }
.cv-paper .cv-title { color: #3a5bff; font-weight: 600; margin-top: 2px; }
.cv-paper .cv-contact { color: #555; margin-top: 6px; font-size: 12px; }
.cv-paper h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #3a5bff; border-bottom: 1.5px solid #dfe3f0; padding-bottom: 4px; margin: 18px 0 8px; }
.cv-paper .cv-item { margin-bottom: 8px; }
.cv-paper .cv-item-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.cv-paper .cv-item-sub { color: #555; }
.cv-paper .cv-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.cv-paper .cv-tags span { background: #eef1fb; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.repeat-item { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.repeat-item + .repeat-item { margin-top: 8px; }

/* yazdırma */
@media print {
  body { background: #fff; }
  .topbar, .sidebar, .no-print, .toasts { display: none !important; }
  .layout { display: block; }
  .view { padding: 0; max-width: none; }
  .print-only-area { display: block !important; }
  .cv-paper { box-shadow: none; padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .timetable { min-width: 0; }
  .grid { display: block !important; }
  .tt-scroll { overflow: visible; }
  @page { margin: 14mm; }
}
.footer-note { margin-top: 40px; font-size: .8rem; color: var(--muted); text-align: center; }

@media (max-width: 520px) { .hide-sm { display: none; } .big-num { font-size: 2.1rem; } }
