/* ==========================================================================
   abdu1.dev – Abdullah Aldesoky
   ========================================================================== */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece5;
  --ink: #0e1117;
  --text: #2a2e36;
  --muted: #646a75;
  --line: #e3dfd6;
  --line-strong: #d3cec3;
  --live: #1f8a4c;
  --live-bg: #e3f3e9;

  --kova-bg: #0e1117;
  --kova-surface: #161a22;
  --kova-line: #262b35;
  --kova-text: #c9ccd3;
  --kova-muted: #8a909c;
  --ember: #ff5b2e;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(14, 17, 23, 0.04), 0 8px 24px -12px rgba(14, 17, 23, 0.12);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.6);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1140px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --surface: #12151c;
    --surface-2: #171b23;
    --ink: #f1efea;
    --text: #d4d6dc;
    --muted: #949aa6;
    --line: #22262f;
    --line-strong: #2e333e;
    --live: #5fd08e;
    --live-bg: rgba(95, 208, 142, 0.12);
    --kova-bg: #07090c;
    --kova-surface: #10131a;
    --kova-line: #1e222b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
figure { margin: 0; }

::selection { background: var(--ember); color: #0e1117; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--muted); }

.ic { width: 18px; height: 18px; flex: none; }
.ic-xs { width: 14px; height: 14px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Sprachumschaltung ---------- */
html[lang="de"] [data-l="en"],
html[lang="en"] [data-l="de"] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font: 600 15px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { background: var(--surface); border-color: var(--ink); }

.eyebrow {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.eyebrow-ember { color: var(--ember); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.menu-btn {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-icon { position: relative; width: 16px; height: 10px; }
.menu-icon i {
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.menu-icon i:first-child { top: 0; }
.menu-icon i:last-child { top: 8.4px; }
.nav.open .menu-icon i:first-child { top: 4.2px; transform: rotate(45deg); }
.nav.open .menu-icon i:last-child { top: 4.2px; transform: rotate(-45deg); }

.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 12px/1 var(--font);
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
}
html[lang="de"] .lang [data-set-lang="de"],
html[lang="en"] .lang [data-set-lang="en"] { background: var(--ink); color: var(--bg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-top: clamp(40px, 8vw, 104px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 28px;
}
.status .sep { color: var(--muted); }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px var(--live-bg);
}
.hero h1 {
  font-size: clamp(44px, 7.4vw, 84px);
  letter-spacing: -0.045em;
  line-height: 0.98;
  font-weight: 680;
}
.hero-role {
  margin-top: 18px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.hero-lede {
  margin-top: 20px;
  max-width: 560px;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--muted);
  line-height: 1.65;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
}
.socials { display: flex; gap: 8px; margin-left: 4px; }
.hero-photo {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 400px;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(14, 17, 23, 0.08);
  pointer-events: none;
}

/* ---------- Fakten ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-bottom: clamp(56px, 8vw, 104px);
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px 4px 0;
  border-top: 1px solid var(--line-strong);
}
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact strong { color: var(--ink); font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.fact span { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- KOVA ---------- */
.kova {
  position: relative;
  border-block: 1px solid var(--kova-line);
  background: var(--kova-bg);
  color: var(--kova-text);
  padding-block: clamp(72px, 10vw, 128px);
  overflow: hidden;
}
.kova::before {
  content: "";
  position: absolute;
  top: -260px;
  right: -200px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 91, 46, 0.16), transparent);
  pointer-events: none;
}
.kova .wrap { position: relative; }
.kova h2, .kova h3 { color: #fff; }
.kova-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}
.kova-logo { height: 34px; width: auto; margin-bottom: 28px; }
.kova-head h2 {
  font-size: clamp(32px, 4.6vw, 54px);
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.kova-intro p { font-size: 17px; line-height: 1.7; }
.kova-intro p + p { margin-top: 14px; color: #fff; }

.kova-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(40px, 6vw, 64px) 0 0;
  border-top: 1px solid var(--kova-line);
  border-bottom: 1px solid var(--kova-line);
}
.kova-meta > div { padding: 18px 20px 18px 0; }
.kova-meta > div + div { padding-left: 20px; border-left: 1px solid var(--kova-line); }
.kova-meta dt {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kova-muted);
  margin-bottom: 8px;
}
.kova-meta dd { margin: 0; color: #fff; font-weight: 550; }
.kova-meta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--ember);
}
.kova-meta a:hover { text-decoration: underline; text-underline-offset: 4px; }

.browser {
  margin-top: clamp(40px, 6vw, 72px);
  border-radius: 16px;
  overflow: hidden;
  background: #1a1e26;
  border: 1px solid #2a2f3a;
  box-shadow: var(--shadow-lg);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #2a2f3a;
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #343a46; }
.browser-bar span {
  margin-inline: auto;
  transform: translateX(-24px);
  font: 500 12px/1 var(--mono);
  color: var(--kova-muted);
  padding: 6px 14px;
  border-radius: 999px;
  background: #11141a;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(40px, 6vw, 72px);
  background: var(--kova-line);
  border: 1px solid var(--kova-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature { background: var(--kova-bg); padding: 28px; }
.feature h3 { font-size: 17px; margin-bottom: 10px; }
.feature h3::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ember);
  margin-bottom: 16px;
}
.feature p { font-size: 15px; line-height: 1.6; color: var(--kova-muted); }

.gallery-phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 48px);
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(32px, 5vw, 64px) clamp(16px, 5vw, 64px) 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--kova-surface), var(--kova-bg));
  border: 1px solid var(--kova-line);
}
.gallery-phones figure { display: flex; flex-direction: column; align-items: center; }
.phone {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 17;
  padding: 8px;
  border-radius: 38px;
  background: #050608;
  border: 1px solid #2c313c;
  box-shadow: var(--shadow-lg);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 30px;
}
.gallery-phones figcaption,
.shot figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--kova-muted);
  padding: 18px 0 28px;
}
.gallery-phones figcaption b { font: 500 12px/1 var(--mono); color: var(--ember); }

