:root {
  --bg: #0b0f19;
  --bg-soft: #111827;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: #151b29;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --text-muted: #98a2b3;
  --accent: #f04b45;
  --accent-light: #ff7a59;
  --accent-dark: #c92e2a;
  --on-accent: #fff;
  --container: 1180px;
  --header-height: 76px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-soft: #e9edf4;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #e5eaf2;
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(15, 23, 42, 0.2);
  --text: #111827;
  --text-muted: #5d6878;
  --accent: #dc3833;
  --accent-light: #d94734;
  --accent-dark: #b92724;
  --shadow: 0 28px 70px rgba(37, 44, 60, 0.13);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 5%, rgba(240, 75, 69, 0.08), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: color 220ms ease, background-color 220ms ease;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  color: #fff;
  background: rgba(240, 75, 69, 0.55);
}

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: #303849;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

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

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: -0.035em;
}

:focus-visible {
  outline: 3px solid rgba(255, 122, 89, 0.9);
  outline-offset: 4px;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 112px 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.site-header.scrolled {
  border-color: var(--border);
  background: rgba(11, 15, 25, 0.86);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand span {
  color: var(--accent);
}

.primary-navigation {
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-navigation a {
  position: relative;
  padding: 8px 0;
  color: #c7ced9;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 180ms ease;
}

.primary-navigation a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.primary-navigation a:hover,
.primary-navigation a[aria-current="true"] {
  color: #fff;
}

.primary-navigation a:hover::after,
.primary-navigation a[aria-current="true"]::after {
  transform: scaleX(1);
}

.language-toggle,
.theme-toggle,
.filter-button {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  border-color: rgba(240, 75, 69, 0.55);
  color: var(--on-accent);
  background: var(--accent);
  transform: rotate(10deg);
}

.language-toggle {
  min-width: 48px;
  padding: 8px 13px;
  border-color: rgba(240, 75, 69, 0.48);
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease;
}

html[data-theme="light"] .site-header.scrolled {
  background: rgba(244, 246, 250, 0.88);
}

html[data-theme="light"] .brand,
html[data-theme="light"] .primary-navigation a:hover,
html[data-theme="light"] .primary-navigation a[aria-current="true"],
html[data-theme="light"] .language-toggle,
html[data-theme="light"] .menu-toggle {
  color: var(--text);
}

html[data-theme="light"] .primary-navigation a {
  color: #4c5869;
}

html[data-theme="light"] .button-primary,
html[data-theme="light"] .filter-button.active,
html[data-theme="light"] .social-links a:hover,
html[data-theme="light"] .scroll-top:hover,
html[data-theme="light"] .skip-link,
html[data-theme="light"] .language-toggle:hover {
  color: var(--on-accent);
}

html[data-theme="light"] .button-secondary,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .contact-icon,
html[data-theme="light"] .social-links a {
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .portrait-label {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .skill-index {
  color: #8b95a5;
}

html[data-theme="light"] .filter-button:hover {
  color: var(--text);
}

html[data-theme="light"] .project-link,
html[data-theme="light"] .form-field label {
  color: var(--text);
}

html[data-theme="light"] .contact-form {
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .form-field input,
html[data-theme="light"] .form-field textarea {
  background: rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] .form-field input:focus,
html[data-theme="light"] .form-field textarea:focus {
  background: #fff;
}

html[data-theme="light"] .scroll-top {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.language-toggle:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px 9px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  display: flex;
  min-height: 100svh;
  align-items: center;
  padding-top: calc(var(--header-height) + 70px);
  overflow: hidden;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 80px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.eyebrow > span:first-child {
  width: 36px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  max-width: 750px;
  margin-bottom: 24px;
  font-size: clamp(3.7rem, 8vw, 7.25rem);
  font-weight: 800;
  letter-spacing: -0.075em;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(115deg, var(--accent) 10%, var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-description {
  max-width: 600px;
  margin-bottom: 34px;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions,
.cv-links,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 750;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 34px rgba(240, 75, 69, 0.23);
}

.button-primary:hover {
  box-shadow: 0 16px 44px rgba(240, 75, 69, 0.34);
}

.button-secondary {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
}

.button-secondary:hover {
  border-color: rgba(240, 75, 69, 0.55);
  background: rgba(240, 75, 69, 0.08);
}

.cv-links {
  margin-top: 25px;
}

.cv-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 4px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 650;
  transition: color 180ms ease;
}

.cv-links a + a::before {
  width: 1px;
  height: 18px;
  margin-right: 8px;
  background: var(--border-strong);
  content: "";
}

.cv-links a:hover,
.cv-links i {
  color: var(--accent-light);
}

.portrait-wrap {
  position: relative;
  width: min(100%, 470px);
  margin-inline: auto;
  isolation: isolate;
}

.portrait-frame {
  position: relative;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 44% 56% 58% 42% / 42% 38% 62% 58%;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portrait-frame::after {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: inherit;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.03);
}

.portrait-orbit {
  position: absolute;
  inset: -34px;
  z-index: -1;
  border: 1px solid rgba(240, 75, 69, 0.25);
  border-radius: 48% 52% 46% 54%;
  transform: rotate(-8deg);
}

.portrait-orbit::before,
.portrait-orbit::after {
  position: absolute;
  border-radius: 999px;
  content: "";
}

.portrait-orbit::before {
  top: 16%;
  right: -5px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  box-shadow: 0 0 30px var(--accent);
}

.portrait-orbit::after {
  right: 18%;
  bottom: -22px;
  width: 7px;
  height: 7px;
  background: var(--accent-light);
}

.portrait-label {
  position: absolute;
  right: -18px;
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: #dce2eb;
  background: rgba(17, 24, 39, 0.9);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #44d18d;
  box-shadow: 0 0 0 5px rgba(68, 209, 141, 0.12);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}

.hero-glow-one {
  top: 28%;
  left: -130px;
  width: 320px;
  height: 320px;
  background: rgba(240, 75, 69, 0.12);
}

.hero-glow-two {
  right: -160px;
  bottom: 2%;
  width: 380px;
  height: 380px;
  background: rgba(255, 122, 89, 0.07);
}

.skills-section {
  border-block: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.035));
}

.section-heading {
  margin-bottom: 48px;
}

.section-heading.centered {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.section-heading .section-kicker {
  margin-bottom: 12px;
}

.section-heading h2,
.contact-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(2.35rem, 5vw, 4rem);
}

.section-heading > p,
.section-heading > div > p:last-child,
.contact-copy > p:not(.section-kicker) {
  color: var(--text-muted);
  font-size: 1.04rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-card {
  position: relative;
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.skill-card::after {
  position: absolute;
  right: -46px;
  bottom: -62px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(240, 75, 69, 0.15);
  border-radius: 50%;
  content: "";
}

.skill-card:hover {
  border-color: rgba(240, 75, 69, 0.38);
  background: rgba(240, 75, 69, 0.045);
  transform: translateY(-6px);
}

.skill-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 42px;
  place-items: center;
  border: 1px solid rgba(240, 75, 69, 0.28);
  border-radius: 14px;
  color: var(--accent-light);
  background: rgba(240, 75, 69, 0.08);
  font-size: 1.15rem;
}

.skill-index {
  position: absolute;
  top: 28px;
  right: 28px;
  color: #4b5565;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.skill-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.skill-card > p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.projects-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.projects-heading > div {
  max-width: 690px;
}

.text-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  color: var(--accent-light);
  font-size: 0.9rem;
  font-weight: 750;
}

.text-link:hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

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

.filter-button {
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.filter-button:hover {
  color: #fff;
  border-color: rgba(240, 75, 69, 0.48);
}

.filter-button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.project-count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

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

.project-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  border-color: rgba(240, 75, 69, 0.38);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
  transform: translateY(-6px);
}

.project-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-strong);
}

.project-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11, 15, 25, 0.48));
  content: "";
  pointer-events: none;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 450ms ease, opacity 300ms ease;
}

.project-image.image-unavailable {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(240, 75, 69, 0.12), transparent),
    var(--surface-strong);
}

