@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-hover: 0 4px 12px rgba(59,130,246,.2), 0 8px 32px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Navbar ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: #eff6ff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ── Sections ── */
section { padding: 88px 24px; }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.section-desc {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 48px;
}

/* ── Hero ── */
#hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #fafafa 100%);
  padding: 40px 24px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-name span { color: var(--accent); }

.hero-role {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-desc {
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover { background: #eff6ff; transform: translateY(-1px); }

.hero-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
}

.hero-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 340px;
}

.hc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-photo-wrap {
  position: relative;
  display: inline-block;
}

.hero-photo {
  width: 320px;
  height: 380px;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(59,130,246,.18), 0 2px 12px rgba(0,0,0,.1);
  display: block;
  border: 4px solid var(--bg);
  outline: 2px solid var(--border);
}

.hero-photo-badge {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(59,130,246,.35);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 8px;
  margin-top: 28px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 340px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 4px;
}

.hero-stat-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-stat-label {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 500;
}

.hero-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

.hc-name { font-weight: 600; font-size: .95rem; }
.hc-title { font-size: .8rem; color: var(--muted); }

.hc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hc-stat {
  background: var(--surface);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.hc-stat-num { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.hc-stat-label { font-size: .75rem; color: var(--muted); }

/* ── Hakkımda ── */
#about { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text p { color: var(--muted); margin-bottom: 16px; }

.about-highlights { display: flex; flex-direction: column; gap: 16px; }

.highlight-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}

.highlight-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.hc-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border-radius: 10px;
  flex-shrink: 0;
}

.hc-body h4 { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.hc-body p { font-size: .85rem; color: var(--muted); }

/* ── Beceriler ── */
#skills { background: var(--bg); }

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

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.skill-category h3 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--text);
  transition: background .2s, border-color .2s, color .2s;
}

.skill-tag:hover {
  background: #eff6ff;
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Projeler ── */
#projects { background: var(--surface); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow .25s, transform .25s;
}

.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

.project-icon {
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border-radius: 12px;
}

.project-card h3 { font-size: 1.1rem; font-weight: 700; }
.project-card p { color: var(--muted); font-size: .9rem; flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.project-tag {
  background: #eff6ff;
  color: var(--accent);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: .78rem;
  font-weight: 600;
}

/* ── Hizmetler ── */
#services { background: var(--bg); }

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

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}

.service-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.service-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border-radius: 16px;
  margin: 0 auto 16px;
}

.service-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.service-card p { font-size: .87rem; color: var(--muted); }

/* ── İletişim ── */
#contact { background: var(--surface); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 20px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--text);
}

.contact-item-text h4 { font-size: .9rem; font-weight: 600; margin-bottom: 2px; }
.contact-item-text a,
.contact-item-text span { font-size: .87rem; color: var(--muted); text-decoration: none; }
.contact-item-text a:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label { font-size: .87rem; font-weight: 500; color: var(--text); }

.form-group input,
.form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Footer ── */
footer {
  background: var(--text);
  color: #94a3b8;
  text-align: center;
  padding: 32px 24px;
  font-size: .87rem;
}

