:root {
  --bg-dark: #0b0c0e;
  --bg-surface: #121316;
  --bg-card: #16181d;
  --bg-card-hover: #1c1f26;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.24);

  --text-main: #f4f4f6;
  --text-muted: #9da3af;
  --text-dim: #646a77;

  --accent-wine: #8b2641;
  --accent-wine-bright: #a93252;
  --accent-khaki: #939b76;
  --accent-emerald: #34c759;

  --font-code: "Fira Code", monospace;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card:
    0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-subtle);
  --shadow-glow: 0 0 35px -5px rgba(139, 38, 65, 0.35);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.35s var(--ease-out);
}

[data-theme="light"] {
  --bg-dark: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-card: #f9f9fb;
  --bg-card-hover: #f0f0f3;

  --border-subtle: rgba(0, 0, 0, 0.09);
  --border-focus: rgba(0, 0, 0, 0.35);

  --text-main: #141416;
  --text-muted: #5e636e;
  --text-dim: #8b909a;

  --accent-wine: #9e2b4a;
  --accent-wine-bright: #bc365b;
  --accent-khaki: #68724d;

  --shadow-card:
    0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--border-subtle);
  --shadow-glow: 0 0 35px -5px rgba(158, 43, 74, 0.2);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 155, 118, 0.3) transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: clip;
  position: relative;
  -webkit-font-smoothing: antialiased;
  padding-top: 72px;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(147, 155, 118, 0.25);
  border-radius: 9999px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 155, 118, 0.6);
}

.ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

[data-theme="light"] .ambient-canvas {
  opacity: 0.35;
}

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-wine), var(--accent-khaki));
  z-index: 1003;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 24px);
  position: relative;
  z-index: 1;
}

.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1002;
  background: rgba(11, 12, 14, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition:
    background var(--transition-normal),
    border-color var(--transition-normal);
}

[data-theme="light"] .header-wrapper {
  background: rgba(245, 245, 247, 0.92);
}

.header-wrapper.scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.brand-icon-svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  overflow: visible;
  transition: transform var(--transition-normal);
}

.brand-logo:hover .brand-icon-svg {
  transform: scale(1.08);
}

.logo-chevron {
  stroke: var(--accent-emerald);
  stroke-width: 2.6px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    stroke var(--transition-fast),
    filter var(--transition-fast);
  animation: chevronGlow 3s ease-in-out infinite;
}

@keyframes chevronGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 2px rgba(52, 199, 89, 0.4));
    opacity: 1;
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(52, 199, 89, 0.85));
    opacity: 0.9;
  }
}

.logo-cursor {
  stroke: var(--text-main);
  stroke-width: 2.6px;
  stroke-linecap: round;
  animation: cursorBlinkSmooth 1.1s ease-in-out infinite;
}

@keyframes cursorBlinkSmooth {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.15;
  }
}

.brand-logo:hover .logo-chevron {
  stroke: #4cd964;
  filter: drop-shadow(0 0 10px rgba(52, 199, 89, 1));
}

.brand-logo:hover .logo-cursor {
  stroke: var(--accent-wine-bright);
}

.brand-name {
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--text-main);
  white-space: nowrap;
}

.brand-dot {
  color: var(--accent-wine-bright);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-family: var(--font-code);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-num {
  color: var(--accent-khaki);
  font-size: 11px;
  margin-right: 2px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1.5px;
  background-color: var(--accent-wine);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent-khaki);
  color: #0b0c0e;
}

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--border-focus);
}

.theme-icon {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

[data-theme="light"] .sun-icon {
  display: none;
}

[data-theme="light"] .moon-icon {
  display: block;
}

.btn-primary {
  background: var(--accent-wine);
  color: #ffffff;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(139, 38, 65, 0.35);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  transform: skewX(-20deg);
  transition: 0.6s ease;
}

.btn-primary:hover::after {
  left: 140%;
}

.btn-primary:hover {
  background: var(--accent-wine-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 38, 65, 0.5);
}

.btn-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-family: var(--font-code);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--accent-khaki);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.btn-block {
  width: 100%;
}

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 1003;
}

.burger-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.burger-btn.open .burger-line:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

.burger-btn.open .burger-line:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: var(--bg-dark);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
  padding: 72px 20px 20px 20px;
  overflow-y: auto;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding-top: 8px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.mobile-link {
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-code);
  font-size: 15px;
  display: block;
  padding: 2px 0;
}

.mobile-link span:first-child {
  color: var(--accent-khaki);
  margin-right: 6px;
}

.mobile-link.highlight {
  color: var(--accent-wine-bright);
  font-weight: 700;
}