.project-image.image-unavailable::before {
  color: var(--accent-light);
  content: "\f121";
  font-family: "Font Awesome 6 Free";
  font-size: 2rem;
  font-weight: 900;
}

.project-visual {
  display: grid;
  place-items: center;
  isolation: isolate;
}

.project-visual::before,
.project-visual::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  filter: blur(2px);
}

.project-visual::before {
  top: -40%;
  left: -5%;
  width: 65%;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.14);
}

.project-visual::after {
  top: auto;
  right: -16%;
  bottom: -55%;
  left: auto;
  width: 75%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: none;
}

.project-visual i {
  position: relative;
  z-index: 1;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 26px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.2);
  font-size: 2rem;
  backdrop-filter: blur(8px);
}

.project-visual-shop {
  background: linear-gradient(135deg, #ff875f, #d93d5c 58%, #6f2b8d);
}

.project-visual-cards {
  background: linear-gradient(135deg, #133f38, #147a5a 52%, #69c880);
}

.project-visual-chroma {
  background: linear-gradient(125deg, #5535d4, #206de1 36%, #16bfa7 67%, #f0b333);
}

.project-card:hover .project-image img {
  opacity: 1;
  transform: scale(1.045);
}

.project-body {
  display: flex;
  min-height: 184px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.project-type,
.project-new {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-type {
  color: var(--accent-light);
  background: rgba(240, 75, 69, 0.1);
}

.project-new {
  color: #9be2bc;
  background: rgba(68, 209, 141, 0.11);
}

html[data-theme="light"] .project-new {
  color: #167a49;
  background: rgba(28, 163, 92, 0.11);
}

.project-body h3 {
  margin-bottom: 22px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: #dce2eb;
  font-size: 0.84rem;
  font-weight: 700;
}

.project-link i {
  color: var(--accent-light);
  font-size: 0.72rem;
  transition: transform 180ms ease;
}

.project-link:hover i {
  transform: translate(2px, -2px);
}

.project-link-disabled {
  color: var(--text-muted);
  cursor: default;
}

.project-link-disabled i {
  color: var(--text-muted);
}

.project-link-disabled:hover i {
  transform: none;
}

.noscript-message {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-align: center;
}

.contact-section {
  padding-top: 84px;
}

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 70px;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0 100%, rgba(240, 75, 69, 0.12), transparent 26rem),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.contact-copy {
  align-self: center;
}

.contact-copy .section-kicker {
  margin-bottom: 14px;
}

.contact-copy > p:not(.section-kicker) {
  max-width: 440px;
  margin-bottom: 34px;
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  font-size: 0.92rem;
  font-weight: 700;
}

.contact-email small {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-icon,
.social-links a {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--accent-light);
  background: rgba(255, 255, 255, 0.035);
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.social-links {
  margin-top: 27px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.social-links a:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  transform: translateY(-2px);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(11, 15, 25, 0.64);
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: #d7dde7;
  font-size: 0.78rem;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.form-field input {
  height: 50px;
  padding: 0 15px;
}

.form-field textarea {
  min-height: 132px;
  padding: 13px 15px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px rgba(240, 75, 69, 0.1);
}

.submit-button {
  width: 100%;
  border: 0;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.form-note {
  margin: -4px 0 0;
  color: #707b8d;
  font-size: 0.72rem;
  text-align: center;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: #fff;
  background: rgba(21, 27, 41, 0.88);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.scroll-top[hidden] {
  display: none;
}

.scroll-top:hover {
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-3px);
}

@media (max-width: 1020px) {
  .hero-layout {
    grid-template-columns: 1fr 0.8fr;
    gap: 50px;
  }

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

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

  .contact-panel {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 68px;
  }

  .container {
    width: min(100% - 32px, var(--container));
  }

  .section {
    padding: 84px 0;
  }

  .menu-toggle {
    position: relative;
    z-index: 2;
    display: block;
  }

  .primary-navigation {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    min-height: 100svh;
    padding: calc(var(--header-height) + 46px) 24px 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    visibility: hidden;
    background: rgba(11, 15, 25, 0.98);
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  }

  html[data-theme="light"] .primary-navigation {
    background: rgba(244, 246, 250, 0.98);
  }

  .primary-navigation[data-open="true"] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .primary-navigation a {
    padding: 13px 6px;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
  }

  .primary-navigation a::after {
    display: none;
  }

  .nav-actions {
    align-self: flex-start;
    margin-top: 18px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 74px);
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 70px;
  }

  .hero-content {
    order: 2;
  }

  .portrait-wrap {
    order: 1;
    width: min(72vw, 390px);
  }

  .hero h1 {
    font-size: clamp(3.3rem, 16vw, 5.4rem);
  }

  .projects-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .project-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-panel {
    padding: 30px 22px;
    border-radius: 24px;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 72px 0;
  }

  .hero {
    padding-top: calc(var(--header-height) + 58px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .cv-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .cv-links a + a::before {
    display: none;
  }

  .portrait-label {
    right: -10px;
    bottom: 18px;
  }

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

  .skill-card {
    min-height: 220px;
  }

  .project-filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-email {
    align-items: flex-start;
    overflow-wrap: anywhere;
  }

  .contact-form {
    padding: 22px 16px;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .scroll-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
