/* ==========================================================
   Vladimir Anodin — Personal site
   Строгий деловой стиль с уклоном в программирование
   ========================================================== */

/* ===== Local fonts ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Inter-800.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/JetBrainsMono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/JetBrainsMono-600.woff2') format('woff2');
}

:root {
  --bg: #fafafa;
  --bg-alt: #f1f5f9;
  --bg-dark: #0f172a;
  --bg-dark-2: #0b1224;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --line: #e2e8f0;
  --line-dark: #1e293b;
  --accent: #0ea5e9;          /* sky-500 */
  --accent-2: #22d3ee;        /* cyan-400 */
  --accent-3: #34d399;        /* emerald-400 */
  --danger: #f87171;
  --code-bg: #0b1224;
  --code-text: #e2e8f0;
  --code-key: #c084fc;
  --code-str: #34d399;
  --code-num: #fbbf24;
  --code-cmt: #64748b;
  --radius: 12px;
  --radius-lg: 16px;
  --max-w: 1140px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.18);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }

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

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

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.logo-bracket { color: var(--accent); }
.logo-name { padding: 0 2px; }

.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s ease;
}
.nav a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero {
  background: var(--bg-dark);
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
  padding: 80px 0 96px;
}

/* Имитация "строк кода" на фоне */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(60% 50% at 80% 0%, rgba(14, 165, 233, 0.12), transparent 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(34, 211, 238, 0.10), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 0, transparent calc(1.7rem - 1px), rgba(255, 255, 255, 0.03) calc(1.7rem - 1px), rgba(255, 255, 255, 0.03) 1.7rem);
  background-size: 100% 1.7rem;
  opacity: 0.5;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.06);
  margin-bottom: 24px;
}
.hero-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.05;
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.hero-title .accent {
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: #cbd5e1;
  margin: 0 0 16px;
  max-width: 560px;
}
.hero-link {
  color: var(--accent-2);
  border-bottom: 1px dashed rgba(34, 211, 238, 0.4);
  padding-bottom: 1px;
}
.hero-link:hover { color: #67e8f9; border-color: #67e8f9; }

.hero-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 32px;
}
.hero-meta .sep { margin: 0 10px; opacity: 0.6; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1224;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(14, 165, 233, 0.45); }

.btn-ghost {
  background: transparent;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.18);
  font-family: var(--font-mono);
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ===== Hero photo ===== */
.hero-photo { display: flex; flex-direction: column; align-items: center; }
.photo-stage {
  position: relative;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-frame {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(52, 211, 153, 0.12)),
    var(--bg-dark-2);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.18),
    0 20px 60px rgba(8, 145, 178, 0.35),
    0 30px 80px rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.photo-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 19px;
  background: conic-gradient(
    from 0deg,
    var(--accent-2) 0deg,
    var(--accent-3) 90deg,
    transparent 180deg,
    var(--accent) 270deg,
    var(--accent-2) 360deg
  );
  z-index: -2;
  opacity: 0.35;
  animation: rotate 14s linear infinite;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  background: var(--bg-dark-2);
  z-index: -1;
}
@keyframes rotate {
  to { transform: rotate(360deg); }
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.02) saturate(1.05);
}