.gallery-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.188fr) minmax(0, 1.425fr);
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: clamp(16px, 2.5vw, 28px);
  align-items: start;
}
.shot img {
  border-radius: var(--radius);
  border: 1px solid #2a2f3a;
  background: #11141a;
}
.shot figcaption { padding-bottom: 0; }

.ownership {
  margin-top: clamp(48px, 7vw, 88px);
}
.ownership ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ownership li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--kova-line);
  background: var(--kova-surface);
}
.ownership b { color: #fff; font-weight: 600; }
.ownership span { font-size: 14px; color: var(--kova-muted); }

.stack { margin-top: clamp(40px, 6vw, 64px); }
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stack-grid > div {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--kova-line);
  background: var(--kova-surface);
}
.stack h3 {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kova-muted);
  margin-bottom: 14px;
}
.tags.tags-dark li { background: #222733; color: #e6e8ec; }

/* ---------- Sektionen ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section + .section {
  background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.035em; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.job,
.edu {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.job:last-child { border-bottom: 1px solid var(--line); }
.job-when {
  font: 500 13px/1.6 var(--mono);
  color: var(--muted);
  padding-top: 3px;
}
.job-body h3 { font-size: 20px; }
.job-org { margin-top: 4px; font-weight: 550; color: var(--ink); }
.job-org .muted { font-weight: 400; }
.job-body ul { list-style: none; margin-top: 16px; display: grid; gap: 8px; max-width: 720px; }
.job-body li { position: relative; padding-left: 20px; color: var(--text); }
.job-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--muted);
}
.job-body a { text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.job-body a:hover { text-decoration-color: currentColor; }

/* Projekte */
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.project {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.project:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 500 12px/1 var(--mono);
  color: var(--muted);
  margin-bottom: 18px;
}
.badge {
  font: 600 11px/1 var(--font);
  letter-spacing: 0.02em;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.badge-live { background: var(--live-bg); color: var(--live); }
.project h3 { font-size: 19px; margin-bottom: 10px; }
.project > p { font-size: 15px; color: var(--muted); line-height: 1.6; }
.project .tags { margin-top: 18px; }
.project-link {
  margin-top: auto;
  padding-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  align-self: flex-start;
}
.project-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Tags */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}
.tags-lg li {
  font-size: 15px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
}

/* Skills */
.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.skill-group {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.skill-group h3 {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.skill-core { grid-column: 1 / -1; }
.skill-wide { grid-column: span 2; }

/* Kontakt */
.contact {
  padding-block: clamp(80px, 12vw, 144px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 50% 0%, var(--surface) 0%, transparent 70%),
    var(--bg);
}
.contact-inner { text-align: center; }
.contact h2 { font-size: clamp(40px, 6.4vw, 72px); letter-spacing: -0.045em; line-height: 1; }
.contact-lede {
  margin: 20px auto 0;
  max-width: 540px;
  font-size: 18px;
  color: var(--muted);
}
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
  font-size: 14px;
  color: var(--muted);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Scroll-Animation (nur mit JS) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.js .reveal.in { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  html.js .menu-btn { display: inline-grid; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(14, 17, 23, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav.open { border-bottom-color: var(--line); background: var(--bg); }
  .nav-links a {
    padding: 14px 4px;
    border-radius: 0;
    font-size: 17px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a:hover,
  .nav-links a.active { background: transparent; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ownership ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kova-head { grid-template-columns: 1fr; align-items: start; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; justify-self: start; max-width: 160px; }
  .hero-photo img { aspect-ratio: 1 / 1; border-radius: 20px; }
  .hero-photo::after { border-radius: 20px; }
  .kova-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kova-meta > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .kova-meta > div:nth-child(n + 3) { border-top: 1px solid var(--kova-line); }
  .gallery-wide { grid-template-columns: 1fr; }
  .browser img { aspect-ratio: 3 / 2; object-fit: cover; object-position: 90% 0; }
  .browser-bar span { transform: none; }
  .job,
  .edu { grid-template-columns: 1fr; gap: 8px; }
  .skills { grid-template-columns: 1fr; }
  .skill-wide { grid-column: auto; }
  .brand-name { display: none; }
}

@media (max-width: 600px) {
  .projects,
  .features { grid-template-columns: 1fr; }
  .gallery-phones {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 64%;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    padding: 28px 20px 0;
    scrollbar-width: none;
  }
  .gallery-phones::-webkit-scrollbar { display: none; }
  .gallery-phones figure { scroll-snap-align: start; }
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; }
  .ownership ul { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 auto; }
  .socials { margin-left: 0; }
  .footer-inner { flex-direction: column; gap: 6px; }
  .contact-cta .btn { width: 100%; }
}
