@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto-Medium.ttf") format("truetype");
  font-weight: 500;
}

@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --left-width: clamp(360px, 40vw, 600px);
  --button-padding-y: 12px;
  --button-padding-x: 18px;
  --button-font-size: 14px;
  --bg: #05060a;
  --surface: #0d111a;
  --card: #121823;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #f7fbff;
  --muted: #a7b4c7;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #ef5261;
  --accent-2: #d64655;
  --accent-3: #f38a95;
  --primary-solid: #ef5261;
  --primary-solid-hover: #d64655;
  --primary-text: #ffffff;
  --meta-text: #ef7d88;
  --kicker-text: #f0949d;
  --brand-mark-bg: transparent;
  --brand-mark-text: #07100e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 8px;
}

:root.light {
  --bg: #eef3f8;
  --surface: #ffffff;
  --card: #ffffff;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #0c1220;
  --muted: #425066;
  --line: rgba(12, 18, 32, 0.2);
  --primary-solid: #ef5261;
  --primary-solid-hover: #d64655;
  --primary-text: #ffffff;
  --meta-text: #b95460;
  --kicker-text: #a64652;
  --brand-mark-bg: transparent;
  --brand-mark-text: #0c1220;
  --shadow: 0 30px 80px rgba(22, 33, 54, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Oswald", "Roboto", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.032) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(184, 176, 166, 0.11), transparent 34rem),
    radial-gradient(circle at 86% 18%, rgba(143, 135, 125, 0.08), transparent 30rem),
    linear-gradient(145deg, var(--bg), #10131d 62%, var(--bg));
  background-size: 68px 68px, 68px 68px, auto, auto, auto;
  min-height: 100vh;
  overflow-x: hidden;
}

body,
button,
input,
textarea,
select {
  font-family: "Oswald", "Roboto", Arial, sans-serif;
}

:root.light body {
  background:
    linear-gradient(90deg, rgba(12,18,32,0.075) 1px, transparent 1px),
    linear-gradient(rgba(12,18,32,0.055) 1px, transparent 1px),
    radial-gradient(circle at 14% 12%, rgba(176, 168, 159, 0.14), transparent 28rem),
    radial-gradient(circle at 84% 18%, rgba(141, 132, 122, 0.1), transparent 28rem),
    linear-gradient(145deg, #eef3f8, #dde8f4 62%, #f8fbff);
  background-size: 68px 68px, 68px 68px, auto, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 20%), rgba(255, 255, 255, 0.08), transparent 18rem);
  mix-blend-mode: screen;
  z-index: 1;
}

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

button {
  font: inherit;
}

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

#particle-field,
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#particle-field {
  z-index: 0;
}

.noise {
  z-index: 2;
  opacity: 0.09;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.site-header,
main {
  position: relative;
  z-index: 3;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 10;
}

:root.light .site-header {
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.top-nav a,
.top-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  font-size: 14px;
  transition: 0.2s ease;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.top-nav a:hover,
.icon-button:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

.theme-button {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.theme-button::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.24s ease;
}

.theme-button__sun,
.theme-button__moon {
  position: absolute;
  font-size: 15px;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.24s ease, color 0.2s ease;
}

.theme-button__sun .fa-solid,
.theme-button__moon .fa-solid {
  display: block;
}

.theme-button__sun {
  color: #f2c35f;
  opacity: 0;
  transform: scale(0.7) rotate(-25deg);
}

.theme-button__moon {
  color: #9eb5c9;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

:root.light .theme-button {
  background: rgba(255, 255, 255, 0.92);
}

:root.light .theme-button::before {
  background: rgba(45, 143, 130, 0.1);
}

:root.light .theme-button__sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  color: #c98713;
}

:root.light .theme-button__moon {
  opacity: 0;
  transform: scale(0.7) rotate(25deg);
}

:root:not(.light) .theme-button::before {
  background: rgba(125, 215, 200, 0.09);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: 42px;
  padding: 72px 0 42px;
  overflow: hidden;
}

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

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

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(54px, 8.8vw, 128px);
  line-height: 0.82;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  font-size: 24px;
  line-height: 1.15;
}

.hero-text,
.section-heading p,
.contact-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-text {
  max-width: 650px;
}

.hero-actions,
.card-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ui-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--button-padding-y) var(--button-padding-x);
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
  font-size: var(--button-font-size);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  appearance: none;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ui-button i {
  line-height: 1;
  flex: 0 0 auto;
}

.ui-button span {
  flex: 0 1 auto;
}

