:root {
  --bg: #fafaf9;
  --bg-soft: #f2f2ef;
  --card: #ffffff;
  --text: #18181b;
  --muted: #5f5f6b;
  --line: #e6e5e1;
  --accent: #0d9488;
  --accent-2: #6366f1;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.12);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0f;
    --bg-soft: #121318;
    --card: #14161b;
    --text: #ededf0;
    --muted: #9a9aa6;
    --line: #23252c;
    --accent: #2dd4bf;
    --accent-2: #818cf8;
    --accent-soft: rgba(45, 212, 191, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0f;
  --bg-soft: #121318;
  --card: #14161b;
  --text: #ededf0;
  --muted: #9a9aa6;
  --line: #23252c;
  --accent: #2dd4bf;
  --accent-2: #818cf8;
  --accent-soft: rgba(45, 212, 191, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.55;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.logo-mark {
  display: grid; place-items: center; width: 40px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: -0.02em;
}
.logo-text { font-size: 15px; font-weight: 650; color: var(--text); letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.pill-btn, .icon-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  height: 38px; border-radius: 10px; cursor: pointer; transition: border-color 0.2s;
  display: inline-flex; align-items: center; justify-content: center;
}
.pill-btn:hover, .icon-btn:hover { border-color: var(--accent); }
.pill-btn { padding: 0 12px; font: 600 12px "JetBrains Mono", monospace; gap: 4px; }
.pill-btn span { color: var(--muted); }
.pill-btn .sep { opacity: 0.4; }
html[lang="tr"] .pill-btn [data-l="tr"], html[lang="en"] .pill-btn [data-l="en"] { color: var(--accent); }
.icon-btn { width: 38px; }
.icon-btn svg { width: 18px; height: 18px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.menu-btn { display: none; }

/* HERO */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); background: var(--card); padding: 6px 14px; border-radius: 999px; margin-bottom: 26px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
h1 { font-size: clamp(44px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.role { margin-top: 18px; font-size: 18px; font-weight: 600; }
.lead { margin-top: 12px; color: var(--muted); font-size: 16.5px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 14.5px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 10px 24px -10px var(--accent); }
.btn-ghost { border: 1px solid var(--line); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); }
.socials { display: flex; gap: 10px; margin-top: 30px; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); color: var(--muted); background: var(--card); transition: all 0.2s;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

.hero > *, .about-grid > *, .edu-grid > *, .job > *, .stats > * { min-width: 0; }
.hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; }
.photo-wrap {
  position: relative; width: 280px; max-width: 100%; border-radius: 50%; padding: 5px;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: var(--shadow);
}
.photo-wrap img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 5px solid var(--bg); display: block; }

/* STATS */
.stats { width: min(1072px, 100% - 32px); padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 92px; padding: 22px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.stat strong { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; overflow-wrap: anywhere; }
.stat span { font-size: 13.5px; color: var(--muted); }

/* SECTIONS */
.section { padding-top: 80px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 32px; }
h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.03em; font-weight: 750; }
h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.about-grid p { color: var(--muted); margin-bottom: 16px; }
.about-grid p.big { color: var(--text); font-size: 19px; line-height: 1.6; }
.competencies { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.competencies li {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px dashed var(--line); font-size: 15px;
}
.competencies li::before { content: "→"; color: var(--accent); font-family: "JetBrains Mono", monospace; }

/* TIMELINE */
.timeline { position: relative; display: flex; flex-direction: column; gap: 20px; }
.job {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 30px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); transition: border-color 0.25s, transform 0.25s;
}
.job:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.job-meta .date { font-size: 12.5px; color: var(--muted); }
.job-meta .company { font-size: 18px; font-weight: 700; margin-top: 6px; letter-spacing: -0.01em; }
.job-meta .loc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.job-body .title { font-weight: 650; color: var(--accent); margin-bottom: 12px; }
.job-body ul { padding-left: 18px; color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.job-body li::marker { color: var(--accent); }
.job-body .more { margin-top: 10px; background: none; border: none; color: var(--text); font: 600 13px "Inter", sans-serif; cursor: pointer; padding: 4px 0; }
.job-body .more:hover { color: var(--accent); }
.job-body li.hidden { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag {
  font: 500 12px "JetBrains Mono", monospace; padding: 5px 10px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
}
.tag.neutral { background: var(--bg-soft); color: var(--muted); }

/* PROJECTS */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project {
  position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.project::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0; transition: opacity 0.3s;
}
.project:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.project:hover::before { opacity: 1; }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.project-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.project-icon svg { width: 22px; height: 22px; }
.project-link { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 13px; }
.project-link:hover { color: var(--accent); }
.project h3 { font-size: 21px; margin-bottom: 8px; }
.project p { color: var(--muted); font-size: 15px; }
.project .value { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; }
.project .value b { color: var(--text); font-weight: 600; }
.project .tags { margin-top: auto; padding-top: 20px; }

/* SKILLS */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-group { padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.skill-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin-bottom: 14px; font-family: "JetBrains Mono", monospace; }
.skill-group .tags { margin-top: 0; }
.skill-group .tag { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); transition: all 0.2s; }
.skill-group .tag:hover { border-color: var(--accent); color: var(--accent); }

/* EDUCATION */
.edu-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.edu-list { display: flex; flex-direction: column; gap: 16px; }
.edu { padding: 24px 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.edu .degree { font-weight: 650; }
.edu .school { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.edu .note { color: var(--muted); font-size: 13px; margin-top: 6px; font-style: italic; }
.edu .side { text-align: right; flex-shrink: 0; }
.edu-project { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.edu-project .label { font-size: 12.5px; color: var(--muted); }
.edu-project .label a { color: var(--accent); font-weight: 600; }
.edu-project .label strong { color: var(--text); font-weight: 600; }
.edu-project .label a:hover { text-decoration: underline; }
.edu-project ul { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.edu-project li { font-size: 14px; color: var(--muted); line-height: 1.6; }
.edu .side .date { font-size: 12.5px; color: var(--muted); }
.edu .gpa { display: inline-block; margin-top: 8px; }
.cert-box { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.cert-box h3 { margin-bottom: 14px; }
.cert-box h3.mt { margin-top: 26px; }
.cert-box ul { list-style: none; display: flex; flex-direction: column; }
.cert-box li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.cert-box li:last-child { border-bottom: none; }
.cert-box li small { display: block; color: var(--muted); font-size: 12.5px; }
.cert-box li .yr { color: var(--muted); font-size: 12px; white-space: nowrap; }
.langs { display: flex; flex-direction: column; gap: 12px; }
.lang-row { font-size: 14px; }
.lang-row .bar { height: 6px; border-radius: 6px; background: var(--bg-soft); margin-top: 6px; overflow: hidden; }
.lang-row .bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lang-row .lvl { color: var(--muted); float: right; font-size: 12.5px; }

/* CONTACT */
.contact-card {
  text-align: center; padding: 48px 32px; border-radius: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(600px 240px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--card);
}
.contact-card h2 { margin: 0 0 12px; }
.contact-card > p { color: var(--muted); max-width: 520px; margin: 0 auto; }
.mail { display: inline-block; margin-top: 22px; font-size: clamp(13px, 2.4vw, 17px); color: var(--accent); word-break: break-all; }
.mail:hover { text-decoration: underline; }
.contact-card .loc { margin-top: 26px; color: var(--muted); font-size: 13px; }

.footer { display: flex; justify-content: center; text-align: center; gap: 12px; flex-wrap: wrap; padding-top: 56px; padding-bottom: 40px; color: var(--muted); font-size: 12.5px; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* CARD HOVER (after .reveal so the lift isn't overridden) */
.stat, .skill-group, .edu, .cert-box, .contact-card { transition: opacity 0.7s ease, transform 0.25s ease, border-color 0.25s, box-shadow 0.25s; }
.stat:hover, .skill-group:hover, .edu:hover, .cert-box:hover, .contact-card:hover {
  transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow);
}
.project:hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; }
  .about-grid, .edu-grid { grid-template-columns: 1fr; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .job { grid-template-columns: 1fr; gap: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:last-child { grid-column: 1 / -1; }
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 12px 16px 18px;
    background: var(--bg); border-bottom: 1px solid var(--line); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}
@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .hero { padding-bottom: 48px; }
  .logo-text { display: none; }
  .projects, .skills { grid-template-columns: 1fr; }
  .stat { min-height: 76px; padding: 18px 12px; }
  .stat strong { font-size: 17px; }
  .section { padding-top: 56px; }
  .job, .project { padding: 22px; }
  .edu { flex-direction: column; }
  .edu .side { text-align: left; }
  .photo-wrap { width: 220px; }
  .contact-card { padding: 40px 20px; }
}
