/* =============================================================
   Ferat Taş — Portfolio / CV
   Design: Light Minimal Luxury + Dark mode
   ============================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Light theme (default) */
  --bg: #fbfbfd;
  --bg-alt: #f4f4f7;
  --surface: #ffffff;
  --surface-2: #f7f7fa;
  --text: #15151a;
  --text-soft: #3a3a44;
  --muted: #5a5a66;
  --border: #e7e7ec;
  --border-strong: #d8d8e0;

  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 100%);

  --shadow-sm: 0 1px 2px rgba(20, 20, 35, 0.04), 0 1px 3px rgba(20, 20, 35, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 20, 35, 0.06), 0 8px 24px rgba(20, 20, 35, 0.06);
  --shadow-lg: 0 18px 50px -12px rgba(40, 30, 90, 0.18);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --maxw: 1140px;
  --nav-h: 72px;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  --bg: #0b0b12;
  --bg-alt: #101019;
  --surface: #14141f;
  --surface-2: #1a1a27;
  --text: #f4f4f8;
  --text-soft: #c9c9d4;
  --muted: #8f8fa0;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent: #8b8cf9;
  --accent-2: #b794f6;
  --accent-soft: rgba(139, 140, 249, 0.12);
  --accent-grad: linear-gradient(120deg, #8b8cf9 0%, #c084fc 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.6);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; }
::selection { background: var(--accent); color: #fff; }
.hero__name::selection { background: var(--accent-2); color: #fff; }

/* ---------- Accessibility: skip link + focus ring ---------- */
.skip-link {
  position: fixed; top: 10px; left: 50%; transform: translate(-50%, -160%);
  z-index: 300; padding: 11px 20px; border-radius: 999px;
  background: var(--accent-grad); color: #fff; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-lg); transition: transform 0.25s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); outline: none; }
:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Background decor (very subtle) ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask: radial-gradient(900px 600px at 72% 12%, #000 0%, transparent 62%);
  mask: radial-gradient(900px 600px at 72% 12%, #000 0%, transparent 62%);
  opacity: 0.6;
}
html[data-theme="dark"] .bg-grid { opacity: 0.9; }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(120px); }
.bg-glow--1 {
  width: 600px; height: 600px; top: -260px; right: -180px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.1; animation: drift1 22s ease-in-out infinite;
}
.bg-glow--2 {
  width: 520px; height: 520px; top: 55%; left: -220px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  opacity: 0.08; animation: drift2 26s ease-in-out infinite;
}
html[data-theme="dark"] .bg-glow--1 { opacity: 0.2; }
html[data-theme="dark"] .bg-glow--2 { opacity: 0.15; }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, 40px); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, -40px); } }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--accent-grad); z-index: 200; transition: width 0.1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  cursor: pointer; transition: all 0.3s var(--ease); white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg { transition: transform 0.3s var(--ease); }
.btn--primary {
  position: relative; overflow: hidden;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--accent) 55%, transparent);
}
.btn--primary::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); transition: left 0.6s var(--ease);
}
.btn--primary:hover::before { left: 140%; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; }
.nav__mono {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--accent-grad); color: #fff; font-size: 0.95rem; letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}
.nav__name { font-size: 1.02rem; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative; padding: 8px 14px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500; color: var(--text-soft);
  transition: color 0.25s, background 0.25s;
}
.nav__link::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; border-radius: 2px; background: var(--accent-grad); transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after { width: 18px; }
.nav__actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px;
}
.lang-toggle__btn {
  padding: 6px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: var(--muted);
  letter-spacing: 0.04em; transition: all 0.25s var(--ease);
}
.lang-toggle__btn[aria-pressed="true"] { background: var(--accent-grad); color: #fff; box-shadow: var(--shadow-sm); }

/* ---------- CV download menu ---------- */
.cv-menu { position: relative; }
.cv-menu__chev { transition: transform 0.25s var(--ease); margin-left: -3px; }
.cv-menu.is-open .cv-menu__chev { transform: rotate(180deg); }
.cv-menu__list {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 232px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 120;
}
.cv-menu.is-open .cv-menu__list { opacity: 1; visibility: visible; transform: none; }
.cv-menu__item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  transition: background 0.2s var(--ease);
}
.cv-menu__item:hover { background: var(--surface-2); }
.cv-menu__lang {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.8rem; font-family: var(--font-mono);
}
.cv-menu__txt { display: flex; flex-direction: column; font-weight: 600; font-size: 0.9rem; line-height: 1.25; }
.cv-menu__txt small { font-weight: 500; font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.cv-menu__item--preview { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border); border-radius: 0 0 11px 11px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
  transition: all 0.25s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

.nav__burger { display: none; flex-direction: column; gap: 4px; }
.nav__burger span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: all 0.3s var(--ease); }
.nav__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Section base ---------- */
.section { padding: 100px 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section__head { display: flex; align-items: center; gap: 16px; margin-bottom: 48px; }
.section__index { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.section__title { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; }
.section__title::after {
  content: ""; display: inline-block; width: 56px; height: 3px; margin-left: 18px; vertical-align: middle;
  background: var(--accent-grad); border-radius: 3px; opacity: 0.5;
}

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-h); position: relative; }
.hero__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding: 60px 24px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px; margin-bottom: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; color: var(--text-soft); box-shadow: var(--shadow-sm);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.hero__title { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 18px; }
.hero__hi { display: block; font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.hero__name {
  display: block; font-size: clamp(3rem, 9vw, 5.8rem); font-weight: 700;
  background: linear-gradient(110deg, var(--accent) 0%, var(--accent-2) 35%, var(--accent) 70%, var(--accent-2) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em;
  animation: shimmer 7s linear infinite;
  filter: drop-shadow(0 8px 30px color-mix(in srgb, var(--accent) 30%, transparent));
}
@keyframes shimmer { to { background-position: 220% center; } }
.hero__role { font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 600; font-family: var(--font-display); color: var(--text-soft); margin-bottom: 22px; min-height: 1.6em; }
.typed { color: var(--accent); }
.caret { color: var(--accent); font-weight: 400; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__summary { font-size: 1.05rem; color: var(--muted); max-width: 540px; margin-bottom: 34px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero__socials { display: flex; gap: 12px; }
.social {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
  box-shadow: var(--shadow-sm); transition: all 0.3s var(--ease);
}
.social:hover { color: #fff; background: var(--accent-grad); border-color: transparent; transform: translateY(-3px); }

/* Hero visual — calm but with a touch of flair */
.hero__visual { display: flex; justify-content: center; position: relative; }

/* 3D scene mount */
.hero3d { display: grid; place-items: center; line-height: 0; }
.hero3d canvas { display: block; cursor: grab; filter: drop-shadow(0 30px 60px color-mix(in srgb, var(--accent) 22%, transparent)); }
.avatar-card { position: relative; display: grid; place-items: center; animation: floatY 6s ease-in-out infinite; }
.avatar-card::after {
  content: ""; position: absolute; inset: -14%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent) 0%, transparent 65%);
  filter: blur(34px); opacity: 0.55;
}
.avatar-ring {
  width: 256px; height: 256px; border-radius: 50%; display: grid; place-items: center; padding: 5px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-soft), var(--accent));
  box-shadow: 0 30px 70px -30px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: spinSlow 18s linear infinite;
}
.avatar {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--accent);
  font-family: var(--font-display); font-weight: 700; font-size: 5rem; letter-spacing: -0.02em;
  animation: spinSlow 18s linear infinite reverse;
}
.code-chip { display: none; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.scroll-hint svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.about__photo { position: sticky; top: 100px; margin: 0; }
.portrait {
  position: relative; border-radius: var(--radius-lg); padding: 5px;
  background: var(--accent-grad); box-shadow: var(--shadow-lg);
}
.portrait::after {
  content: ""; position: absolute; inset: -16%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent) 0%, transparent 65%);
  filter: blur(42px); opacity: 0.55;
}
.portrait img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: calc(var(--radius-lg) - 4px);
  filter: saturate(1.03) contrast(1.02);
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}
.portrait:hover img { transform: scale(1.02); }
@media (max-width: 980px) { .about__photo { position: static; max-width: 320px; margin: 0 auto 8px; } }
.about__lead { font-size: 1.3rem; font-weight: 500; font-family: var(--font-display); line-height: 1.5; margin-bottom: 20px; letter-spacing: -0.01em; }
.about__body { color: var(--muted); font-size: 1.02rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat__num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; padding-bottom: 0.06em; }
.stat__label { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
}
.tl-item { position: relative; padding-left: 38px; padding-bottom: 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.tl-role { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.tl-company { color: var(--accent); font-weight: 600; }
.tl-date { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.tl-bullets { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.tl-bullets li { position: relative; padding-left: 20px; color: var(--text-soft); font-size: 0.97rem; }
.tl-bullets li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 580px; justify-self: center; }
.project {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  overflow: hidden;
}
.project::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit;
  background: var(--accent-grad); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.35s;
  pointer-events: none;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project:hover::before { opacity: 1; }
.project__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.project__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); font-size: 1.4rem;
}
.project__badge {
  font-size: 0.72rem; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
a.project__badge { cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
a.project__badge:hover { border-color: var(--accent); background: var(--surface); }
.project__badge--live { color: #16a34a; border-color: color-mix(in srgb, #16a34a 40%, transparent); }
html[data-theme="dark"] .project__badge--live { color: #4ade80; }
.project__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.project__desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 16px; }
.project__bullets { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.project__bullets li { position: relative; padding-left: 18px; font-size: 0.9rem; color: var(--text-soft); }
.project__bullets li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.project__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-family: var(--font-mono); font-size: 0.72rem; padding: 4px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
}
.project__link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  transition: gap 0.25s var(--ease);
}
.project__link:hover { gap: 10px; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.skill-card:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 580px; justify-self: center; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.skill-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.skill-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 1.2rem; }
.skill-card__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.pill {
  padding: 8px 15px; border-radius: 999px; font-size: 0.88rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
  transition: all 0.25s var(--ease);
}
.pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); background: var(--accent-soft); }

/* ---------- Programs ---------- */
.programs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.program {
  display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: all 0.3s var(--ease);
}
.program:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.program__icon { font-size: 1.6rem; width: 50px; height: 50px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px; background: var(--accent-soft); }
.program__title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; margin-bottom: 2px; }
.program__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); margin-bottom: 10px; }
.program__desc { font-size: 0.93rem; color: var(--muted); }
.program__verify {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
  font-size: 0.83rem; font-weight: 600; color: var(--accent);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--accent-soft); transition: all 0.25s var(--ease);
}
.program__verify:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Credentials ---------- */
.credentials { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.cred-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.cred-block + .cred-block { margin-top: 22px; }
.cred-side .cred-block:first-child { margin-top: 0; }
.cred-block__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.cred-block__title::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--accent-grad); }
.cert-list { display: flex; flex-direction: column; gap: 12px; }
.cert-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.94rem; transition: all 0.25s var(--ease); }
.cert-list li:hover { border-color: var(--accent); transform: translateX(4px); }
.cert-list .cert-ic { color: var(--accent); flex-shrink: 0; }
.cert-verify-row { padding: 0 !important; background: transparent !important; border: none !important; }
.cert-verify-row:hover { transform: none !important; }
.cert-verify {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  font-size: 0.88rem; font-weight: 600; color: var(--accent); transition: gap 0.25s var(--ease);
}
.cert-verify:hover { gap: 12px; }
.edu__school { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.edu__degree { color: var(--muted); font-size: 0.94rem; margin-top: 4px; }
.langs { display: flex; flex-direction: column; gap: 16px; }
.lang__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.lang__name { font-weight: 600; font-size: 0.96rem; }
.lang__level { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.lang__bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.lang__fill { height: 100%; border-radius: 999px; background: var(--accent-grad); width: 0; transition: width 1.1s var(--ease); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact__heading { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.contact__text { color: var(--muted); margin-bottom: 28px; max-width: 440px; }
.contact__cards { display: flex; flex-direction: column; gap: 12px; }
.cc {
  display: flex; align-items: center; gap: 15px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: all 0.3s var(--ease);
}
.cc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.cc__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.cc__label { font-size: 0.78rem; color: var(--muted); }
.cc__value { font-weight: 600; font-size: 0.96rem; word-break: break-all; }

.contact__form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-md); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; color: var(--text-soft); }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); transition: all 0.25s var(--ease); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 14px; font-size: 0.88rem; text-align: center; min-height: 1.2em; }
.form-note.is-ok { color: #16a34a; }
.form-note.is-err { color: #dc2626; }
html[data-theme="dark"] .form-note.is-ok { color: #4ade80; }
html[data-theme="dark"] .form-note.is-err { color: #f87171; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 36px 0; background: var(--bg-alt); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand strong { display: block; font-family: var(--font-display); }
.footer__brand span { font-size: 0.82rem; color: var(--muted); }
.footer__copy { font-size: 0.88rem; color: var(--muted); }
.footer__socials { display: flex; gap: 20px; }
.footer__socials a { font-size: 0.9rem; font-weight: 500; color: var(--text-soft); transition: color 0.25s; }
.footer__socials a:hover { color: var(--accent); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; bottom: 26px; right: 26px; width: 48px; height: 48px; border-radius: 50%; z-index: 90;
  background: var(--accent-grad); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease), transform 0.35s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top.is-visible:hover { transform: translateY(-3px); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero__content { display: flex; flex-direction: column; align-items: center; }
  .hero__visual { order: -1; }
  .about, .contact, .credentials { grid-template-columns: 1fr; }
  .projects, .skills, .programs, .stats { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__inner { gap: 8px; }
  .nav__actions { gap: 6px; }
  .lang-toggle__btn { padding: 5px 9px; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 4px;
    background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(18px);
    padding: 18px 24px 24px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform 0.4s var(--ease); align-items: stretch;
    z-index: 99; max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__link { padding: 12px 16px; font-size: 1rem; }
  .nav__burger { display: flex; }
  .nav__name { display: none; }
  #cvDownload .nav__cv-text, #cvDownload span { display: none; }
  #cvDownload { padding: 10px 11px; min-width: 40px; min-height: 40px; }
  .section { padding: 72px 0; }
  .avatar-card { width: 260px; height: 300px; transform: scale(0.9); }
  .code-chip { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .section { padding: 54px 0; }
  .section__head { margin-bottom: 32px; }
  .hero__name { font-size: clamp(2.2rem, 11vw, 3rem); }
  .cv-menu__list { right: 0; left: auto; min-width: 200px; max-width: calc(100vw - 28px); }
  .about__photo { max-width: 210px; margin: 0 auto 24px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat__num { font-size: 1.7rem; }
  .project, .skill-card { padding: 20px; }
  .program { padding: 20px; gap: 14px; }
  .contact__form { padding: 20px; }
  .cred-block { padding: 18px; }
  .tl-head { flex-direction: column; gap: 4px; }
  .tl-date { align-self: flex-start; }
  .footer__inner { justify-content: center; text-align: center; }
  .footer__socials { justify-content: center; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn { width: 100%; }
}