.ui-button--primary {
  color: var(--primary-text);
  border-color: transparent;
  background: var(--primary-solid);
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(239, 82, 97, 0.22);
}

.ui-button--ghost {
  color: var(--text);
}

:root.light .ui-button--ghost {
  background: #ffffff;
  border-color: rgba(12, 18, 32, 0.28);
  color: #0c1220;
}

.ui-button:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: var(--panel-strong);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.ui-button--primary:hover {
  background: var(--primary-solid-hover);
  box-shadow: 0 16px 30px rgba(239, 82, 97, 0.3);
}

:root.light .ui-button:hover {
  border-color: rgba(239, 82, 97, 0.38);
  background: rgba(239, 82, 97, 0.08);
  color: #0c1220;
  box-shadow: 0 16px 28px rgba(12, 18, 32, 0.12);
}

:root.light .ui-button--primary:hover {
  background: var(--primary-solid-hover);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(214, 70, 85, 0.28);
}

:root.light .ui-button--ghost:hover {
  background: rgba(239, 82, 97, 0.08);
  border-color: rgba(239, 82, 97, 0.42);
  color: #0c1220;
}

:root:not(.light) .ui-button--ghost,
:root:not(.light) .ui-button--ghost:hover {
  color: var(--text);
}

.hero-visual {
  position: relative;
  min-height: 560px;
  perspective: 900px;
}

.hero-copy {
  position: relative;
}

.hero-copy::after {
  content: "PORTFOLIO / 2026";
  position: absolute;
  left: 0;
  bottom: -74px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18);
  font-size: clamp(42px, 7vw, 110px);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

:root.light .hero-copy::after {
  -webkit-text-stroke-color: rgba(12, 18, 32, 0.18);
}

.image-slice {
  position: absolute;
  inset: 11% 0 6% 14%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  transform: rotate(6deg) skewY(-7deg);
  box-shadow: var(--shadow);
}

.image-slice::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 9, 15, 0.38), rgba(184, 176, 166, 0.16));
}

.image-slice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.12);
}

.orbital-card {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

:root.light .orbital-card {
  background: rgba(247, 251, 255, 0.74);
}

.main-card {
  left: 0;
  top: 8%;
  width: min(310px, 72%);
  padding: 24px;
  animation: floatCard 7s ease-in-out infinite;
}

.card-label,
.tag,
.work-index {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-card strong,
.main-card small {
  display: block;
}

.main-card strong {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.08;
}

.main-card small {
  color: var(--muted);
}

.orbit {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  animation: orbitFloat 9s ease-in-out infinite;
}

.orbit img {
  max-width: 42px;
  max-height: 42px;
}

.orbit-one {
  right: 9%;
  top: 4%;
}

.orbit-two {
  left: 8%;
  bottom: 9%;
  animation-delay: -3s;
}

.orbit-three {
  right: 0;
  bottom: 22%;
  animation-delay: -5s;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 2px solid var(--text);
  border-radius: 8px;
  background: var(--text);
  box-shadow: var(--shadow);
}

.stats-strip div {
  padding: 22px;
  background: var(--surface);
}

:root.light .stats-strip div {
  background: #ffffff;
}

.stats-strip strong {
  display: block;
  font-size: 38px;
}

.stats-strip span {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  padding: 110px 0 0;
}

.section-heading {
  position: sticky;
  top: 100px;
  align-self: start;
}

.section-heading h2 {
  max-width: 300px;
}

.section-heading.wide {
  position: static;
  max-width: 760px;
  padding-top: 110px;
}

.pet-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.pet-card,
.work-card,
.contact-panel {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

:root.light .pet-card,
:root.light .work-card,
:root.light .contact-panel {
  border-color: rgba(12, 18, 32, 0.24);
  box-shadow: 12px 12px 0 rgba(12, 18, 32, 0.08), var(--shadow);
}

.pet-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  grid-column: span 3;
  min-height: 142px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pet-card.featured {
  grid-column: span 3;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 142px;
}

.pet-card.compact {
  grid-column: span 3;
  min-height: 142px;
}

.pet-media {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #080b12;
  isolation: isolate;
}

.pet-media::before,
.pet-media::after {
  content: none;
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(-6deg);
  z-index: -1;
}

.pet-media::after {
  display: none;
}

.pet-media img {
  width: auto;
  height: auto;
  max-width: 45px;
  max-height: 45px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
}

.pet-card.featured .pet-media img {
  max-width: 38px;
  max-height: 38px;
}

.project-code {
  position: absolute;
  left: 9px;
  top: 9px;
  color: rgba(255, 255, 255, 0.16);
  font-size: 24px;
  font-weight: 700;
  line-height: 0.8;
}

.pet-media.light-logo {
  background: #080b12;
}

:root.light .pet-media,
:root.light .pet-media.light-logo {
  background: var(--muted);
}

.pet-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 18px 16px;
  border-top: 0;
  border-left: 1px solid var(--line);
}

.pet-content p {
  display: none;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

.pet-content h3 {
  margin-bottom: 12px;
  font-size: 21px;
}

.pet-content .tag {
  margin-bottom: 7px;
}

.pet-card .card-actions {
  gap: 8px;
  margin-top: 20px;
}

.work-marquee {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  overflow: hidden;
}

.work-marquee span {
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  color: var(--muted);
  background: var(--panel);
  animation: marqueePulse 5s ease-in-out infinite;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.work-card {
  position: relative;
  grid-column: span 4;
  min-height: 285px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(184, 176, 166, 0.1), transparent 48%),
    var(--card);
}

.work-card:nth-child(4n + 1) {
  grid-column: span 5;
}

.work-card:nth-child(4n + 2) {
  grid-column: span 7;
}

.work-card:nth-child(5n) {
  background:
    linear-gradient(135deg, rgba(143, 135, 125, 0.12), transparent 44%),
    var(--card);
}

.work-card::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  transform: rotate(18deg);
  opacity: 0.8;
}

.work-card h3 {
  max-width: 520px;
  margin: 34px 0 12px;
  font-size: clamp(24px, 2.2vw, 34px);
}

.work-card p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.48;
  font-size: 15px;
}

.work-card footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
}