.mobile-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-contacts a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-code);
  font-size: 13px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 48px);
  padding: clamp(48px, 6vw, 72px) 0 clamp(32px, 4vw, 48px) 0;
  min-height: calc(88vh - 72px);
}

.hero-content {
  flex: 1.2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-code);
  font-size: 11px;
  margin-bottom: 20px;
  max-width: 100%;
}

.badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.8);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.8);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 14px rgba(52, 199, 89, 1);
  }
}

.hero-title {
  font-family: var(--font-code);
  font-size: clamp(32px, 5.5vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 18px;
  word-break: break-word;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--text-main) 30%,
    var(--accent-khaki) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typewriter-container {
  font-family: var(--font-code);
  font-size: clamp(12.5px, 3.4vw, 17.5px);
  line-height: 1.5;
  color: var(--accent-khaki);
  margin-bottom: 22px;
  display: block;
  min-height: 3em;
  text-wrap: pretty;
}

.console-prefix {
  color: var(--text-dim);
  margin-right: 6px;
  display: inline;
  user-select: none;
}

.typewriter-text {
  color: var(--accent-khaki);
  display: inline;
}

.cursor {
  display: inline;
  color: var(--accent-emerald);
  font-weight: 700;
  animation: blinkCursor 0.9s infinite;
}

@keyframes blinkCursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 28px;
  text-wrap: pretty;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-terminal-pill {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 11.5px;
  color: var(--text-dim);
  border-left: 2px solid var(--accent-wine);
  padding-left: 12px;
  overflow-wrap: break-word;
  word-break: normal;
}

.hero-image-wrapper {
  flex: 0.9;
  display: flex;
  justify-content: flex-end;
}

.photo-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.photo-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) contrast(1.05);
  transition:
    filter 0.4s ease,
    transform 0.4s ease;
}

.photo-card:hover .profile-photo {
  filter: grayscale(10%) contrast(1.02);
  transform: scale(1.03);
}

.corner-accent {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--accent-khaki);
  pointer-events: none;
  z-index: 2;
}

.corner-accent.top-left {
  top: 8px;
  left: 8px;
  border-top: 2px solid;
  border-left: 2px solid;
}
.corner-accent.top-right {
  top: 8px;
  right: 8px;
  border-top: 2px solid;
  border-right: 2px solid;
}
.corner-accent.bottom-left {
  bottom: 8px;
  left: 8px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}
.corner-accent.bottom-right {
  bottom: 8px;
  right: 8px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

.photo-overlay-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-code);
  font-size: 10.5px;
  color: var(--accent-khaki);
  z-index: 3;
}

.trust-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin: 16px 0 clamp(48px, 6vw, 72px) 0;
  box-shadow: var(--shadow-card);
}

.metric-item {
  text-align: center;
}

.metric-num {
  font-family: var(--font-code);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--accent-khaki);
  line-height: 1.1;
  margin-bottom: 4px;
}

.metric-label {
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.metric-divider {
  width: 1px;
  height: 36px;
  background: var(--border-subtle);
}

.section {
  padding-top: clamp(64px, 7vw, 96px);
  padding-bottom: 8px;
  scroll-margin-top: 84px;
}

.section-tag {
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--accent-khaki);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-code);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: clamp(24px, 3.5vw, 36px);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: clamp(24px, 4vw, 40px);
  align-items: stretch;
}

.about-text-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.about-text-col .lead-text {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
  text-wrap: pretty;
}

.about-text-col .secondary-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  text-wrap: pretty;
}

.authority-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.authority-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.authority-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-wine);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.authority-card:hover {
  border-color: var(--border-focus);
  background: var(--bg-card);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.authority-card:hover::before {
  opacity: 1;
}

.authority-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-khaki);
  flex-shrink: 0;
  margin-top: 1px;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.authority-card:hover .authority-icon-box {
  border-color: var(--accent-khaki);
  color: var(--accent-emerald);
}

.authority-icon-box svg {
  width: 18px;
  height: 18px;
}

.authority-body {
  flex: 1;
  min-width: 0;
}

.authority-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 3px;
}

.authority-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.about-code-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.terminal-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.term-btn {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.term-red {
  background-color: #ff5f56;
}
.term-yellow {
  background-color: #ffbd2e;
}
.term-green {
  background-color: #27c93f;
}

.term-title {
  margin-left: 8px;
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 18px 20px;
  font-family: var(--font-code);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  overflow-x: auto;
  flex: 1;
}

.json-key {
  color: #e06c75;
}
.json-val {
  color: #98c379;
}
.json-bool {
  color: #d19a66;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal);
}

.skill-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-4px);
}

