/* ═══════════════════════════════════════════
   Berkay Yılmaz Portfolio — Premium Dark Theme
   ═══════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg-deep: #080B14;
  --bg-surface: #101624;
  --bg-card: #151C2E;
  --bg-elevated: #1A2336;
  --bg-muted: #1E293B;

  /* Text */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Accents */
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(59, 130, 246, 0.12);
  --primary-glow: rgba(59, 130, 246, 0.28);
  --accent: #8B5CF6;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --accent-glow: rgba(139, 92, 246, 0.25);
  --gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --gradient-soft: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.12));

  /* Borders & glass */
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --glass-bg: rgba(16, 22, 36, 0.72);
  --glass-border: rgba(148, 163, 184, 0.14);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.12);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);

  /* Layout */
  --nav-height: 72px;
  --container: 1120px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

body.nav-open,
body.modal-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* Ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(59, 130, 246, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 5% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 60%),
    var(--bg-deep);
  animation: ambient-shift 18s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 25%, black 15%, transparent 75%);
  pointer-events: none;
}

@keyframes ambient-shift {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(12deg); }
}

/* ── Typography helpers ── */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-section {
  padding: 4.5rem 0 5.5rem;
}

main { flex: 1; }

/* ── Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mono {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.04em;
  box-shadow: 0 4px 16px var(--primary-glow);
  flex-shrink: 0;
}

.brand-text { display: none; }

@media (min-width: 480px) {
  .brand-text { display: inline; }
}

.nav-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.nav-toggle-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.nav-toggle-btn .icon-close { display: none; }
.nav-toggle-btn[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle-btn[aria-expanded="true"] .icon-close { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--primary-soft);
}

.nav-links a.active {
  color: var(--primary-hover);
  background: var(--primary-soft);
  font-weight: 600;
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 20, 0.55);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--primary-glow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: rgba(59, 130, 246, 0.45);
  color: var(--primary-hover);
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
}

/* ── Section headers ── */
.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-header.left {
  text-align: left;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.7rem;
}

.section-label::before {
  content: "//";
  color: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0.85rem auto 0;
  font-size: 1rem;
}

.section-header.left .section-desc {
  margin-left: 0;
}

/* ── Hero (index) ── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  align-items: center;
  padding: 3.5rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  background: var(--primary-soft);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--primary-hover);
  margin-bottom: 1.4rem;
}

.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

.hero-role {
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  color: var(--primary-hover);
  font-weight: 600;
  margin: 0 0 1rem;
}

.hero-lead {
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 0 1.75rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.tag::before {
  content: "#";
  color: var(--primary);
  margin-right: 0.2rem;
  font-weight: 600;
}

.tag:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--primary-hover);
}

/* Hero visual — code editor deco */
.hero-visual {
  position: relative;
}

.hero-visual-glow {
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22), transparent 70%);
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
}