.work-card footer > span {
  color: var(--meta-text);
  font-size: 13px;
  line-height: 1.5;
}

.work-card footer .ui-button {
  flex: 0 0 auto;
}

.stack-section {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  padding-top: 110px;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 10px;
}

.stack-grid span {
  display: grid;
  place-items: center;
  min-height: 116px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
}

.stack-grid span:hover {
  color: var(--text);
  background: var(--panel-strong);
}

.stack-grid img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: saturate(1.1);
}

.contact-section {
  padding: 110px 0 42px;
}

.contact-panel {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 7vw, 82px);
  background:
    linear-gradient(135deg, rgba(184, 176, 166, 0.16), transparent 36%),
    linear-gradient(315deg, rgba(143, 135, 125, 0.12), transparent 40%),
    var(--card);
}

.contact-panel h2 {
  max-width: 780px;
}

.contact-panel p {
  max-width: 670px;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.28s;
}

.contact-modal.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
}

.contact-modal__blur,
.contact-modal__shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.28s ease;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.contact-modal__blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-modal__shade {
  background: rgba(7, 9, 15, 0.58);
}

.contact-modal.is-open .contact-modal__blur,
.contact-modal.is-open .contact-modal__shade {
  opacity: 1;
}

.contact-modal.is-open .contact-modal__shade {
  background: rgba(7, 9, 15, 0.58);
}

.contact-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 18px;
  width: min(880px, calc(100% - 24px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(239, 82, 97, 0.12), transparent 34%),
    var(--card);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.28s ease, opacity 0.24s ease;
  will-change: transform, opacity;
}

.contact-modal.is-open .contact-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.contact-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 35%;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
}

.contact-modal__close:hover {
  background: var(--panel-strong);
  border-color: rgba(255, 255, 255, 0.36);
}

.contact-modal__visual {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(7, 9, 15, 0.3);
}

.contact-modal__visual img {
  width: min(100%, 240px);
  height: auto;
  border-radius: 12px;
}

.contact-modal__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 34px 20px 10px;
}

.contact-modal__content h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4vw, 36px);
  line-height: 1.2;
}

.contact-modal__content p:not(.kicker) {
  max-width: 420px;
  color: var(--muted);
  font-size: 16px;
}

.contact-modal__actions {
  display: flex;
  gap: 10px;
}

:root.light .contact-modal__backdrop {
  background: transparent;
}

:root.light .contact-modal__shade {
  background: rgba(236, 241, 247, 0.74);
}

:root.light .contact-modal.is-open .contact-modal__shade {
  background: rgba(236, 241, 247, 0.74);
}

:root.light .contact-modal__dialog {
  background:
    linear-gradient(135deg, rgba(239, 82, 97, 0.08), transparent 34%),
    #ffffff;
}

:root.light .contact-modal__visual {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(212, 220, 232, 0.58)),
    #ffffff;
}

