/* ==========================================================================
   Mustafa — kişisel site
   Tasarım konsepti: koyu zeminli, kalın tipografili, minimalist "founder portfolio" estetiği.
   Inter (başlık + gövde) + JetBrains Mono (etiket/teknik taraf)
   ========================================================================== */

/* Dark is the default identity now — light is the explicit opt-out. */
:root {
  --paper: #0A0A0B;
  --paper-raised: #151517;
  --ink: #F7F7F8;
  --ink-soft: rgba(247, 247, 248, .68);
  --ink-faint: rgba(247, 247, 248, .44);
  --line: rgba(247, 247, 248, .12);
  --line-strong: rgba(247, 247, 248, .24);
  --accent: #5EB6EA;
  --accent-strong: #8ED0F5;
  --accent-2: #F0A94E;
  --accent-soft: rgba(94, 182, 234, .14);
  --accent-2-soft: rgba(240, 169, 78, .14);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .75);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --paper: #F5F5F3;
    --paper-raised: #FFFFFF;
    --ink: #14141A;
    --ink-soft: rgba(20, 20, 26, .66);
    --ink-faint: rgba(20, 20, 26, .44);
    --line: rgba(20, 20, 26, .12);
    --line-strong: rgba(20, 20, 26, .26);
    --accent: #1C6FA8;
    --accent-strong: #114F7C;
    --accent-2: #B0651F;
    --accent-soft: rgba(28, 111, 168, .10);
    --accent-2-soft: rgba(176, 101, 31, .12);
    --shadow: 0 24px 48px -28px rgba(16, 26, 43, .18);
  }
}

:root[data-theme="light"] {
  --paper: #F5F5F3;
  --paper-raised: #FFFFFF;
  --ink: #14141A;
  --ink-soft: rgba(20, 20, 26, .66);
  --ink-faint: rgba(20, 20, 26, .44);
  --line: rgba(20, 20, 26, .12);
  --line-strong: rgba(20, 20, 26, .26);
  --accent: #1C6FA8;
  --accent-strong: #114F7C;
  --accent-2: #B0651F;
  --accent-soft: rgba(28, 111, 168, .10);
  --accent-2-soft: rgba(176, 101, 31, .12);
  --shadow: 0 24px 48px -28px rgba(16, 26, 43, .18);
}

/* ---- Reset & base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- Motion: entrance + scroll reveal ----------------------------------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.hero-content { animation: fade-up .7s cubic-bezier(.16,1,.3,1) both; }
.hero-photo   { animation: fade-up .7s cubic-bezier(.16,1,.3,1) .12s both; }

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

/* Smooth color crossfade on theme toggle for raised surfaces */
.site-nav, .theme-toggle, .nav-toggle, .status-chip,
.skills-panel, .chip, .status-pill, .contact-links a {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  text-wrap: balance;
  margin: 0;
  font-weight: 800;
  letter-spacing: -.02em;
}

p { margin: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Layout ------------------------------------------------------------ */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  section { padding: 64px 0; }
}

/* ---- Section eyebrow (§ numbering — reflects real doc/nav structure) --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.eyebrow::before { content: '§'; color: var(--ink-faint); }

/* ---- Nav ---------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.wordmark .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.theme-toggle svg { width: 16px; height: 16px; }
/* Dark is the default identity, so the moon shows by default. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---- Mobile nav ---------------------------------------------------------- */
@media (max-width: 760px) {
  .site-nav .wrap { position: relative; }
  .nav-toggle { display: flex; }
  .nav-toggle svg { transition: transform .3s ease; }
  .nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0 18px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .35s cubic-bezier(.16,1,.3,1), opacity .25s ease, padding .35s ease, visibility 0s linear .35s;
  }
  .nav-links.is-open {
    max-height: 400px;
    opacity: 1;
    padding: 6px 18px 12px;
    visibility: visible;
    transition: max-height .35s cubic-bezier(.16,1,.3,1), opacity .3s ease, padding .35s ease;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-links li:last-child a { border-bottom: none; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  padding: 96px 0 80px;
}
.hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-content { flex: 1 1 420px; min-width: 0; }
.hero-photo { flex: 0 0 auto; position: relative; }
.hero-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: var(--paper-raised);
  filter: grayscale(1) contrast(1.05);
  transition: filter .35s ease;
}
.hero-photo:hover img { filter: grayscale(0) contrast(1); }
.photo-badge {
  position: absolute;
  right: -14px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.photo-badge-label {
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.photo-badge strong {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
@media (max-width: 760px) {
  .hero-grid { flex-direction: column-reverse; text-align: left; gap: 28px; }
  .hero-photo img { width: 132px; height: 132px; }
  .photo-badge { right: -8px; bottom: -4px; padding: 8px 12px; }
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.08;
}
.hero .lede {
  margin-top: 22px;
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: var(--paper-raised);
  font-size: 13px;
}
.status-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-soft);
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.stat-row {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 5px; }
.stat-num {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.stat-label {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-faint);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent-strong); color: var(--paper); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- About / skills ------------------------------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 56px;
}
@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
.about-grid h2 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 18px; }
.about-grid .bio { font-size: 16.5px; color: var(--ink-soft); line-height: 1.75; }
.about-grid .bio + .bio { margin-top: 14px; }

.skills-panel {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 12px;
  padding: 22px;
}
.skills-panel .panel-label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
  display: block;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--ink-soft);
}

/* ---- Project cards -------------------------------------------------------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.section-head .see-all {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 12px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .2s ease, transform .25s ease, box-shadow .25s ease;
}
.project-card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card.placeholder:hover { transform: none; box-shadow: none; }
.project-card .row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.project-card h3 { font-size: 21px; font-weight: 700; }
.status-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.status-pill.active { background: var(--accent-2-soft); color: var(--accent-2); }
.status-pill.done { background: var(--accent-soft); color: var(--accent); }

.project-card .desc { color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.project-card .tags {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px;
}
.project-card .tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--ink-soft);
}
.project-card .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-faint);
}

.project-card .site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 2px;
}
.project-card .site-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.project-card .site-links a:hover {
  color: var(--accent-strong);
  border-bottom-color: var(--accent-strong);
}

.project-card.placeholder {
  border-style: dashed;
  background: transparent;
  align-items: flex-start;
  color: var(--ink-faint);
  justify-content: center;
  min-height: 140px;
}
.project-card.placeholder .desc { color: var(--ink-faint); font-style: italic; }

/* ---- Post list (seminerler) ------------------------------------------------ */
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.post-list > :first-child { border-top: none; }
.post-row { transition: transform .2s ease, border-color .3s ease; }
.post-row .post-title { font-family: 'Inter', sans-serif; font-size: 19px; font-weight: 700; transition: color .2s ease; }
.post-row .post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
  flex: 0 0 auto;
}
.post-row:hover { transform: translateX(4px); }
.post-row:hover .post-title { color: var(--accent); }

/* ---- Contact / footer -------------------------------------------------- */
.contact-block { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.contact-block h2 { font-size: clamp(26px, 3.6vw, 34px); max-width: 20ch; }
.contact-links { display: flex; gap: 18px; flex-wrap: wrap; }
.contact-links a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.site-footer .wrap {
  max-width: 980px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
}
