:root {
  --bg: #f7f8ff;
  --surface: #ffffff;
  --surface-translucent: rgba(255, 255, 255, 0.78);
  --frame-bg: rgba(255, 255, 255, 0.72);
  --header-bg: rgba(255, 255, 255, 0.78);
  --surface-soft: #f4f6ff;
  --surface-blue: #eef1ff;
  --text: #141a2a;
  --text-strong: #1c2436;
  --muted: #6e7588;
  --soft: #9ba3b6;
  --line: #e2e6f2;
  --line-strong: #d5dbeb;
  --accent: #4658f6;
  --accent-2: #7584ff;
  --accent-soft: #e9ecff;
  --tag-bg: #f1f3fa;
  --tag-text: #7a8296;
  --shadow: 0 18px 70px rgba(35, 48, 102, 0.12);
  --shadow-soft: 0 12px 42px rgba(35, 48, 102, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #0c1020;
  --surface: #181f33;
  --surface-translucent: rgba(24, 31, 51, 0.72);
  --frame-bg: rgba(15, 20, 36, 0.6);
  --header-bg: rgba(20, 26, 44, 0.82);
  --surface-soft: #20283e;
  --surface-blue: #1c2444;
  --text: #e7eaf5;
  --text-strong: #f5f7ff;
  --muted: #99a1bb;
  --soft: #6e7795;
  --line: #2a324a;
  --line-strong: #3a425e;
  --accent: #6e7eff;
  --accent-2: #8a98ff;
  --accent-soft: rgba(110, 126, 255, 0.18);
  --tag-bg: #20283e;
  --tag-text: #99a1bb;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 12px 42px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% 8%, rgba(87, 104, 255, 0.11), transparent 28rem),
    radial-gradient(circle at 94% 18%, rgba(177, 185, 255, 0.22), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(70, 88, 246, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 88, 246, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

button,
input,
textarea {
  font: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

:focus-visible {
  outline: 3px solid rgba(70, 88, 246, 0.35);
  outline-offset: 3px;
}

.site-frame {
  width: min(1440px, calc(100% - 16px));
  margin: 4px auto;
  padding: 0 72px 28px;
  overflow: visible;
  border: 1px solid rgba(199, 206, 228, 0.88);
  border-radius: 18px;
  background: var(--frame-bg);
  box-shadow: 0 4px 28px rgba(31, 42, 88, 0.08);
  backdrop-filter: blur(20px);
}

.section {
  margin-top: 20px;
}

#about,
#projects,
#skills,
#contact {
  scroll-margin-top: 110px;
}

.site-header {
  position: sticky;
  top: 8px;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 86px;
  padding: 0 12px;
  margin: 0 -12px 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 126, 255, 0.5);
  color: var(--accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand-chevron,
.brand-code {
  font-size: 30px;
  font-weight: 800;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 4.2vw, 70px);
  font-size: 15px;
  font-weight: 700;
}

.main-nav a {
  color: var(--text-strong);
  white-space: nowrap;
  transition: color 150ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--accent);
}

.header-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.header-button {
  min-width: 136px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--accent), #6573ff);
  color: #fff;
  box-shadow: 0 12px 32px rgba(70, 88, 246, 0.28);
}

.header-button svg,
.button svg {
  width: 20px;
  height: 20px;
}

.header-button:hover,
.button:hover {
  transform: translateY(-2px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(620px, 1.18fr);
  gap: 54px;
  align-items: center;
  min-height: 500px;
}

.hero-copy {
  padding-top: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(64px, 6.5vw, 90px);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.hero-role {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
}

.hero-text {
  max-width: 530px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 34px;
}

.button {
  min-width: 210px;
  padding: 0 28px;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #6573ff);
  color: #fff;
  box-shadow: 0 14px 38px rgba(70, 88, 246, 0.24);
}

.button-ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 8px 24px rgba(45, 52, 70, 0.06);
}

.social-row {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.social-row a,
.contact-socials a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 8px 20px rgba(43, 52, 88, 0.05);
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease;
}

.social-row a:hover,
.contact-socials a:hover {
  transform: translateY(-2px);
  border-color: rgba(70, 88, 246, 0.42);
  color: var(--accent);
}

.social-row svg,
.contact-socials svg {
  width: 21px;
  height: 21px;
}

.hero-art {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border-radius: 42px 26px 110px 26px;
  background:
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.96), transparent 30%),
    linear-gradient(135deg, #ecefff 0%, #f8f9ff 50%, #eef1ff 100%);
}

.hero-image,
.section-image,
.project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  object-position: center;
}

.hero-art > :not(.hero-image) {
  display: none;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(157, 167, 210, 0.2) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(157, 167, 210, 0.16) 50%, transparent 50.2%);
  background-size: 220px 180px;
  opacity: 0.55;
}