.toast {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translate(-50%, 6px) scale(0.94);
  transform-origin: 50% 100%;
  opacity: 0;
  pointer-events: none;
  padding: 5px 14px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 9, 15, 0.86);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  transition: opacity 0.18s ease, transform 0.2s ease;
  white-space: nowrap;
}

:root.light .toast {
  border-color: rgba(12, 18, 32, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: #0c1220;
  box-shadow: 0 18px 34px rgba(12, 18, 32, 0.14);
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

:root.light .toast::after {
  border-right-color: rgba(12, 18, 32, 0.22);
  border-bottom-color: rgba(12, 18, 32, 0.22);
}

.portfolio-shell {
  position: relative;
  z-index: 3;
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
}

.left-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--left-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(22px, 3.4vw, 46px);
  overflow: hidden;
  border-right: 2px solid var(--line);
  background:
    linear-gradient(135deg, rgba(184, 176, 166, 0.06), transparent 42%),
    rgba(7, 9, 15, 0.5);
  backdrop-filter: blur(14px);
}

:root.light .left-stage {
  background:
    linear-gradient(135deg, rgba(176, 168, 159, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.78);
}

.left-stage::before {
  content: "ANDRII";
  position: absolute;
  left: clamp(20px, 4vw, 54px);
  bottom: 92px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16);
  font-size: clamp(76px, 12vw, 180px);
  font-weight: 700;
  line-height: 0.8;
  pointer-events: none;
  z-index: -1;
}

:root.light .left-stage::before {
  -webkit-text-stroke-color: rgba(12, 18, 32, 0.14);
}

.left-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.left-stage .hero-copy {
  max-width: 720px;
}

.left-stage .hero-copy::after {
  display: none;
}

.left-stage h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 0.88;
}

.left-stage .hero-text {
  font-size: 15px;
  line-height: 1.55;
}

.signal-board {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 520px;
}

.signal-board span,
.left-nav a,
.left-socials a {
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.signal-board span {
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    color: var(--muted);
    background: var(--panel);
    animation: marqueePulse 5s ease-in-out infinite;
}

.left-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: 420px;
}

.left-nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: var(--text);
  font-weight: 700;
  transition: 0.2s ease;
}

.left-nav a i {
  flex: 0 0 auto;
  line-height: 1;
  padding-top: 1px;
}

.left-nav a:hover,
.left-socials a:hover {
  background: var(--panel-strong);
}

.left-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.left-socials a {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.right-flow {
  min-width: 0;
  margin-left: var(--left-width);
  padding: 0 clamp(14px, 2.8vw, 42px) 48px;
}

.right-flow .section {
  width: 100%;
  max-width: 980px;
}

.right-flow .split {
  display: block;
  padding-top: clamp(28px, 5vw, 72px);
}

.right-flow .section-heading {
  position: static;
  display: grid;
  grid-template-columns: minmax(170px, 260px) minmax(0, 1fr);
  grid-template-areas:
    "kicker title"
    "copy title";
  gap: 10px;
  align-items: start;
  margin-bottom: 18px;
}

.right-flow .section-heading .kicker {
  grid-area: kicker;
  margin-bottom: 0;
}

.right-flow .section-heading h2 {
  grid-area: title;
  align-self: end;
  max-width: none;
  margin-bottom: 0;
  text-align: right;
}

.right-flow .section-heading p:not(.kicker) {
  grid-area: copy;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.55;
}

.right-flow .section-heading.wide {
  max-width: none;
  padding-top: clamp(72px, 10vw, 130px);
}

.right-flow .stack-section {
  display: block;
  padding-top: clamp(72px, 10vw, 130px);
}

.right-flow .contact-section {
  padding-top: clamp(72px, 10vw, 130px);
}

.right-flow .work-marquee {
  margin: 0 0 14px;
}

.right-flow .pet-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.right-flow .pet-card {
  grid-column: span 2;
}

.right-flow .pet-card.featured {
  grid-column: span 2;
}

.right-flow .pet-card.compact {
  grid-column: span 2;
}

.right-flow .works-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.right-flow .work-card,
.right-flow .work-card:nth-child(4n + 1),
.right-flow .work-card:nth-child(4n + 2) {
  grid-column: span 3;
}

.right-flow .work-card:nth-child(3n + 1) {
  grid-column: span 6;
}

.right-flow .stack-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatCard {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
  }
  50% {
    transform: translate3d(0, -18px, 0) rotate(-1deg);
  }
}

@keyframes orbitFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(5deg);
  }
}