.card-category {
  font-family: var(--font-code);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.skill-card h3 {
  font-family: var(--font-code);
  font-size: 17.5px;
  font-weight: 700;
}

.card-number {
  font-family: var(--font-code);
  font-size: 12.5px;
}

.num-khaki {
  color: var(--accent-khaki);
}
.num-wine {
  color: var(--accent-wine-bright);
}

.card-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 20px;
  flex: 1;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--text-muted);
}

.exp-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
}

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr 190px;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.exp-date {
  color: var(--accent-khaki);
  font-family: var(--font-code);
  font-size: 12.5px;
}

.exp-role {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.exp-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
}

.exp-company {
  text-align: right;
  font-family: var(--font-code);
  color: var(--text-muted);
  font-size: 13.5px;
}

.section-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.project-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.project-image-wrapper {
  position: relative;
  height: 250px;
  width: 100%;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}

.project-card:hover .project-image-wrapper img {
  transform: scale(1.04);
}

.project-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 14, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover .project-hover-overlay {
  opacity: 1;
}

.open-link-badge {
  background: var(--accent-wine);
  color: #ffffff;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.project-num-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-code);
  font-size: 10.5px;
  color: var(--accent-khaki);
  z-index: 2;
}

.project-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.project-name {
  font-family: var(--font-code);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.live-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.project-summary {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
  text-wrap: pretty;
}

.calculator-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 4vw, 36px);
  align-items: start;
}

.calc-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.calc-summary-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.calc-label {
  display: block;
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 14px;
}

.calc-label-margin {
  margin-top: 28px;
}

.calc-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-code);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
  word-break: break-word;
  position: relative;
  transition: all var(--transition-fast);
}

.calc-chip:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
  transform: translateY(-2px);
}

.calc-chip.active {
  background: rgba(139, 38, 65, 0.18);
  border-color: var(--accent-wine-bright);
  color: var(--text-main);
  box-shadow: 0 0 16px rgba(139, 38, 65, 0.3);
}

.calc-options-checkbox {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  padding: 6px 0;
  transition: transform var(--transition-fast);
}

.checkbox-container:hover {
  transform: translateX(3px);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.checkmark-icon {
  width: 11px;
  height: 11px;
  stroke: #0b0c0e;
  opacity: 0;
  transform: scale(0.65);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-khaki);
  border-color: var(--accent-khaki);
  box-shadow: 0 0 10px rgba(147, 155, 118, 0.4);
}

.checkbox-container input:checked ~ .checkmark .checkmark-icon {
  opacity: 1;
  transform: scale(1);
}

.checkbox-container:hover .checkmark {
  border-color: var(--accent-khaki);
}

.checkbox-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  transition: color var(--transition-fast);
}

.checkbox-container:hover .checkbox-text {
  color: var(--text-main);
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.summary-card.pulse-glow {
  border-color: var(--accent-wine-bright);
  box-shadow: 0 0 30px rgba(139, 38, 65, 0.35);
}

.summary-badge {
  font-family: var(--font-code);
  font-size: 10.5px;
  color: var(--accent-khaki);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.summary-price-label {
  color: var(--text-muted);
  font-size: 12px;
}

.summary-price {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin: 4px 0 8px 0;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.summary-time {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.summary-time strong {
  color: var(--accent-khaki);
  font-family: var(--font-code);
}

.summary-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.summary-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: fadeInCheck 0.3s ease-out;
}

@keyframes fadeInCheck {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.summary-checklist li::before {
  content: "✓";
  color: var(--accent-khaki);
  font-weight: 700;
  flex-shrink: 0;
}

.faq-accordion {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--border-focus);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-code);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  gap: 14px;
}

.faq-question span:first-child {
  text-wrap: pretty;
}

.faq-icon {
  font-size: 18px;
  color: var(--accent-khaki);
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-wine-bright);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out);
}

.faq-answer-inner {
  padding: 0 22px 20px 22px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: pretty;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.faq-step-num {
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-khaki);
  background: rgba(147, 155, 118, 0.12);
  border: 1px solid rgba(147, 155, 118, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  line-height: 1.4;
}

.footer {
  padding-top: clamp(64px, 8vw, 96px);
  padding-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.footer-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

.footer-badge {
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--accent-khaki);
  margin-bottom: 10px;
}

.footer-title {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.footer-lead {
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 680px;
  margin-bottom: 28px;
  text-wrap: pretty;
}

.footer-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 36px);
  align-items: stretch;
}

.footer-form-col {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.footer-contacts-col {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
}

.hp-field {
  display: none !important;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-group.textarea-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: var(--font-code);
  font-size: 11.5px;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14.5px;
  outline: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-khaki);
  box-shadow: 0 0 0 3px rgba(147, 155, 118, 0.15);
}