.code-window {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  backdrop-filter: blur(8px);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.r { background: #F87171; }
.code-dot.y { background: #FBBF24; }
.code-dot.g { background: #34D399; }

.code-filename {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.code-body {
  padding: 1.15rem 1.25rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}

.code-body .kw { color: #C084FC; }
.code-body .fn { color: #60A5FA; }
.code-body .str { color: #34D399; }
.code-body .num { color: #FBBF24; }
.code-body .cm { color: var(--text-muted); }
.code-body .var { color: #F8FAFC; }

.tech-float {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: float-y 5s ease-in-out infinite;
}

.tech-float span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.tech-float.one { top: -12px; right: -8px; animation-delay: 0s; }
.tech-float.two { bottom: 18%; left: -16px; animation-delay: 1.2s; }
.tech-float.three { bottom: -14px; right: 12%; animation-delay: 2.1s; }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.mini-chart {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(8, 11, 20, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.mini-chart-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 52px;
}

.mini-bars span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--gradient);
  opacity: 0.85;
  animation: bar-grow 1.2s ease-out both;
}

.mini-bars span:nth-child(1) { height: 35%; animation-delay: 0.1s; }
.mini-bars span:nth-child(2) { height: 55%; animation-delay: 0.2s; }
.mini-bars span:nth-child(3) { height: 42%; animation-delay: 0.3s; }
.mini-bars span:nth-child(4) { height: 78%; animation-delay: 0.4s; }
.mini-bars span:nth-child(5) { height: 62%; animation-delay: 0.5s; }
.mini-bars span:nth-child(6) { height: 90%; animation-delay: 0.6s; }

@keyframes bar-grow {
  from { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
  to { transform: scaleY(1); opacity: 0.85; }
}

/* ── Home sections ── */
.home-section {
  padding: 4.5rem 0;
}

.home-section.alt {
  background: linear-gradient(180deg, transparent, rgba(16, 22, 36, 0.55), transparent);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.expertise-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.expertise-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--primary-hover);
  margin-bottom: 1rem;
}

.expertise-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.expertise-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.about-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.about-preview-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.45), var(--shadow-md);
  margin: 0 auto;
}

.about-preview h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 0.65rem;
}

.about-preview p {
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.contact-section {
  text-align: center;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.contact-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-glow);
}

.contact-chip svg {
  color: var(--primary-hover);
  flex-shrink: 0;
}

/* ── Profile / About ── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}

.profile-aside {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.profile-img-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 1.25rem;
}

.profile-img-wrap::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient);
  z-index: 0;
}

.profile-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-deep);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.profile-role {
  color: var(--primary-hover);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.profile-meta span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.about-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.7rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.content-card:hover {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: var(--shadow-card);
}

.content-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.content-card h4 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  margin: 1.1rem 0 0.45rem;
  color: var(--primary-hover);
}

.content-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
}

.card-icon-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  flex-shrink: 0;
}

/* Timeline */
.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.4rem;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  opacity: 0.5;
}

.timeline li {
  position: relative;
  padding: 0 0 1.35rem 1.1rem;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--primary-hover);
  display: block;
  margin-bottom: 0.2rem;
}

.timeline strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.timeline p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Interests */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-top: 1.5rem;
}

.interest-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: transform var(--transition), border-color var(--transition);
}

.interest-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.35);
}

.interest-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.55rem;
  color: var(--text-primary);
}

.interest-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* Skills */
.skills-section {
  margin-top: 3rem;
}

.skills-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.skill-group h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  margin: 0 0 0.9rem;
  color: var(--text-primary);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-pill {
  padding: 0.4rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.skill-pill:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--primary-hover);
  background: var(--primary-soft);
}

/* ── Projects ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.25rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--text-primary);
}

.filter-btn.is-active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.project-card.featured {
  background: linear-gradient(165deg, rgba(59, 130, 246, 0.08) 0%, var(--bg-card) 45%);
  border-color: rgba(59, 130, 246, 0.22);
}

.project-visual {
  height: 120px;
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.project-visual-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.2), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15), transparent 40%);
}

.project-visual-inner[data-theme="ai"] {
  background:
    radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.28), transparent 45%),
    radial-gradient(circle at 25% 70%, rgba(59, 130, 246, 0.18), transparent 40%);
}

.project-visual-inner[data-theme="ml"] {
  background:
    radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.25), transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(52, 211, 153, 0.12), transparent 40%);
}

.project-visual-inner[data-theme="data"] {
  background:
    radial-gradient(circle at 60% 40%, rgba(251, 191, 36, 0.15), transparent 45%),
    radial-gradient(circle at 20% 70%, rgba(59, 130, 246, 0.2), transparent 40%);
}

.project-visual-inner[data-theme="software"] {
  background:
    radial-gradient(circle at 40% 30%, rgba(96, 165, 250, 0.22), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(148, 163, 184, 0.12), transparent 40%);
}

.project-visual-inner[data-theme="other"] {
  background:
    radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.18), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(244, 114, 182, 0.1), transparent 40%);
}

.viz-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  width: 70%;
}

.viz-bars i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--gradient);
  opacity: 0.75;
  display: block;
}

.viz-bars i:nth-child(1) { height: 40%; }
.viz-bars i:nth-child(2) { height: 65%; }
.viz-bars i:nth-child(3) { height: 50%; }
.viz-bars i:nth-child(4) { height: 85%; }
.viz-bars i:nth-child(5) { height: 70%; }

.featured-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--gradient);
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-full);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.35rem 1.35rem;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-hover);
  padding: 0.22rem 0.55rem;
  background: var(--primary-soft);
  border-radius: var(--radius-full);
}

.project-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.project-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F37626;
  flex-shrink: 0;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 0.55rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.project-card > .project-body > p,
.project-card .project-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.95rem;
}

.card-tag {
  padding: 0.2rem 0.55rem;
  background: var(--accent-soft);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: #C4B5FD;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.28rem 0.65rem;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: #34D399;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-hover);
  text-decoration: none;
  transition: gap var(--transition), color var(--transition);
}

.project-link:hover {
  gap: 0.55rem;
  color: #93C5FD;
}

.projects-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.github-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 3rem;
  padding: 1.75rem 2rem;
  background: var(--gradient-soft);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
}

.github-banner-text h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}

.github-banner-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Hidden detail data */
.project-detail-data { display: none; }

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.modal-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.modal-section {
  margin-bottom: 1.15rem;
}

