/* ---------- tokens ---------- */
:root {
  --bg: #f6f8fb;
  --bg-alt: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --text: #0f172a;
  --muted: #5b6678;
  --border: #e2e8f0;
  --accent: #0e7c86;
  --accent-2: #1f3a5f;
  --accent-soft: rgba(14, 124, 134, .1);
  --grad: linear-gradient(120deg, #0e7c86 0%, #2563eb 100%);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
  --radius: 18px;
  --code-bg: #0f172a;
  --header-bg: rgba(246, 248, 251, .8);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --bg-alt: #0e1628; --surface: #111a2e; --surface-2: #16213a;
    --text: #e6ebf5; --muted: #95a1b8; --border: #22304b;
    --accent: #2dd4bf; --accent-2: #93c5fd; --accent-soft: rgba(45, 212, 191, .12);
    --grad: linear-gradient(120deg, #2dd4bf 0%, #60a5fa 100%);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --shadow-lg: 0 20px 50px rgba(0,0,0,.45);
    --code-bg: #060b16; --header-bg: rgba(11, 18, 32, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --bg-alt: #0e1628; --surface: #111a2e; --surface-2: #16213a;
  --text: #e6ebf5; --muted: #95a1b8; --border: #22304b;
  --accent: #2dd4bf; --accent-2: #93c5fd; --accent-soft: rgba(45, 212, 191, .12);
  --grad: linear-gradient(120deg, #2dd4bf 0%, #60a5fa 100%);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.45);
  --code-bg: #060b16; --header-bg: rgba(11, 18, 32, .75);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b { font-weight: 700; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.container { width: min(1140px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ic { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-sm .ic { width: 16px; height: 16px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
.ic-moon { display: none; }
:root[data-theme="dark"] .ic-sun { display: none; }
:root[data-theme="dark"] .ic-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic-sun { display: none; }
  :root:not([data-theme="light"]) .ic-moon { display: block; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: .85rem; letter-spacing: .02em;
}
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; transition: color .2s, background .2s; }
.nav a:hover, .nav a.is-active { color: var(--text); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.show-sm { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 700px; pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .85rem; font-weight: 600;
}
.eyebrow .ic { width: 15px; height: 15px; color: var(--accent); }
.hero h1 { margin-top: 22px; font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; }
.hero-role { margin-top: 14px; font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 700; color: var(--accent-2); }
.hero-role .sep { margin: 0 10px; color: var(--muted); opacity: .5; }
.hero-lead { margin-top: 14px; max-width: 34em; font-size: 1.075rem; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.socials { display: flex; gap: 10px; margin-top: 26px; }
.socials.center { justify-content: center; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: color .2s, border-color .2s, transform .2s;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.hero-visual { position: relative; justify-self: center; width: min(380px, 100%); }
.portrait { position: relative; border-radius: 32px; padding: 6px; background: var(--grad); box-shadow: var(--shadow-lg); transform: rotate(2deg); }
.portrait img { border-radius: 26px; aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; transform: rotate(-2deg); }
.code-card {
  position: absolute; left: -48px; bottom: -34px; width: 280px; max-width: 85%;
  background: var(--code-bg); color: #cbd5e1; border-radius: 16px; padding: 14px 16px 16px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.06);
}
.code-dots { display: flex; gap: 6px; margin-bottom: 10px; }
.code-dots i { width: 9px; height: 9px; border-radius: 50%; background: #334155; }
.code-dots i:first-child { background: #f87171; } .code-dots i:nth-child(2) { background: #fbbf24; } .code-dots i:last-child { background: #34d399; }
.code-card pre { margin: 0; font: 400 .72rem/1.6 "JetBrains Mono", ui-monospace, monospace; white-space: pre; overflow: hidden; }
.code-card .k { color: #c084fc; } .code-card .s { color: #5eead4; } .code-card .n { color: #fbbf24; } .code-card .c { color: #64748b; }

.stats {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 72px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stats li { padding: 22px 24px; }
.stats li + li { border-left: 1px solid var(--border); }
.stats strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.stats span { color: var(--muted); font-size: .9rem; font-weight: 600; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.kicker { font: 500 .8rem/1 "JetBrains Mono", monospace; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.section-head h2 { margin-top: 12px; font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 800; }
.section-sub { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.h-sm { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 14px; }
.h-sm .ic { color: var(--accent); }

/* about */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.about-text { font-size: 1.1rem; color: var(--muted); }
.focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.focus-card h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.focus-card p { color: var(--muted); font-size: .94rem; }
.focus-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
.focus-ic .ic { width: 22px; height: 22px; }

/* timeline */
.timeline { position: relative; display: grid; gap: 20px; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--border)); border-radius: 2px; }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -32px; top: 28px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-alt); border: 3px solid var(--accent); }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; }
.tl-head h3 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.role { color: var(--accent); font-weight: 700; font-size: .95rem; margin-top: 4px; }
.tl-head time { font: 500 .8rem/1.4 "JetBrains Mono", monospace; color: var(--muted); background: var(--surface-2); padding: 6px 10px; border-radius: 8px; }
.badge { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 8px; border-radius: 999px; }
.bullets { display: grid; gap: 8px; margin-top: 16px; }
.bullets li { position: relative; padding-left: 20px; color: var(--muted); }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 8px; height: 2px; background: var(--accent); border-radius: 2px; }
details { margin-top: 8px; }
details summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: .9rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; font-family: "JetBrains Mono", monospace; }
details[open] summary::before { content: "−"; }
details .bullets { margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags li { font: 500 .75rem/1 "JetBrains Mono", monospace; padding: 6px 9px; border-radius: 8px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.interns { margin-top: 24px; padding-left: 32px; }

/* projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.project { display: flex; flex-direction: column; gap: 12px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.project-meta { font: 500 .78rem/1 "JetBrains Mono", monospace; color: var(--accent); }
.project h3 { margin-top: 8px; font-size: 1.25rem; }
.project > p { color: var(--muted); font-size: .95rem; }
.project .tags { margin-top: auto; padding-top: 6px; }
.project footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px dashed var(--border); padding-top: 14px; }
.note { font-size: .82rem; color: var(--muted); font-weight: 600; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--accent); white-space: nowrap; }
.card-link .ic { width: 15px; height: 15px; }
.card-link.is-private { color: var(--muted); }

/* skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.skill-group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-weight: 600; font-size: .88rem; }

/* certs */
.cert-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.edu { display: flex; gap: 16px; align-items: flex-start; }
.edu h3 { font-size: 1.1rem; }
.edu p { color: var(--muted); margin-top: 4px; }
.langs { display: grid; gap: 8px; }
.langs li { display: flex; justify-content: space-between; gap: 12px; }
.langs span { color: var(--muted); }
.cert-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.cert-list li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cert-name { font-weight: 600; font-size: .92rem; line-height: 1.35; }
.cert-org { color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* contact */
.cta {
  text-align: center; padding: 64px 32px; border-radius: 28px; border: 1px solid var(--border);
  background: radial-gradient(120% 120% at 50% 0%, var(--accent-soft), transparent 60%), var(--surface); box-shadow: var(--shadow);
}
.cta h2 { margin-top: 12px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
.cta > p { margin: 14px auto 0; max-width: 34em; color: var(--muted); }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* footer */
.site-footer { padding: 28px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); padding-top: 24px; }
.site-footer a:hover { color: var(--accent); }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .project, .socials a { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .cert-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; width: min(300px, 80%); margin-bottom: 24px; }
  .code-card { left: auto; right: -24px; bottom: -28px; width: 240px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 860px) {
  .show-sm { display: inline-grid; }
  .hide-sm { display: none; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; margin: 0; }
  .nav ul {
    display: none; flex-direction: column; gap: 2px; margin: 0 16px; padding: 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
  }
  .nav ul.is-open { display: flex; }
  .nav a { padding: 12px 14px; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding-top: 40px; }
  .focus-grid, .cert-list { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .timeline { padding-left: 24px; }
  .tl-dot { left: -24px; }
  .timeline::before { left: 3px; }
  .interns { padding-left: 0; }
  .project-grid { grid-template-columns: 1fr; }
  .code-card { display: none; }
  .cta { padding: 44px 20px; }
  .footer-inner { flex-direction: column; }
}

/* ---------- ince ayarlar ---------- */
.nowrap { white-space: nowrap; }
.chips li.chip-main { background: var(--text); color: var(--bg); }
.code-card { width: 300px; }
@media (max-width: 980px) { .code-card { width: 250px; } }

/* ---------- dil düğmesi & destek ---------- */
.lang-btn { display: inline-flex; align-items: center; width: auto; padding: 0 10px; gap: 6px; font-weight: 800; font-size: .8rem; letter-spacing: .04em; }
.lang-btn .ic { width: 16px; height: 16px; }
.support {
  display: flex; align-items: center; gap: 20px; margin-top: 20px; padding: 22px 26px;
  border-radius: var(--radius); border: 1px dashed var(--border); background: var(--surface);
}
.support-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #ffdd00; color: #0f172a; flex: none; }
.support-ic .ic { width: 24px; height: 24px; }
.support-copy { flex: 1; }
.support-copy h3 { font-size: 1.05rem; }
.support-copy p { color: var(--muted); font-size: .94rem; margin-top: 2px; }
.btn-coffee { background: #ffdd00; color: #0f172a; box-shadow: var(--shadow); white-space: nowrap; }
.btn-coffee:hover { box-shadow: var(--shadow-lg); }
.footer-links { display: flex; gap: 20px; align-items: center; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; }
.footer-links .ic { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .support { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; }
}
