/* =====================================================================
   Umidjon Arslonov — portfolio styles
   ===================================================================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --bg-elev: #ffffff;
  --text: #0b0f14;
  --text-2: #5a6472;
  --text-3: #8b95a1;
  --border: #e6eaef;
  --border-strong: #d5dbe3;
  --accent: #0e9aa7;
  --accent-strong: #0b7f8a;
  --accent-soft: rgba(14, 154, 167, 0.12);
  --accent-contrast: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow: 0 12px 40px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, 0.14);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --nav-h: 68px;
  --max: 1080px;
  --gutter: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-soft: #14171c;
  --bg-elev: #171a20;
  --text: #f2f4f7;
  --text-2: #a3adb8;
  --text-3: #6e7987;
  --border: #22272f;
  --border-strong: #2f363f;
  --accent: #30e5f2;
  --accent-strong: #5cecf6;
  --accent-soft: rgba(48, 229, 242, 0.12);
  --accent-contrast: #06181b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}
body.nav-open, body.lightbox-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip-link { position: absolute; left: 16px; top: -60px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; z-index: 2000; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s; white-space: nowrap; line-height: 1.2; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-secondary { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--text-3); background: var(--bg-soft); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); transition: background-color 0.2s, transform 0.2s; }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 20px; height: 20px; }

.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 5px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-2); font-size: 0.82rem; font-weight: 500; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
/* The blur lives on a pseudo-element: a backdrop-filter on the header itself
   would turn it into the containing block of the fixed mobile menu. */
.site-header { position: sticky; top: 0; z-index: 900; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-contrast); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.02em; flex-shrink: 0; }
.brand-mark.has-logo { background: none; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; gap: 4px; }
.nav-link { display: inline-block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.2s, background-color 0.2s; }
.nav-link:hover { color: var(--text); background: var(--bg-soft); }
.nav-link.active { color: var(--text); }
.nav-panel-head, .nav-panel-foot { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); }
.lang-switch button { border: none; background: transparent; padding: 5px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: var(--text-3); cursor: pointer; letter-spacing: 0.04em; transition: color 0.2s, background-color 0.2s, box-shadow 0.2s; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
/* Sits below the header (z 900) so the menu panel inside the header stays crisp. */
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 890; opacity: 0; transition: opacity 0.25s; }
.nav-backdrop.show { opacity: 1; }

/* ---------- Skeleton ---------- */
.skeleton { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.hero-skeleton { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; }
.sk-pill { width: 180px; height: 26px; border-radius: 999px; }
.sk-title { width: 70%; height: 46px; }
.sk-title.short { width: 45%; }
.sk-text { width: 55%; height: 20px; }
.sk-media { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); margin-top: 24px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 24px; display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; min-height: 40vh; }
.hero.has-photo { grid-template-columns: 1.15fr 0.85fr; }
.availability { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; color: var(--text-2); margin-bottom: 26px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--success); position: relative; flex-shrink: 0; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success); opacity: 0.6; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }
.hero-title { font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; max-width: 14ch; }
.hero-sub { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 600px; line-height: 1.65; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-photo { position: relative; justify-self: end; width: min(100%, 360px); }
.hero-photo::before { content: ""; position: absolute; inset: 8% -6% -6% 8%; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--accent-soft), transparent 70%); transform: rotate(-4deg); z-index: 0; }
.hero-photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- Sections ---------- */
.section { margin-top: 120px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 40px; }
.section-index { font-family: "Inter", monospace; font-size: 0.85rem; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }

/* ---------- Skills ---------- */
.skills-box { display: flex; flex-direction: column; gap: 22px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding: 2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll.at-end { -webkit-mask-image: none; mask-image: none; }
.skill-item { flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-2); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: color 0.2s, background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.skill-item:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.skill-item.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.skill-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 44px; align-items: center; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 44px; min-height: 250px; box-shadow: var(--shadow-sm); transition: opacity 0.2s, transform 0.25s var(--ease); }
.skill-card.fade { opacity: 0; transform: translateY(6px); }
.skill-card-name { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 700; color: var(--accent-strong); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.skill-card-name::before { content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }
.skill-card-headline { font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.skill-card-text { font-size: 1.15rem; line-height: 1.65; color: var(--text-2); }

/* ---------- Projects (sticky stack) ---------- */
.stack { position: relative; }
.stack-card { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 32px; box-shadow: var(--shadow-sm); transform-origin: 50% 0; will-change: transform, opacity; cursor: pointer; }
.stack-card:last-child { margin-bottom: 0; }
.stack-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.stack-text { min-width: 0; flex: 1; }
.stack-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.stack-num { font-size: 0.78rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.stack-title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.stack-title a { text-decoration: none; }
.stack-intro { margin-top: 8px; color: var(--text-2); font-size: 1.02rem; line-height: 1.55; max-width: 640px; }
.stack-text .tags { margin-top: 14px; }
.stack-cta { flex-shrink: 0; margin-top: 4px; }
.stack-cover { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border); height: clamp(220px, calc(100vh - var(--nav-h) - 330px), 560px); }
.cover-embed, .cover-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); font-weight: 600; background: radial-gradient(120% 120% at 20% 10%, var(--accent-soft), transparent 60%), var(--bg-soft); }
.cover-embed-icon svg, .cover-empty svg { width: 44px; height: 44px; color: var(--accent); }

/* ---------- Gallery ---------- */
.gallery { position: relative; width: 100%; height: 100%; }
.gallery-frame { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gallery-track { display: flex; height: 100%; transition: transform 0.45s var(--ease); will-change: transform; }
.gallery-slide { flex: 0 0 100%; min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.fit-contain .gallery-slide img { object-fit: contain; }
.gallery-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(15, 18, 22, 0.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; opacity: 0; transition: opacity 0.2s, background-color 0.2s, transform 0.2s; backdrop-filter: blur(4px); }
.gallery-btn svg { width: 20px; height: 20px; }
.gallery-btn.prev { left: 12px; }
.gallery-btn.next { right: 12px; }
.gallery:hover .gallery-btn, .gallery:focus-within .gallery-btn, .gallery.always-controls .gallery-btn { opacity: 1; }
.gallery-btn:hover { background: rgba(15, 18, 22, 0.8); }
.gallery-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.gallery-dot { width: 7px; height: 7px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); padding: 0; cursor: pointer; transition: transform 0.2s, background-color 0.2s; }
.gallery-dot.active { background: #fff; transform: scale(1.35); }
.gallery-count { position: absolute; top: 12px; right: 12px; z-index: 3; padding: 3px 9px; border-radius: 999px; background: rgba(15, 18, 22, 0.55); color: #fff; font-size: 0.72rem; font-weight: 600; backdrop-filter: blur(4px); }
.gallery-thumbs { display: flex; gap: 10px; padding: 12px; overflow-x: auto; scrollbar-width: thin; border-top: 1px solid var(--border); background: var(--bg-elev); }
.gallery-thumb { flex: 0 0 auto; width: 76px; height: 54px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--bg-soft); cursor: pointer; opacity: 0.6; transition: opacity 0.2s, border-color 0.2s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { opacity: 1; border-color: var(--accent); }
@media (hover: none) { .gallery-btn { opacity: 1; } }

/* ---------- Experience ---------- */
.exp-rows { display: flex; flex-direction: column; gap: 4px; }
.exp-row { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 36px; align-items: start; padding: 20px; border-radius: 18px; transition: background-color 0.2s; }
.exp-row:hover { background: var(--bg-soft); }
.exp-left { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.exp-logo { flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow-sm); }
.exp-logo img { width: 100%; height: 100%; object-fit: cover; }
.exp-initials { font-weight: 800; font-size: 1rem; color: var(--accent-strong); letter-spacing: 0.02em; }
.exp-body { min-width: 0; padding-top: 4px; }
.exp-role { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.exp-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-3); font-size: 0.9rem; margin-top: 4px; }
.exp-desc { color: var(--text-2); font-size: 1.02rem; line-height: 1.6; padding-top: 4px; }
.exp-desc p + p { margin-top: 8px; }

/* ---------- Certificates (horizontal scroller) ---------- */
.section-tools { margin-left: auto; display: flex; gap: 8px; align-self: center; }
.scroller-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.2s, transform 0.2s var(--ease), opacity 0.2s; }
.scroller-btn:hover { border-color: var(--text-3); transform: translateY(-1px); }
.scroller-btn[disabled] { opacity: 0.35; cursor: default; transform: none; }
.scroller-btn svg { width: 18px; height: 18px; }
.scroller { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 4px 16px; margin: -4px -4px 0; cursor: grab; }
.scroller::-webkit-scrollbar { display: none; }
.scroller.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.scroller > * { flex: 0 0 320px; scroll-snap-align: start; }
.cert-card { display: flex; flex-direction: column; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; gap: 16px; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.cert-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cert-media { position: relative; }
.cert-image { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: none; padding: 0; cursor: zoom-in; background: var(--bg-elev); }
.cert-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); -webkit-user-drag: none; }
.cert-image:hover img { transform: scale(1.03); }
.cert-logo { position: absolute; left: 12px; bottom: -14px; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 3px solid var(--bg-soft); object-fit: contain; padding: 8px; box-shadow: var(--shadow-sm); }
.cert-body { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 4px; flex: 1; }
.cert-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.cert-desc { color: var(--text-2); font-size: 0.92rem; line-height: 1.55; }
.cert-body .link-arrow { font-size: 0.88rem; margin-top: auto; padding-top: 6px; color: var(--accent-strong); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.about-grid.no-photos { grid-template-columns: 1fr; }
.about-text p { font-size: 1.12rem; color: var(--text-2); line-height: 1.7; }
.about-text p + p { margin-top: 18px; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.about-photos.count-1 { grid-template-columns: 1fr; }
.about-photo { border: none; padding: 0; background: var(--bg-soft); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow-sm); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.about-photo:hover img { transform: scale(1.03); }
.about-photos.count-2 .about-photo:nth-child(1) { aspect-ratio: 3 / 4; transform: translateY(28px); }
.about-photos.count-2 .about-photo:nth-child(2) { aspect-ratio: 4 / 5; transform: translateY(-16px); }
.about-photos.count-1 .about-photo { aspect-ratio: 4 / 3; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 120px; border-top: 1px solid var(--border); }
.footer-inner { padding-top: 36px; padding-bottom: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer-left { display: flex; flex-direction: column; gap: 4px; }
.copyright { color: var(--text-2); font-size: 0.95rem; font-weight: 500; }
.footer-email { color: var(--text-3); font-size: 0.9rem; text-decoration: none; }
.footer-email:hover { color: var(--accent-strong); }
.footer-print { color: var(--text-3); font-size: 0.9rem; text-decoration: none; }
.footer-print:hover { color: var(--accent-strong); }
a.icon-btn { text-decoration: none; }
.social-links { display: flex; gap: 10px; }
.social-link { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); transition: transform 0.2s var(--ease), color 0.2s, border-color 0.2s, background-color 0.2s; }
.social-link:hover { transform: translateY(-3px); color: var(--accent-strong); border-color: var(--accent); }
.social-link svg { width: 20px; height: 20px; }
.social-link img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(6, 8, 10, 0.9); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.lightbox.show { opacity: 1; }
.lightbox-figure { margin: 0; max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox-figure img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow-lg); animation: zoomIn 0.25s var(--ease); }
@keyframes zoomIn { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox-figure figcaption { color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; font-weight: 600; }
.lightbox-close { position: absolute; top: 18px; right: 18px; color: #fff; background: rgba(255, 255, 255, 0.1); }
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.1); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s; }
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }
.lightbox-nav svg { width: 24px; height: 24px; }