.form-textarea {
  resize: none;
  flex: 1;
  min-height: 140px;
  height: 100%;
}

.field-error {
  font-family: var(--font-code);
  font-size: 10.5px;
  color: #ff5f56;
  min-height: 12px;
}

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.btn-submit {
  width: 100%;
  padding: 13px 24px;
}

.privacy-note {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.45;
}

.btn-loader {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinLoader 0.7s linear infinite;
}

.btn-submit.loading .btn-text {
  display: none;
}
.btn-submit.loading .btn-loader {
  display: inline-block;
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}

.form-status-msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-code);
  font-size: 12.5px;
  display: none;
  line-height: 1.5;
  word-break: break-word;
}

.form-status-msg.success {
  display: block;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid var(--accent-emerald);
  color: #34c759;
}

.form-status-msg.error {
  display: block;
  background: rgba(255, 95, 86, 0.12);
  border: 1px solid #ff5f56;
  color: #ff5f56;
}

.direct-contacts-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  height: 100%;
}

.contacts-title {
  font-family: var(--font-code);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.contact-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: space-between;
}

.contact-pill-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  min-width: 0;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.contact-pill-card:hover {
  transform: translateX(4px);
  border-color: var(--accent-khaki);
}

.pill-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-khaki);
  flex-shrink: 0;
}

.pill-icon svg {
  width: 17px;
  height: 17px;
}

.pill-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.pill-type {
  font-family: var(--font-code);
  font-size: 9.5px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.pill-value {
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-watermark-container {
  width: 100%;
  margin: 12px 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.footer-svg-text {
  width: 100%;
  max-width: 1200px;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.svg-giant-text {
  font-family: var(--font-code);
  font-size: 110px;
  font-weight: 800;
  letter-spacing: -2px;
  fill: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .svg-giant-text {
  fill: rgba(0, 0, 0, 0.04);
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--text-dim);
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-wine);
  color: #ffffff;
  border-color: var(--accent-wine-bright);
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 641px) {
  .typewriter-container {
    min-height: 1.5em;
  }
}

@media (max-width: 1080px) {
  .hero {
    flex-direction: column;
    padding-top: 32px;
    gap: 32px;
    min-height: auto;
  }
  .hero-content,
  .hero-image-wrapper {
    width: 100%;
  }
  .hero-image-wrapper {
    justify-content: center;
  }
  .photo-card {
    max-width: 340px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-text-col {
    height: auto;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .footer-body {
    grid-template-columns: 1fr;
  }
  .form-textarea {
    min-height: 120px;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .desktop-only,
  .desktop-controls {
    display: none !important;
  }
  .burger-btn {
    display: flex;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .trust-bar {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
  }
  .metric-divider {
    display: none;
  }
  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .exp-company {
    text-align: left;
  }
  .footer-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 580px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  body {
    padding-top: 64px;
  }
  .header {
    height: 64px;
  }
  .brand-name {
    font-size: 13.5px;
  }
  .hero {
    padding-top: 20px;
    min-height: auto;
  }
  .hero-title {
    font-size: 28px;
    letter-spacing: -1px;
  }
  .typewriter-container {
    margin-bottom: 18px;
  }
  .authority-card {
    padding: 12px 14px;
  }
  .authority-icon-box {
    width: 32px;
    height: 32px;
  }
  .authority-icon-box svg {
    width: 16px;
    height: 16px;
  }
  .authority-title {
    font-size: 13px;
  }
  .authority-desc {
    font-size: 12px;
    line-height: 1.35;
  }
  .calc-options {
    grid-template-columns: 1fr;
  }
  .calculator-box {
    padding: 22px 16px;
  }
  .footer-card {
    padding: 24px 16px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }
  .brand-name {
    font-size: 12.5px;
  }
  .calculator-box {
    padding: 20px 12px;
    border-radius: var(--radius-md);
  }
  .footer-card {
    padding: 20px 12px;
    border-radius: var(--radius-md);
  }
  .summary-card {
    padding: 18px 14px;
  }
  .summary-price {
    font-size: 26px;
  }
  .checkbox-container {
    gap: 9px;
  }
  .checkmark {
    width: 18px;
  }
  .checkmark-icon {
    width: 9px;
    height: 9px;
  }
  .checkbox-text {
    font-size: 12px;
  }
  .direct-contacts-box {
    padding: 18px 14px;
  }
  .form-input,
  .form-textarea {
    padding: 11px 14px;
    font-size: 14px;
  }
  .btn-primary,
  .btn-secondary {
    padding: 10px 16px;
    font-size: 13px;
  }
}