/* Угловые акценты (стиль сканер / crosshair) */
.photo-corner {
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--accent-2);
  border-style: solid;
  z-index: 2;
}
.photo-corner-tl { top: 10px; left: 10px;  border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.photo-corner-tr { top: 10px; right: 10px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.photo-corner-bl { bottom: 10px; left: 10px;  border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.photo-corner-br { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

/* Placeholder */
.photo-frame.photo-placeholder { padding: 0; }
.photo-placeholder-inner {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 80px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 4px;
}
.photo-placeholder-inner .bracket { color: var(--accent-2); }
.photo-placeholder-inner .slash { color: #e2e8f0; }

/* Плавающие бэйджи вокруг фото */
.photo-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(11, 18, 36, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  z-index: 3;
}
.photo-badge .bd-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}
.photo-badge .bd-dot-cyan    { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18); }
.photo-badge .bd-dot-violet  { background: #c084fc; box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.18); }
.photo-badge .bd-dot-amber   { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18); }

.badge-1 { top: 12px;    left: -10px;  animation: float 6s ease-in-out infinite; }
.badge-2 { top: 64px;    right: -22px; animation: float 7s ease-in-out infinite -1s; }
.badge-3 { bottom: 80px; left: -28px;  animation: float 8s ease-in-out infinite -2s; }
.badge-4 { bottom: 16px; right: -8px;  animation: float 7.5s ease-in-out infinite -3s; }

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

.photo-caption {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.cap-prompt { color: var(--accent-3); margin-right: 2px; }
.cap-blink {
  color: var(--accent-2);
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--bg-dark);
  color: #e2e8f0;
}
.section-dark .kicker { color: var(--accent-2); }
.section-dark .section-sub { color: #94a3b8; }

.section-head { margin-bottom: 48px; max-width: 720px; }
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.section h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: inherit;
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}
.about-text { display: flex; flex-direction: column; gap: 16px; }
.about-text p { margin: 0; font-size: 17px; color: #1e293b; }
.about-text .lead { font-size: 19px; color: #0f172a; }

.about-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.info-card {
  background: #0b1224;
  color: #e2e8f0;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  position: relative;
  overflow: hidden;
}
.info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 0, transparent 21px, rgba(255, 255, 255, 0.03) 21px, rgba(255, 255, 255, 0.03) 22px);
  background-size: 100% 22px;
  pointer-events: none;
  opacity: 0.6;
}
.info-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent-2);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.info-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.info-dot-emerald { background: var(--accent-3); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2); }

/* Timeline */
.timeline {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 70px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.18), transparent);
}
.tl-item {
  display: grid;
  grid-template-columns: 56px 18px 1fr;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.tl-year {
  color: var(--text-dim);
  font-weight: 600;
  text-align: right;
}
.tl-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
  justify-self: center;
  position: relative;
  z-index: 1;
}
.tl-dot-cyan    { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.tl-dot-emerald { background: var(--accent-3); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15); }
.tl-dot-violet  { background: #c084fc; box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.15); }
.tl-dot-amber   { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15); }
.tl-dot-pulse {
  background: var(--accent-3);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.05); }
}
.tl-text { color: #cbd5e1; }
.tl-item-now .tl-text { color: #f8fafc; font-weight: 600; }

/* Skillbars */
.skillbars {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skill-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.skill-val {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.skill-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.skill-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0;
  position: relative;
}
.skill-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shimmer 2.4s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.fill-95 { width: 95%; }
.fill-85 { width: 85%; }
.fill-80 { width: 80%; }
.fill-violet  { background: linear-gradient(90deg, #a78bfa, #c084fc); }
.fill-emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.fill-amber   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.skillbars.in .skill-fill { animation: grow 1.2s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes grow {
  from { width: 0; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Stack (carousel) ===== */
.stack-carousel {
  position: relative;
  margin: 0 -8px;
}
.carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 8px 24px;
  /* Edge fade */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-track {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.stack-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.stack-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stack-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .2s ease;
}
.stack-card:hover::before { opacity: 1; }

.stack-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 14px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.stack-tag {
  background: var(--bg-alt);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.stack-file { color: var(--text-dim); }

.stack-icon {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-block;
  padding: 6px 10px;
  background: rgba(14, 165, 233, 0.08);
  border-radius: 8px;
  align-self: flex-start;
}
.stack-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.stack-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}
.stack-card li {
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.stack-card li::before {
  content: "▸ ";
  color: var(--accent);
  margin-right: 2px;
}

/* Controls */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}
.carousel-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
  box-shadow: var(--shadow-sm);
}
.carousel-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.carousel-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  background: var(--line);
  cursor: pointer;
  padding: 0;
  transition: width .2s ease, background .2s ease;
  overflow: hidden;
}
.carousel-dot:hover { background: #cbd5e1; }
.carousel-dot.active {
  width: 28px;
  border-radius: 4px;
  background: rgba(14, 165, 233, 0.18);
}
.dot-progress {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: inherit;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .dot-progress { display: none; }
  .carousel-dot.active { background: var(--accent); }
}

@media (max-width: 640px) {
  .stack-card { flex-basis: 260px; padding: 18px 18px; }
  .carousel-btn { width: 36px; height: 36px; }
  .carousel-controls { gap: 12px; }
}

/* ===== Work ===== */
.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.work-item {
  border-bottom: 1px solid var(--line);
}
.work-link {
  display: grid;
  grid-template-columns: 64px 1fr 32px;
  align-items: center;
  padding: 22px 4px;
  transition: padding .2s ease, color .15s ease;
}
.work-link:hover {
  padding-left: 12px;
  color: var(--accent);
}
.work-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}
.work-name {
  font-size: 22px;
  font-weight: 600;
  color: inherit;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.work-arrow {
  font-size: 20px;
  color: var(--text-dim);
  transition: transform .2s ease, color .15s ease;
  text-align: right;
}
.work-link:hover .work-arrow {
  transform: translateX(6px);
  color: var(--accent);
}
.work-more {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.muted { color: var(--text-dim); }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.contact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .15s ease, background .15s ease;
}
.contact-card:hover {
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, 0.05);
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.contact-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
  word-break: break-all;
}
.contact-value:hover { color: var(--accent-2); }
.contact-note {
  font-size: 13px;
  color: var(--text-dim);
}

.messengers { display: flex; flex-direction: column; gap: 8px; }
.messenger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #e2e8f0;
  transition: border-color .15s ease, background .15s ease;
  width: fit-content;
}
.messenger:hover {
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, 0.06);
  color: var(--accent-2);
}
.m-ico {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 211, 238, 0.12);
  border-radius: 6px;
  color: var(--accent-2);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-left { display: flex; align-items: center; gap: 16px; }
.footer-right { display: flex; align-items: center; gap: 12px; }
.footer-right a:hover { color: var(--accent); }
.footer-right .sep { opacity: 0.5; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { order: -1; }
  .photo-frame { width: 220px; height: 220px; }
  .photo-stage { padding: 24px; }
  .badge-1 { left: 0; }
  .badge-2 { right: 0; }
  .badge-3 { left: 0; }
  .badge-4 { right: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-info { position: static; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 72px; }
  .nav { display: none; }
  .work-link { grid-template-columns: 40px 1fr 24px; padding: 18px 0; }
  .work-name { font-size: 18px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-left, .footer-right { width: 100%; justify-content: center; }
  .photo-badge { font-size: 11px; padding: 5px 9px; }
  .badge-1 { top: 4px; left: 0; }
  .badge-2 { top: 50px; right: 0; }
  .badge-3 { bottom: 60px; left: 0; }
  .badge-4 { bottom: 4px; right: 0; }
}
