:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #111111;
  --bg-elevated: #1a1a1a;
  --border: #1a1a1a;
  --border-hover: #2a2a2a;
  --accent: #ff9f43;
  --accent-hover: #ffb066;
  --accent-dim: rgba(255, 159, 67, 0.12);
  --text-primary: #d4d4d4;
  --text-secondary: #888888;
  --text-muted: #555555;
  --success: #4ade80;
  --success-dim: rgba(74, 222, 128, 0.12);
  --warning: #fbbf24;
  --danger: #f87171;
  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

.light {
  --bg-primary: #fafafa;
  --bg-secondary: #f0f0f0;
  --bg-card: #ffffff;
  --bg-elevated: #e8e8e8;
  --border: #e0e0e0;
  --border-hover: #cccccc;
  --accent: #e67e22;
  --accent-hover: #d35400;
  --accent-dim: rgba(230, 126, 34, 0.10);
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --success-dim: rgba(74, 222, 128, 0.10);
  --purple-dim: rgba(167, 139, 250, 0.10);
}

@media (prefers-color-scheme: light) {
  :root:not(.dark) {
    --bg-primary: #fafafa;
    --bg-secondary: #f0f0f0;
    --bg-card: #ffffff;
    --bg-elevated: #e8e8e8;
    --border: #e0e0e0;
    --border-hover: #cccccc;
    --accent: #e67e22;
    --accent-hover: #d35400;
    --accent-dim: rgba(230, 126, 34, 0.10);
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --success-dim: rgba(74, 222, 128, 0.10);
    --purple-dim: rgba(167, 139, 250, 0.10);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ─── Scroll Progress Bar ─── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 200;
  width: 0%;
  transition: width 50ms linear;
}

/* ─── Navigation ─── */
nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  transition: box-shadow .2s;
}
nav.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,.3);
}
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .logo {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient, linear-gradient(135deg, #ff9f43, #a78bfa));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

/* ─── Theme Toggle ─── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all .2s;
}
.theme-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ─── Language Toggle ─── */
.lang-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.lang-toggle a {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .2s;
}
.lang-toggle a.active {
  background: var(--accent);
  color: #fff;
}
.lang-toggle a:not(.active):hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ─── Hamburger ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

[lang="tr"] { display: none; }
body.lang-tr [lang="en"] { display: none; }
body.lang-tr [lang="tr"] { display: revert; }

/* ─── Hero ─── */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, var(--accent-dim) 0%, transparent 60%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, #ff9f43, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.badges img { height: 28px; border-radius: 4px; }

.btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  border: 1px solid var(--border);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: var(--text-muted); transform: translateY(-1px); }

/* ─── Stats ─── */
.stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.stat { text-align: center; }
.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff9f43, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* ─── Sections ─── */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.section h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}
.section .subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* ─── Cards Grid ─── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.icon-core { background: var(--accent-dim); color: var(--accent); }
.icon-ai { background: var(--purple-dim); color: var(--purple); }
.icon-cloud { background: var(--success-dim); color: var(--success); }
.icon-frontend { background: rgba(251, 191, 36, .12); color: var(--warning); }
.icon-mobile { background: var(--success-dim); color: var(--success); }
.icon-security { background: rgba(248, 113, 113, .12); color: var(--danger); }

/* ─── Terminal ─── */
.terminal {
  background: #000000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.terminal-header {
  background: var(--bg-secondary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.terminal-dot.red { background: var(--danger); }
.terminal-dot.yellow { background: var(--warning); }
.terminal-dot.green { background: var(--success); }
.terminal-body {
  padding: 20px;
  overflow-x: auto;
  position: relative;
}
.terminal-body pre {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-primary);
}
.terminal-body code { font-family: inherit; }
.terminal .comment { color: var(--text-muted); }
.terminal .success { color: var(--success); }
.terminal .prompt { color: var(--accent); }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.terminal-body:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: var(--border); color: var(--text-primary); }
.copy-btn.copied { background: var(--success-dim); color: var(--success); border-color: var(--success); }

/* ─── Category Table ─── */
.cat-table {
  width: 100%;
  border-collapse: collapse;
}
.cat-table th, .cat-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.cat-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cat-table td { color: var(--text-primary); }
.cat-table td:last-child { color: var(--text-secondary); font-size: 13px; }
.cat-table tr:hover td { background: rgba(255,255,255,.015); }
.cat-table .cat-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.tag-core { background: var(--accent-dim); color: var(--accent); }
.tag-ai { background: var(--purple-dim); color: var(--purple); }
.tag-cloud { background: var(--success-dim); color: var(--success); }
.tag-frontend { background: rgba(251,191,36,.12); color: var(--warning); }
.tag-mobile { background: var(--success-dim); color: var(--success); }
.tag-security { background: rgba(248,113,113,.12); color: var(--danger); }
.tag-testing { background: rgba(136,136,136,.12); color: var(--text-secondary); }
.tag-content { background: rgba(251,191,36,.12); color: var(--warning); }

/* ─── FAQ Accordion ─── */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .2s;
}
.faq-question:hover { background: var(--bg-elevated); }
.faq-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 20px 16px;
}
.faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Back to Top ─── */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .3s, transform .3s, background .2s;
  z-index: 90;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover { background: var(--accent-hover); }

/* ─── Scroll Animations ─── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { color: var(--accent-hover); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  nav { position: relative; }

  .stats { flex-wrap: wrap; gap: 24px; }
  .stat-value { font-size: 24px; }
  .hero { padding: 64px 0 32px; }
  .section { padding: 48px 0; }
  .cards { grid-template-columns: 1fr; }

  .cat-table th:nth-child(4), .cat-table td:nth-child(4) { display: none; }
  .cat-table th:nth-child(5), .cat-table td:nth-child(5) { display: none; }
}