.modal-section h4 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--primary-hover);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.modal-section p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.modal-actions {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(16, 22, 36, 0.6);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--primary-hover); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ── Scrollbar & selection ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.5); }

::selection {
  background: var(--primary-soft);
  color: var(--primary-hover);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  body::before { animation: none; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-aside {
    position: static;
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-toggle-btn { display: flex; }

  .nav-overlay { display: block; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(16, 22, 36, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
    z-index: 280;
    box-shadow: var(--shadow-md);
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 0.9rem 1rem;
  }

  .hero { padding: 2.5rem 0 3.5rem; min-height: auto; }

  .tech-float.two,
  .tech-float.three { display: none; }

  .featured-grid,
  .projects-grid,
  .skills-categories,
  .interest-grid {
    grid-template-columns: 1fr;
  }

  .about-preview {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-preview .btn { width: 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.1rem; }

  .expertise-grid { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .filter-bar { justify-content: flex-start; }

  .project-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .github-banner {
    padding: 1.35rem;
    text-align: center;
    justify-content: center;
  }

  .modal-dialog { padding: 1.25rem; }
}

@media (min-width: 1440px) {
  :root { --container: 1180px; }
}

@media (min-width: 1920px) {
  :root { --container: 1240px; }
}

/* NeuroScan canlı demo vurgu stilleri */
.neuroscan-results {font-size:.88rem;color:var(--text-primary,#f8fafc);margin:.45rem 0;}
.neuroscan-results strong {color:#93c5fd;}
.neuroscan-disclaimer {font-size:.76rem;line-height:1.55;color:var(--text-secondary,#94a3b8);margin:.2rem 0 .7rem;}
.project-card-footer {flex-wrap:wrap;gap:.6rem;}
/* Portfolio V2 — functional extensions */
.header-extras{position:absolute;right:max(20px,calc((100vw - 1160px)/2));top:19px;display:flex;gap:8px;align-items:center}.lang-switch,.mini-cv{border:1px solid rgba(148,163,184,.35);border-radius:8px;color:#e2e8f0;background:#142037;padding:8px 10px;font:600 12px Inter,sans-serif;text-decoration:none;cursor:pointer}.lang-switch:hover,.mini-cv:hover{border-color:#60a5fa}.nav-inner{padding-right:120px}.extras-section{padding-top:78px;padding-bottom:40px}.feature-grid,.timeline-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr));gap:20px}.info-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;min-width:0;background:linear-gradient(145deg,#151e32,#101829);border:1px solid #29374f;border-radius:18px;padding:24px;color:#dbeafe;text-decoration:none;box-shadow:0 8px 32px #0002}.info-card h3{font-size:1.08rem;color:#f8fafc;line-height:1.45;margin:0}.info-card p{color:#aebdd2;line-height:1.6;margin:0}.info-date,.small-note{font-size:.85rem;color:#89a8d5}.small-note{margin-top:18px}.small-note a{color:#93c5fd}.info-card .btn{margin-top:auto}.github-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:18px}.stat-value{font-size:2.1rem;color:#93c5fd}.repo-card:hover{transform:translateY(-3px);border-color:#4274ba}.tech-map{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}.tech-pill{cursor:pointer;background:#17253b;border:1px solid #364b68;color:#cfe3fc;padding:10px 16px;border-radius:30px;font:500 13px Inter,sans-serif}.tech-pill.selected,.tech-pill:hover{background:#2c4b84;border-color:#8dbafa}.tech-project-link{display:block;color:#93c5fd;margin:4px 0}.cv-grid{margin-top:12px}#regression-canvas{width:100%;height:auto;background:#0b1424;border-radius:12px;border:1px solid #30425c}#slope-range,#intercept-range{width:100%;accent-color:#60a5fa}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#assistant-launch{position:fixed;z-index:1001;right:22px;bottom:22px;border:1px solid #759fe9;background:linear-gradient(120deg,#295ab3,#714ac4);color:#fff;padding:13px 18px;border-radius:40px;box-shadow:0 12px 40px #0007;cursor:pointer;font-weight:700}#assistant-panel{position:fixed;z-index:1002;right:22px;bottom:84px;width:min(390px,calc(100vw - 24px));max-height:min(620px,calc(100dvh - 105px));background:#10192b;border:1px solid #45638e;border-radius:19px;box-shadow:0 24px 80px #000b;display:flex;flex-direction:column;overflow:hidden;color:#e9f1fe}#assistant-panel[hidden]{display:none}.assistant-head{display:flex;align-items:center;justify-content:space-between;padding:16px;background:#1a2b47}.assistant-head button{font-size:24px;color:#fff;border:0;background:none;cursor:pointer}.assistant-context{font-size:12px;line-height:1.5;padding:12px 16px;color:#adbad0;margin:0}#assistant-messages{overflow-y:auto;min-height:130px;max-height:310px;flex:1;padding:12px;display:flex;flex-direction:column;gap:10px}.chat-msg{white-space:pre-wrap;overflow-wrap:anywhere;padding:10px 13px;font-size:13px;line-height:1.6;border-radius:12px;max-width:95%}.chat-msg.human{align-self:flex-end;background:#284f8e}.chat-msg.bot{align-self:flex-start;background:#243248}.assistant-suggestions{display:flex;flex-wrap:wrap;gap:6px;padding:9px}.assistant-suggestions button{border-radius:15px;border:1px solid #395476;background:#1b2b45;color:#dbeafe;padding:8px;cursor:pointer}#assistant-form{display:flex;gap:6px;padding:12px;background:#16243c}#assistant-input{min-width:0;flex:1;background:#0a1427;color:#fff;border:1px solid #4d6284;border-radius:9px;padding:11px}#assistant-form button{background:#366dcc;color:white;border:0;border-radius:9px;padding:10px 14px;cursor:pointer}@media(max-width:760px){.header-extras{right:70px;top:15px}.nav-inner{padding-right:106px}.github-cards{grid-template-columns:1fr}.extras-section{padding-top:54px}.info-card{padding:18px}#assistant-launch{right:12px;bottom:12px}#assistant-panel{right:12px;bottom:67px}}

/* V3 — theme, blog, responsive header */
.header-extras{gap:7px;z-index:15}.theme-switch{border:1px solid #536a8d;background:#192942;color:#e2e8f0;border-radius:8px;padding:7px 10px;cursor:pointer;font-size:15px}.blog-main{min-height:70vh;padding:40px 0 90px}.blog-main h1{font:700 clamp(2rem,5vw,3.5rem) Outfit,Inter,sans-serif;letter-spacing:-.04em;color:var(--text-primary);margin-bottom:12px}.blog-article{margin:22px 0;display:block;max-width:850px}.blog-article h2{font-size:1.6rem;margin:0 0 15px;color:var(--text-primary)}.blog-article h3{margin:26px 0 8px;color:var(--text-primary);font-size:1.08rem}.blog-article p{margin-bottom:10px;line-height:1.8}.blog-article .section-desc{color:var(--accent,#60a5fa)}
html[data-theme="light"]{color-scheme:light;--bg-deep:#f6f8ff;--bg-surface:#ffffff;--bg-card:#ffffff;--text-primary:#12233c;--text-secondary:#475569;--accent:#1d4ed8;--border:#cad5e8;--container:1180px;background:#f6f8ff}
html[data-theme="light"] body{background:#f6f8ff;color:#182c44}html[data-theme="light"] .site-header{background:#f6f8ffed;border-bottom:1px solid #d7e0ef}html[data-theme="light"] .nav-links a,html[data-theme="light"] .brand,html[data-theme="light"] .section-title,html[data-theme="light"] .hero-content h1,html[data-theme="light"] h2,html[data-theme="light"] h3{color:#15243d}html[data-theme="light"] .info-card,html[data-theme="light"] .project-card,html[data-theme="light"] .expertise-card,html[data-theme="light"] .about-card{background:#fff;color:#25344c;border-color:#d2ddee;box-shadow:0 6px 28px #1a325211}html[data-theme="light"] .info-card p,html[data-theme="light"] .section-desc,html[data-theme="light"] .hero-lead{color:#475569}html[data-theme="light"] .info-card h3{color:#14243b}html[data-theme="light"] .lang-switch,html[data-theme="light"] .mini-cv,html[data-theme="light"] .theme-switch{background:#e8effb;color:#1b3355;border-color:#acbfdc}html[data-theme="light"] .site-footer{background:#e9eff8;color:#263951}html[data-theme="light"] .tech-pill{color:#17375a;background:#eaf1fd;border-color:#b7c8e1}html[data-theme="light"] .tech-pill.selected{background:#d2e4ff}html[data-theme="light"] #assistant-panel{background:#fff;color:#15243d;border-color:#8ca9d2}html[data-theme="light"] .assistant-head,html[data-theme="light"] #assistant-form{background:#e8eef9}html[data-theme="light"] .assistant-head button{color:#1b3355}html[data-theme="light"] .assistant-context{color:#334a69}html[data-theme="light"] .chat-msg.bot{background:#e7effb;color:#15243d}html[data-theme="light"] .chat-msg.human{background:#2657ad;color:#fff}html[data-theme="light"] .assistant-suggestions button{background:#eaf0fb;color:#27436b}html[data-theme="light"] #assistant-input{background:#fff;color:#1f3049;border-color:#acbfdc}html[data-theme="light"] #regression-canvas{background:#eaf1fc}html[data-theme="light"] .modal-dialog{background:#fff;color:#172943}html[data-theme="light"] .project-desc,html[data-theme="light"] .project-meta{color:#4a5a73}html[data-theme="light"] a:focus-visible,html[data-theme="dark"] a:focus-visible,button:focus-visible{outline:3px solid #6aaafc;outline-offset:3px}
@media(max-width:820px){.header-extras{right:65px;top:14px}.nav-inner{padding-right:160px}.header-extras button{min-height:35px}.nav-links{z-index:12}}@media(max-width:390px){.header-extras{right:60px;gap:4px}.mini-cv{display:none}}
@media(prefers-reduced-motion:reduce){.info-card,.repo-card,.blog-article{transition:none!important}}

/* V3.1: Consistent Blog navigation and accessible themes. */
html[data-theme="dark"] .nav-links a[href="blog.html"]{color:#e5edff;opacity:1;visibility:visible}
html[data-theme="dark"] .nav-links a[href="blog.html"].active{color:#b4caff;background:rgba(59,130,246,.17)}
html[data-theme="light"] .nav-links a[href="blog.html"]{color:#1d3454;opacity:1;visibility:visible}
html[data-theme="light"] .nav-links a[href="blog.html"].active{color:#1d4ed8;background:#e4eeff}
html[data-theme="light"] .nav-links.is-open{background:rgba(248,250,255,.98);border-bottom-color:#d7e0ef}
html[data-theme="dark"] .blog-article{color:#e2e8f0}
html[data-theme="dark"] .blog-article p{color:#b7c8df}
html[data-theme="light"] .blog-article p{color:#475569}
@media(max-width:768px){.nav-links a[href="blog.html"]{display:block;width:100%;}}

/* V3.2: Keep all navigation links visible in both themes.
   The action controls now participate in the flex layout, rather than
   absolutely covering the final (Blog) link. */
.site-header .nav-inner{padding-right:0;gap:12px;min-width:0}
.site-header .header-extras{position:static;top:auto;right:auto;flex:0 0 auto;margin-left:10px;z-index:auto;display:flex;align-items:center;gap:7px}
.site-header .nav-links{min-width:0;flex:0 1 auto;gap:2px}
.site-header .nav-links a{display:block;white-space:nowrap;padding:9px 11px;color:var(--text-secondary);opacity:1;visibility:visible}
html[data-theme="dark"] .site-header .nav-links a[href="blog.html"]{color:#e5edff}
html[data-theme="light"] .site-header .nav-links a[href="blog.html"]{color:#1d3454}
@media(max-width:1070px){.site-header .brand-text{display:none}.site-header .nav-links a{font-size:13px;padding:9px 8px}}
@media(max-width:768px){
 .site-header .nav-inner{gap:8px}
 .site-header .header-extras{order:1;margin-left:auto}
 .site-header .nav-toggle-btn{order:2;flex-shrink:0}
 .site-header .nav-links{display:flex;position:fixed;left:0;right:0;top:var(--nav-height);width:100%;flex-direction:column;align-items:stretch;z-index:280;background:var(--bg-surface);border-bottom:1px solid var(--border);padding:12px 18px;gap:4px}
 .site-header .nav-links a{width:100%;padding:12px 14px;font-size:15px;text-align:left}
 html[data-theme="light"] .site-header .nav-links{background:#f6f8ff}
 html[data-theme="dark"] .site-header .nav-links{background:#101624}
}
@media(max-width:390px){.site-header .header-extras .mini-cv{display:none}.site-header .header-extras{gap:4px}}

/* Optional analytics consent — visible in both themes */
.privacy-consent{position:fixed;z-index:99999;bottom:18px;left:18px;right:18px;max-width:720px;margin:auto;padding:20px 22px;border-radius:18px;display:flex;align-items:center;gap:16px;justify-content:space-between;background:var(--bg-surface,#151c2e);color:var(--text-primary,#f8fafc);border:1px solid var(--border,rgba(148,163,184,.3));box-shadow:0 15px 55px rgba(0,0,0,.4)}
.privacy-consent[hidden]{display:none!important}.privacy-copy{min-width:0;flex:1}.privacy-copy strong{display:block;margin-bottom:7px;font-size:1rem}.privacy-copy p{font-size:.83rem;line-height:1.55;margin:0;color:var(--text-secondary,var(--text-primary,#ddd))}.privacy-actions{display:flex;flex-direction:column;gap:9px;min-width:145px}.privacy-actions button{padding:11px 15px;border-radius:10px;font:inherit;font-size:.84rem;cursor:pointer;border:1px solid var(--accent,#3b82f6)}.privacy-accept{background:var(--accent,#3b82f6);color:#fff}.privacy-reject{background:transparent;color:inherit}.privacy-settings{background:none;border:0;color:inherit;font:inherit;font-size:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.privacy-settings:hover{opacity:.8}.privacy-actions button:focus-visible,.privacy-settings:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}@media(max-width:580px){.privacy-consent{flex-direction:column;align-items:stretch;bottom:10px;left:10px;right:10px;padding:16px}.privacy-actions{flex-direction:row}.privacy-actions button{flex:1}}