@keyframes marqueePulse {
  0%, 100% {
    opacity: 0.58;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 820px) {
  .top-nav {
    display: none;
  }

  .portfolio-shell {
    display: block;
  }

  .left-stage {
    position: relative;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .right-flow {
    margin-left: 0;
    padding: 0 16px 42px;
  }

  .right-flow .section {
    max-width: none;
  }

  .right-flow .section-heading {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kicker"
      "title"
      "copy";
    gap: 8px;
  }

  .right-flow .section-heading h2 {
    text-align: left;
  }

  .hero,
  .split,
  .stack-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 52px;
  }

  .hero-visual {
    min-height: 430px;
  }

  .section-heading {
    position: static;
  }

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

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

  .work-card,
  .work-card:nth-child(4n + 1),
  .work-card:nth-child(4n + 2),
  .right-flow .work-card,
  .right-flow .work-card:nth-child(3n + 1) {
    grid-column: span 3;
  }
}

@media (min-width: 821px) and (max-height: 800px) {
  .left-stage {
    padding: 24px 34px;
    gap: 14px;
  }

  .left-stage h1 {
    font-size: clamp(38px, 4.6vw, 62px);
  }

  .signal-board {
    display: none;
  }

  .left-stage::before {
    bottom: 58px;
    font-size: clamp(70px, 10vw, 132px);
  }
}

@media (min-width: 821px) and (max-width: 1200px) {
  .right-flow .pet-card,
  .right-flow .pet-card.featured,
  .right-flow .pet-card.compact {
    min-height: 152px;
    height: auto;
  }

  .right-flow .pet-card .card-actions {
    gap: 6px;
  }

  .right-flow .pet-card .card-actions .ui-button {
    --button-padding-y: 8px;
    --button-padding-x: 10px;
    font-size: 13px;
  }
}

@media (max-width: 720px) {
  .site-header,
  .section {
    width: min(100% - 22px, 1180px);
  }

  .left-stage {
    min-height: auto;
    padding: 22px;
  }

  .left-stage h1 {
    font-size: clamp(44px, 15vw, 72px);
  }

  .left-nav {
    grid-template-columns: 1fr;
  }

  .right-flow {
    padding-inline: 11px;
  }

  .contact-modal {
    padding: 12px;
  }

  .contact-modal__dialog {
    grid-template-columns: 1fr;
    width: min(100%, 520px);
    padding: 14px;
  }

  .contact-modal__visual {
    min-height: 240px;
    padding: 18px;
  }

  .contact-modal__content {
    padding: 6px 8px 12px;
  }

  .contact-modal__actions {
    flex-direction: column;
  }

  .contact-modal__actions .ui-button {
    width: 100%;
  }

  .right-flow .section {
    width: 100%;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .stats-strip,
  .pet-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .pet-card,
  .pet-card.featured,
  .pet-card.compact,
  .right-flow .pet-card,
  .right-flow .pet-card.featured,
  .right-flow .pet-card.compact,
  .work-card,
  .work-card:nth-child(4n + 1),
  .work-card:nth-child(4n + 2),
  .right-flow .work-card,
  .right-flow .work-card:nth-child(3n + 1) {
    grid-column: 1 / -1 !important;
  }

  .stats-strip {
    gap: 0;
  }

  .pet-card.featured {
    grid-template-columns: 1fr;
  }

  .pet-card,
  .pet-card.featured,
  .pet-card.compact {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .work-card,
  .pet-content {
    padding: 20px;
  }

  .pet-content {
    border-left: 1px solid var(--line);
  }

  .work-card footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .brand span:last-child {
    display: none;
  }

  .hero-actions,
  .card-actions,
  .contact-links {
    flex-direction: column;
  }

  .ui-button {
    width: 100%;
  }

  .pet-card .card-actions {
    flex-direction: row;
  }

  .pet-card .card-actions .ui-button {
    width: auto;
  }

  .hero-visual {
    min-height: 330px;
  }

  .main-card {
    width: 76%;
    padding: 18px;
  }

  .main-card strong {
    font-size: 22px;
  }

  .orbit {
    width: 62px;
    height: 62px;
  }

  .orbit img {
    max-width: 31px;
    max-height: 31px;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }
  .right-flow .stack-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  

  .pet-card,
  .pet-card.featured,
  .pet-card.compact {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 136px;
  }

  .pet-media img,
  .pet-card.featured .pet-media img {
    max-width: 34px;
    max-height: 34px;
  }

  .project-code {
    font-size: 22px;
  }
}

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