.hero-grid {
  position: absolute;
  width: 140px;
  height: 86px;
  background-image: radial-gradient(circle, rgba(91, 105, 177, 0.32) 2px, transparent 2.2px);
  background-size: 18px 18px;
}

.grid-left {
  top: 38px;
  left: 140px;
}

.grid-right {
  top: 36px;
  right: 48px;
}

.float-cube {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, #9da8ff, #5a69ff);
  box-shadow: 0 18px 34px rgba(70, 88, 246, 0.24);
  transform: rotate(45deg) skew(-8deg, -8deg);
}

.cube-one {
  top: 92px;
  left: 20px;
  width: 23px;
  height: 23px;
}

.cube-two {
  left: 70px;
  bottom: 132px;
  width: 54px;
  height: 54px;
  opacity: 0.65;
}

.cube-three {
  right: 300px;
  bottom: 38px;
  width: 26px;
  height: 26px;
}

.code-badge {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, #5666ff, #2e3fb7);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 16px 40px rgba(70, 88, 246, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.badge-left {
  top: 240px;
  left: 8px;
}

.badge-right {
  top: 58px;
  right: 146px;
}

.laptop-scene {
  position: absolute;
  left: 115px;
  top: 112px;
  z-index: 4;
  width: 360px;
  transform: perspective(700px) rotateX(6deg) rotateY(-6deg);
}