/* ---------- Project page ---------- */
.project-page { padding-top: 40px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.92rem; margin-bottom: 28px; transition: color 0.2s; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 18px; height: 18px; }
.project-header { margin-bottom: 40px; }
.project-header .chip { margin-bottom: 16px; }
.project-h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; max-width: 18ch; }
.project-lead { margin-top: 20px; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--text-2); max-width: 720px; line-height: 1.6; }
.project-header .tags { margin-top: 24px; }
.project-media { position: relative; margin-bottom: 56px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow-sm); }
.project-media .gallery-frame { aspect-ratio: 16 / 9; max-height: 70vh; }
.project-media .gallery-slide img { cursor: zoom-in; }
.embed-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--bg-soft); }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-open { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(15, 18, 22, 0.7); color: #fff; font-size: 0.8rem; font-weight: 600; text-decoration: none; backdrop-filter: blur(4px); opacity: 0.85; transition: opacity 0.2s; }
.embed-open:hover { opacity: 1; }
.embed-open svg { width: 14px; height: 14px; }
.project-section { margin-bottom: 56px; }
.project-h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 16px; }
.project-text { max-width: 760px; }
.project-text p { font-size: 1.1rem; color: var(--text-2); line-height: 1.75; }
.project-text p + p { margin-top: 16px; }
.section-embed { margin-top: 24px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.section-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; align-items: start; }
.section-image { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; padding: 0; background: var(--bg-soft); cursor: zoom-in; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.section-image img { width: 100%; height: auto; }
.section-image:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.outcome { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.outcome-stat { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em; color: var(--accent-strong); line-height: 1.1; }
.outcome-label { font-size: 1.02rem; font-weight: 700; margin-top: 8px; }
.outcome-text { color: var(--text-2); font-size: 0.95rem; margin-top: 8px; line-height: 1.55; }
.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 72px; }
.project-nav-card { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; background: var(--bg-elev); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.project-nav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-nav-card.next { text-align: right; align-items: flex-end; }
.project-nav-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.project-nav-label svg { width: 16px; height: 16px; }
.project-nav-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.not-found { text-align: center; padding: 80px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.not-found h1 { font-size: 2rem; letter-spacing: -0.03em; }
.not-found p { color: var(--text-2); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  :root { --nav-h: 60px; --gutter: 20px; }
  .menu-toggle { display: inline-flex; }
  .lang-switch-desktop { display: none; }
  .nav-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 86vw); background: var(--bg); border-left: 1px solid var(--border); z-index: 1000; display: flex; flex-direction: column; padding: 14px 20px 28px; transform: translateX(105%); transition: transform 0.32s var(--ease); box-shadow: var(--shadow-lg); overflow-y: auto; }
  .nav-panel.open { transform: none; }
  body.nav-open .site-header::before { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-panel-head { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); margin-bottom: 8px; }
  .nav-links { flex-direction: column; gap: 4px; }
  .nav-link { display: block; font-size: 1.15rem; padding: 12px 14px; font-weight: 600; }
  .nav-link.active { background: var(--bg-soft); }
  .nav-panel-foot { display: flex; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--border); }
  .nav-panel-foot .lang-switch { width: 100%; }
  .nav-panel-foot .lang-switch button { flex: 1; padding: 9px 0; font-size: 0.85rem; }

  .hero { padding-top: 48px; gap: 32px; min-height: 0; }
  .hero.has-photo { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; width: min(100%, 300px); }
  .hero-title { max-width: none; }
  .section { margin-top: 88px; }
  .section-head { margin-bottom: 28px; }

  .skills-box { padding: 14px; border-radius: var(--radius); gap: 14px; }
  .skill-card { grid-template-columns: 1fr; gap: 14px; padding: 22px; min-height: 0; align-items: start; }
  .skill-card-headline { font-size: 1.6rem; }
  .skill-card-text { font-size: 1rem; }

  .stack-card { top: calc(var(--nav-h) + 12px); padding: 14px; gap: 14px; border-radius: var(--radius); margin-bottom: 20px; }
  .stack-head { flex-direction: column; gap: 12px; }
  .stack-cta { width: 100%; justify-content: center; }
  .stack-cover { height: clamp(180px, 56vw, 420px); }
  .stack-intro { font-size: 0.95rem; }

  .exp-row { grid-template-columns: 1fr; gap: 12px; padding: 16px 12px; border-radius: 14px; }
  .exp-logo { width: 48px; height: 48px; border-radius: 14px; }
  .exp-desc { font-size: 0.98rem; padding-top: 0; }
  .scroller > * { flex-basis: min(300px, 82vw); }
  .scroller { gap: 14px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photos { gap: 12px; }
  .about-photos.count-2 .about-photo:nth-child(1) { transform: translateY(16px); }
  .about-photos.count-2 .about-photo:nth-child(2) { transform: translateY(-8px); }
  .site-footer { margin-top: 88px; }
  .footer-inner { flex-direction: column-reverse; align-items: flex-start; gap: 20px; padding-bottom: 40px; }
  .project-media .gallery-frame { aspect-ratio: 4 / 3; }
  .embed-frame { aspect-ratio: 4 / 3; }
  .project-nav { grid-template-columns: 1fr; }
  .project-nav-card.next { text-align: left; align-items: flex-start; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .brand-name { display: none; }
  .nav-actions { gap: 2px; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .cert-card { padding: 14px; }
  .outcome { padding: 20px; }
  .outcome-stat { font-size: 2rem; }
}