footer a { color: #94a3b8; text-decoration: none; transition: color .2s; }
footer a:hover { color: #fff; }

.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Nav Controls (lang + theme toggles) ── */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-ctrl-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  line-height: 1.4;
}

.nav-ctrl-btn:hover {
  background: #eff6ff;
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Dark Mode ── */
html.dark {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
}

html.dark .contact-item-icon {
  background: #334155;
  color: #f1f5f9;
}

.github-path { fill: #1e293b; }
html.dark .github-path { fill: #f1f5f9; }

html.dark .location-icon {
  filter: invert(1);
}

html.dark nav { background: rgba(15,23,42,.92); }

html.dark #hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #1a2035 100%);
}

html.dark .nav-ctrl-btn:hover { background: #1e3a5f; }

html.dark .hero-stats,
html.dark .hero-card,
html.dark .highlight-card,
html.dark .project-card,
html.dark .skill-tag { background: #1e293b; }

html.dark .skill-tag:hover { background: #1e3a5f; }

html.dark .preview-algotube    { background: linear-gradient(135deg, #1e3a5f, #1e40af44); }
html.dark .preview-cargo       { background: linear-gradient(135deg, #14532d, #16653644); }
html.dark .preview-snake       { background: linear-gradient(135deg, #2e1065, #4c1d9544); }
html.dark .preview-tobacco     { background: linear-gradient(135deg, #451a03, #92400e44); }
html.dark .preview-flyticket   { background: linear-gradient(135deg, #0c4a6e, #0369a144); }
html.dark .preview-adversarial { background: linear-gradient(135deg, #500724, #9f123744); }
html.dark .preview-dejaview    { background: linear-gradient(135deg, #14532d, #16653644); }
html.dark .preview-travelogue  { background: linear-gradient(135deg, #431407, #9a3a1244); }

html.dark footer { background: #020617; }

html.dark .form-group input,
html.dark .form-group textarea {
  background: #1e293b;
  color: var(--text);
  border-color: var(--border);
}

html.dark .service-card { background: #1e293b; }

/* ── Project Previews ── */
.project-card { padding: 0; overflow: hidden; }

.project-preview {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.preview-algotube    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.preview-cargo       { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
.preview-snake       { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.preview-tobacco     { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.preview-flyticket   { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.preview-adversarial { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.preview-dejaview    { background: linear-gradient(135deg, #f0fdf4, #bbf7d0); }
.preview-travelogue  { background: linear-gradient(135deg, #fff7ed, #fed7aa); }

/* AlgoTube — animating bars */
.preview-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
}

.preview-bars span {
  width: 14px;
  border-radius: 4px 4px 0 0;
  background: #3b82f6;
  opacity: .85;
  animation: bar-pulse 1.4s ease-in-out infinite alternate;
}

.preview-bars span:nth-child(1) { height: 35%; animation-delay: 0s; }
.preview-bars span:nth-child(2) { height: 70%; animation-delay: .1s; }
.preview-bars span:nth-child(3) { height: 50%; animation-delay: .2s; }
.preview-bars span:nth-child(4) { height: 90%; animation-delay: .3s; }
.preview-bars span:nth-child(5) { height: 60%; animation-delay: .4s; }

@keyframes bar-pulse {
  from { opacity: .6; transform: scaleY(.9); }
  to   { opacity: 1;  transform: scaleY(1.05); }
}

/* Cargo / Snake / Tobacco — emoji icons */
.preview-ship,
.preview-grid,
.preview-db { font-size: 3rem; }

/* Snake — grid overlay */
.preview-snake { position: relative; }

.preview-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,.15) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* project card inner content padding */
.project-card > h3,
.project-card > p,
.project-card > .project-tags { padding: 0 24px; }

/* ── Mini UI Previews ── */

.pv-wrap {
  width: 100%; height: 130px; padding: 12px 14px;
  box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}

/* MuglaCargo */
.cargo-row { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.45); border-radius: 5px; padding: 5px 8px; }
.cargo-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cargo-dot.green  { background: #22c55e; }
.cargo-dot.yellow { background: #f59e0b; }
.cargo-dot.gray   { background: #9ca3af; }
.cargo-label { font-size: 9px; color: #374151; white-space: nowrap; }
html.dark .cargo-row  { background: rgba(255,255,255,.08); }
html.dark .cargo-label { color: #d1d5db; }

/* Snake AI */
.pv-snake { width: 100%; height: 130px; display: flex; align-items: center; justify-content: center; position: relative; }
.pv-snake::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,.15) 1px, transparent 1px);
  background-size: 18px 18px;
}
.snake-grid {
  display: grid; grid-template-columns: repeat(5, 16px); grid-template-rows: repeat(4, 16px);
  gap: 2px; position: relative; z-index: 1;
}
.snake-seg  { background: #7c3aed; border-radius: 3px; }
.snake-head { background: #a855f7; border-radius: 4px; box-shadow: 0 0 6px #a855f7aa; }
.snake-food { background: #f43f5e; border-radius: 50%; box-shadow: 0 0 5px #f43f5eaa; }

/* Tobacco DB */
.db-row { display: flex; gap: 5px; }
.db-cell { height: 11px; border-radius: 3px; background: rgba(255,255,255,.55); }
.db-cell.hd { background: rgba(245,158,11,.4); }
html.dark .db-cell    { background: rgba(255,255,255,.12); }
html.dark .db-cell.hd { background: rgba(245,158,11,.3); }

/* FlyTicket */
.ft-route { font-size: 11px; font-weight: 700; color: #0369a1; text-align: center; letter-spacing: 1px; margin-bottom: 4px; }
.ft-seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ft-s { height: 13px; border-radius: 3px; background: rgba(255,255,255,.5); border: 1px solid rgba(0,0,0,.08); }
.ft-s.ok  { background: #86efac; }
.ft-s.sel { background: #3b82f6; }
.ft-s.emp { background: rgba(255,255,255,.2); }
html.dark .ft-route { color: #7dd3fc; }
html.dark .ft-s     { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.1); }
html.dark .ft-s.ok  { background: #166534; }
html.dark .ft-s.sel { background: #1d4ed8; }

/* Adversarial ML */
.adv-row  { display: flex; align-items: center; gap: 6px; }
.adv-lbl  { font-size: 9px; width: 32px; color: #6b7280; flex-shrink: 0; }
.adv-bar  { height: 12px; border-radius: 4px; }
.adv-bad  { background: #f87171; }
.adv-good { background: #4ade80; }
.adv-pct  { font-size: 9px; font-weight: 700; color: #374151; flex-shrink: 0; }
html.dark .adv-lbl { color: #9ca3af; }
html.dark .adv-pct { color: #d1d5db; }

/* DejaView */
.pv-dj { display: flex; gap: 14px; align-items: center; justify-content: center; width: 100%; height: 130px; }
.dj-group { display: flex; flex-wrap: wrap; gap: 5px; width: 42px; justify-content: center; }
.dj-group i { width: 11px; height: 11px; border-radius: 50%; background: var(--gc); opacity: .85; display: block; }

/* Travelogue */
.tl-card { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.55); border-radius: 6px; padding: 5px 9px; font-size: 10px; }
.tl-card.tl-goal { background: rgba(255,255,255,.25); border: 1px dashed rgba(0,0,0,.15); }
.tl-card-text { color: #374151; font-weight: 600; }
html.dark .tl-card      { background: rgba(255,255,255,.1); }
html.dark .tl-card.tl-goal { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.15); }
html.dark .tl-card-text { color: #d1d5db; }

.project-card > h3 { margin-top: 20px; }
.project-card > p  { margin-top: 10px; flex: 1; }
.project-card > .project-tags { margin-top: 14px; padding-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }

  .project-preview { height: 120px; min-height: 120px; }
  .pv-wrap  { height: 120px; }
  .pv-snake { height: 120px; }
  .pv-dj    { height: 120px; }


  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero-inner,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .hero-photo { width: 220px; height: 260px; }
  .hero-visual { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
  .hero-stats { max-width: 260px; }

  .form-row { grid-template-columns: 1fr; }

  section { padding: 64px 20px; }
}