.laptop-screen {
  height: 232px;
  padding: 18px 18px 24px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  background: linear-gradient(135deg, #252b3b, #0d1420);
  box-shadow: 0 28px 52px rgba(33, 40, 65, 0.34);
}

.screen-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.screen-toolbar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.screen-toolbar span:nth-child(1) {
  background: #ff6b6b;
}

.screen-toolbar span:nth-child(2) {
  background: #fbbf24;
}

.screen-toolbar span:nth-child(3) {
  background: #39d98a;
}

.code-lines {
  display: grid;
  gap: 12px;
}

.code-lines i {
  display: block;
  width: var(--w);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a94ff, #5eead4);
  opacity: 0.86;
}

.code-lines i:nth-child(even) {
  margin-left: 32px;
  background: linear-gradient(90deg, #fbbf24, #8a94ff);
}

.laptop-base {
  position: relative;
  width: 420px;
  height: 58px;
  margin-left: -28px;
  border-radius: 0 0 32px 32px;
  background: linear-gradient(180deg, #d8deea, #a7b0c5);
  box-shadow: 0 28px 42px rgba(36, 43, 70, 0.22);
  transform: skewX(-10deg);
}

.laptop-base span {
  position: absolute;
  left: 156px;
  top: 10px;
  width: 92px;
  height: 10px;
  border-radius: 999px;
  background: rgba(88, 98, 126, 0.35);
}

.terminal-card {
  position: absolute;
  top: 180px;
  right: 120px;
  z-index: 6;
  width: 250px;
  padding: 18px 20px;
  border-radius: 8px;
  background: #0e1723;
  box-shadow: 0 18px 34px rgba(31, 38, 60, 0.28);
}

.terminal-card p {
  margin: 0 0 7px;
  color: #46db74;
  font: 700 13px Consolas, monospace;
}

.chart-card {
  position: absolute;
  right: 245px;
  bottom: 115px;
  z-index: 7;
  width: 210px;
  height: 124px;
  padding: 12px;
  border: 1px solid #dbe0f1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 34px rgba(35, 48, 102, 0.18);
  backdrop-filter: blur(10px);
}

.mini-window {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}

.mini-window span {
  width: 32px;
  height: 4px;
  border-radius: 999px;
  background: #d4daf2;
}

.chart-card svg {
  width: 100%;
  height: 72px;
  color: var(--accent-2);
}

.chart-card path:first-child {
  stroke-width: 5;
}

.chart-card path:last-child {
  color: #d8def2;
  stroke-width: 2;
}

.mug {
  position: absolute;
  right: 96px;
  bottom: 72px;
  z-index: 5;
  width: 76px;
  height: 72px;
  border-radius: 8px 8px 20px 20px;
  background: linear-gradient(135deg, #212a38, #0f1722);
  color: #aab2c8;
  box-shadow: 0 18px 30px rgba(21, 29, 45, 0.22);
}

.mug::after {
  content: "";
  position: absolute;
  right: -23px;
  top: 18px;
  width: 34px;
  height: 32px;
  border: 10px solid #111925;
  border-left: 0;
  border-radius: 0 22px 22px 0;
}

.mug span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
}

.plant {
  position: absolute;
  right: 26px;
  bottom: 82px;
  z-index: 5;
  width: 80px;
  height: 92px;
}

.plant::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 0;
  width: 50px;
  height: 44px;
  border-radius: 8px 8px 20px 20px;
  background: linear-gradient(135deg, #303a48, #151d29);
}

.plant span {
  position: absolute;
  bottom: 34px;
  width: 22px;
  height: 64px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #67bf48, #2c8d3c);
  transform-origin: bottom center;
}

.plant span:nth-child(1) {
  left: 12px;
  transform: rotate(-26deg);
}

.plant span:nth-child(2) {
  left: 32px;
}

.plant span:nth-child(3) {
  right: 2px;
  transform: rotate(28deg);
}

.about-card {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 34px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-translucent);
  box-shadow: var(--shadow-soft);
}

.about-visual {
  min-height: 300px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #111a31, #24305e);
}

.about-visual > :not(.section-image) {
  display: none;
}

.dashboard-shot {
  position: relative;
  height: 100%;
  min-height: 300px;
  padding: 38px;
}

.dashboard-shot::before {
  content: "";
  position: absolute;
  inset: 42px 54px 40px 78px;
  border: 1px solid rgba(141, 158, 255, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 28%, rgba(108, 121, 255, 0.16) 28% 29%, transparent 29%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.24);
  transform: perspective(460px) rotateY(-12deg) rotateX(6deg);
}

.shot-sidebar {
  position: absolute;
  left: 70px;
  top: 62px;
  z-index: 1;
  width: 54px;
  height: 176px;
  border-radius: 8px;
  background: rgba(6, 12, 29, 0.75);
}

.shot-main {
  position: absolute;
  left: 146px;
  top: 74px;
  z-index: 2;
  display: grid;
  gap: 12px;
  width: 170px;
}

.shot-main span {
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6f80ff, #7af0d4);
}

.shot-main span:nth-child(2),
.shot-main span:nth-child(4) {
  width: 74%;
  margin-left: 28px;
  background: linear-gradient(90deg, #f59e0b, #6f80ff);
}

.shot-tag,
.shot-db {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 1px solid rgba(183, 193, 255, 0.35);
  border-radius: 10px;
  background: rgba(35, 48, 93, 0.74);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
}

.tag-json {
  right: 70px;
  top: 42px;
  width: 52px;
  height: 50px;
  font-size: 12px;
}

.tag-api {
  right: 52px;
  top: 110px;
  width: 70px;
  height: 66px;
  font-size: 18px;
}

.shot-db {
  right: 50px;
  bottom: 48px;
  width: 64px;
  height: 64px;
}

.shot-db::before,
.shot-db::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 12px;
  border: 2px solid #aeb8ff;
  border-radius: 50%;
}

.shot-db::before {
  top: 14px;
}

.shot-db::after {
  bottom: 14px;
}

.about-content {
  padding: 10px 0 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.about-content > p,
.section-heading p {
  color: var(--muted);
  font-size: 17px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.principles article {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  min-height: 126px;
  padding: 24px;
}

.principles article + article {
  border-left: 1px solid var(--line);
}

.feature-icon,
.round-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-icon svg,
.round-icon svg {
  width: 26px;
  height: 26px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.principles p,
.project-card p,
.metric-block p,
.testimonial p,
.contact-copy span,
.contact-list small {
  color: var(--muted);
}

.placeholder-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
}

.placeholder-note svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--accent);
}

.principles p {
  margin-bottom: 0;
  font-size: 13px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 8px 18px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 800;
}

.section-link svg {
  width: 19px;
  height: 19px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(70, 88, 246, 0.28);
  box-shadow: var(--shadow);
}

.project-shot {
  position: relative;
  height: 170px;
  overflow: hidden;
  background: var(--surface-soft);
}

.project-shot > :not(.project-image) {
  display: none;
}

.project-shot .project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.analytics-shot {
  background:
    linear-gradient(135deg, rgba(70, 88, 246, 0.08), transparent),
    #f6f8ff;
}

.tiny-sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 54px;
  background: #18223a;
}

.chart-bars {
  position: absolute;
  right: 24px;
  top: 36px;
  display: flex;
  align-items: end;
  gap: 8px;
  width: 122px;
  height: 70px;
}

.chart-bars span {
  flex: 1;
  border-radius: 5px 5px 0 0;
  background: var(--accent-2);
}

.chart-bars span:nth-child(1) { height: 40%; }
.chart-bars span:nth-child(2) { height: 64%; }
.chart-bars span:nth-child(3) { height: 48%; }
.chart-bars span:nth-child(4) { height: 82%; }
.chart-bars span:nth-child(5) { height: 56%; }

.line-chart {
  position: absolute;
  left: 78px;
  bottom: 30px;
  width: 140px;
  height: 52px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 20%, #6c79ff 20% 22%, transparent 22% 40%, #6c79ff 40% 42%, transparent 42% 62%, #6c79ff 62% 64%, transparent 64%),
    #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.shop-shot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 58px 28px 24px;
  background: linear-gradient(180deg, #fffaf3, #f8f0e6);
}

.shop-shot span {
  border-radius: 10px;
  background:
    linear-gradient(180deg, #1d2636 0 28%, transparent 28%),
    linear-gradient(135deg, #e8d6bd, #c49d72);
  box-shadow: 0 14px 28px rgba(107, 78, 45, 0.16);
}

.api-shot {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 20px;
  background: #111827;
}

.api-sidebar {
  border-radius: 10px;
  background: #0a101d;
}

.api-table {
  display: grid;
  gap: 12px;
  align-content: center;
}

.api-table span {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #26cc74, #293443 50%);
}

.task-shot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 42px 20px;
  background: linear-gradient(135deg, #f6f7ff, #edf1ff);
}

.task-shot span {
  border: 1px solid #dce1f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(54, 70, 132, 0.07);
}

.project-body {
  position: relative;
  padding: 18px 16px 16px;
}

.project-open {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #cad2ff;
  border-radius: 8px;
  color: var(--accent);
}

.project-open svg {
  width: 17px;
  height: 17px;
}

.project-body h3 {
  padding-right: 36px;
  margin-bottom: 3px;
  font-size: 17px;
}

.project-body p {
  min-height: 44px;
  margin-bottom: 14px;
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 12px;
  font-weight: 700;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 62px;
  padding: 4px 10px 8px;
}

.skill-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
}

.skill-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 9px;
  background: transparent;
}

.skill-logo svg,
.skill-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.skill-info b {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

.skill-info i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.skill-info i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.skill-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.proof-card {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1fr 1fr;
  gap: 22px;
  align-items: center;
  min-height: 150px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-translucent);
  box-shadow: var(--shadow-soft);
}

.metric-block {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 18px;
  align-items: center;
}

.metric-block + .testimonial,
.compact {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.round-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--surface);
  color: #f5a524;
  box-shadow: 0 10px 26px rgba(31, 43, 90, 0.08);
}

.round-icon.star {
  color: #ffae22;
}

.metric-block strong {
  display: block;
  color: var(--text-strong);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-block p,
.testimonial p {
  margin: 6px 0 0;
  font-size: 14px;
}

.testimonial {
  min-height: 112px;
  padding: 18px 28px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.testimonial svg {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: #b0b8ff;
  fill: currentColor;
  stroke: none;
}

.testimonial span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 32px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface-blue), var(--surface) 48%, var(--surface-blue));
  box-shadow: var(--shadow-soft);
}

.contact-copy p {
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 700;
}

.contact-copy h2 {
  max-width: 360px;
  margin-bottom: 18px;
  font-size: 40px;
}

.contact-copy span {
  display: block;
  max-width: 350px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input {
  height: 48px;
  padding: 0 18px;
}

textarea {
  min-height: 112px;
  padding: 16px 18px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a3aabc;
}

input:focus,
textarea:focus {
  border-color: rgba(70, 88, 246, 0.5);
  outline: none;
  box-shadow: 0 0 0 4px rgba(70, 88, 246, 0.12);
}

.contact-form .button {
  width: max-content;
  min-width: 192px;
  min-height: 48px;
  border: 0;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  font-style: normal;
}

.contact-list > a,
.contact-list > div:not(.contact-socials) {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0 12px;
  align-items: center;
}

.contact-list span {
  grid-row: span 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(35, 48, 102, 0.08);
}

.contact-list span svg {
  width: 18px;
  height: 18px;
}

.contact-list b {
  color: var(--text-strong);
  font-size: 14px;
}

.contact-list small {
  font-size: 13px;
  color: var(--muted);
}

.contact-socials {
  display: flex;
  gap: 12px;
  padding-top: 4px;
}

.contact-socials a {
  width: 38px;
  height: 38px;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 32px;
  align-items: center;
  padding: 28px 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer .brand {
  font-size: 32px;
}

.site-footer .brand-chevron,
.site-footer .brand-code {
  font-size: 24px;
}

.site-footer p {
  margin: 0;
}

.site-footer a:not(.brand):hover {
  color: var(--accent);
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 20;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 1180px) {
  .site-frame {
    padding: 0 28px 28px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 520px;
  }

  .about-card,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proof-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-block + .testimonial,
  .compact {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    padding: 18px 0;
  }

  .brand {
    font-size: 34px;
  }

  .main-nav {
    justify-content: flex-start;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .header-button {
    width: max-content;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .principles article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .skills-grid {
    gap: 20px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .site-frame {
    width: min(100% - 8px, 1440px);
    padding: 0 10px 18px;
    border-radius: 14px;
  }

  #about,
  #projects,
  #skills,
  #contact {
    scroll-margin-top: 76px;
  }

  .site-header {
    top: 6px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    min-height: 56px;
    padding: 6px 8px;
    margin: 6px -4px 12px;
    border-color: rgba(210, 216, 236, 0.86);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(35, 48, 102, 0.12);
  }

  .site-header .brand {
    font-size: 25px;
  }

  .site-header .brand-chevron,
  .site-header .brand-code {
    font-size: 20px;
  }

  .site-header .header-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
  }

  .site-header .header-button svg {
    width: 16px;
    height: 16px;
  }

  .main-nav {
    display: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  h1 {
    margin-bottom: 6px;
    font-size: clamp(44px, 14vw, 58px);
    line-height: 0.97;
  }

  .hero {
    gap: 16px;
    min-height: auto;
  }

  .hero-copy {
    padding-top: 2px;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .hero-role {
    margin-bottom: 10px;
    font-size: 19px;
  }

  .hero-text {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.45;
  }

  .hero-actions,
  .social-row {
    align-items: stretch;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0;
  }

  .social-row {
    display: none;
  }

  .section-heading {
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    gap: 8px;
    padding: 0 10px;
    font-size: 12px;
  }

  .button svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
  }

  .hero-art {
    min-height: 220px;
    border-radius: 18px 14px 34px 14px;
  }

  .hero-image {
    object-position: 52% center;
  }

  .laptop-scene {
    left: 64px;
    top: 110px;
    width: 250px;
    transform: scale(0.75) perspective(700px) rotateX(6deg) rotateY(-6deg);
    transform-origin: top left;
  }

  .terminal-card {
    top: 210px;
    right: 20px;
    width: 200px;
  }

  .chart-card,
  .mug,
  .plant,
  .badge-right,
  .cube-two {
    display: none;
  }

  .badge-left {
    top: 48px;
    left: 18px;
  }

  .about-card {
    gap: 0;
    padding: 16px 14px;
  }

  .about-visual {
    display: none;
  }

  .about-content {
    padding: 0;
  }

  .about-content > p {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.5;
  }

  .principles {
    margin-top: 18px;
  }

  .principles article {
    min-height: auto;
    grid-template-columns: 46px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .dashboard-shot {
    min-height: 190px;
    padding: 18px;
  }

  .skills-grid,
  .proof-card {
    grid-template-columns: 1fr;
  }

  .project-grid {
    display: flex;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    margin: 0 -10px;
    padding: 0 10px 14px;
    scrollbar-width: none;
  }

  .project-grid::-webkit-scrollbar {
    display: none;
  }

  .project-card {
    flex: 0 0 min(76vw, 292px);
    scroll-snap-align: start;
  }

  .project-shot {
    height: 136px;
  }

  .project-body {
    padding: 14px 14px 15px;
  }

  .project-body p {
    min-height: 0;
    font-size: 13px;
  }

  .tags {
    gap: 6px;
  }

  .tags span {
    padding: 6px 8px;
    font-size: 11px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-section {
    gap: 20px;
    padding: 16px 12px;
  }

  .contact-copy h2 {
    font-size: 30px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

[data-theme="dark"] .site-frame {
  border-color: rgba(60, 72, 108, 0.6);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(140, 160, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 160, 255, 0.05) 1px, transparent 1px);
}

[data-theme="dark"] .hero-art {
  background:
    radial-gradient(circle at 40% 20%, rgba(70, 88, 200, 0.32), transparent 30%),
    linear-gradient(135deg, #1a2240 0%, #1c2342 50%, #1a2440 100%);
}

[data-theme="dark"] .hero-art::before {
  opacity: 0.25;
}

[data-theme="dark"] .button-primary,
[data-theme="dark"] .header-button {
  box-shadow: 0 14px 38px rgba(70, 88, 246, 0.45);
}

[data-theme="dark"] .project-card:hover {
  border-color: rgba(110, 126, 255, 0.4);
}

[data-theme="dark"] .testimonial svg {
  color: #5a6aff;
}

[data-theme="dark"] .round-icon {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .placeholder-note {
  background: rgba(110, 126, 255, 0.12);
  color: var(--text);
}

@media (max-width: 760px) {
  [data-theme="dark"] .site-header {
    background: rgba(20, 26, 44, 0.92);
    border-color: rgba(60, 72, 108, 0.6);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  }
}
