:root {
  color-scheme: light;
  --font-sans: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bg: #eff3fa;
  --bg-secondary: #dbe4f1;
  --panel: rgba(255, 255, 255, 0.4);
  --panel-strong: rgba(255, 255, 255, 0.6);
  --panel-border: rgba(255, 255, 255, 0.5);
  --text: #141c28;
  --text-soft: #546172;
  --accent: #7f9fff;
  --accent-strong: #6385ee;
  --accent-shadow: rgba(99, 133, 238, 0.24);
  --shadow: 0 24px 80px rgba(58, 87, 138, 0.16);
  --hero-shadow: 0 30px 90px rgba(44, 70, 116, 0.16);
  --wave-a: rgba(127, 159, 255, 0.2);
  --wave-b: rgba(255, 255, 255, 0.12);
  --scrollbar-track: rgba(188, 204, 225, 0.54);
  --scrollbar-thumb: rgba(99, 133, 238, 0.62);
  --scrollbar-thumb-hover: rgba(83, 117, 222, 0.78);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --container: 1180px;
}

body[data-theme="dark"],
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06080c;
  --bg-secondary: #11161d;
  --panel: rgba(14, 18, 24, 0.58);
  --panel-strong: rgba(22, 28, 36, 0.74);
  --panel-border: rgba(182, 198, 220, 0.12);
  --text: #f5f7fb;
  --text-soft: #a8b4c6;
  --accent: #7da2ff;
  --accent-strong: #4f78dd;
  --accent-shadow: rgba(79, 120, 221, 0.28);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --hero-shadow: 0 34px 96px rgba(0, 0, 0, 0.4);
  --wave-a: rgba(92, 130, 204, 0.16);
  --wave-b: rgba(220, 232, 255, 0.06);
  --scrollbar-track: #11161d;
  --scrollbar-thumb: #2c394b;
  --scrollbar-thumb-hover: #3a4a61;
}

body.school-theme {
  --bg: #edf4ff;
  --bg-secondary: #d7e6ff;
  --panel: rgba(255, 255, 255, 0.42);
  --panel-strong: rgba(255, 255, 255, 0.64);
  --panel-border: rgba(157, 187, 255, 0.28);
  --text: #13233f;
  --text-soft: #4d658b;
  --accent: #4f83ff;
  --accent-strong: #f0c84f;
  --accent-shadow: rgba(79, 131, 255, 0.22);
  --shadow: 0 24px 80px rgba(67, 106, 173, 0.16);
  --hero-shadow: 0 30px 90px rgba(67, 106, 173, 0.16);
  --wave-a: rgba(79, 131, 255, 0.2);
  --wave-b: rgba(240, 200, 79, 0.1);
  --scrollbar-track: rgba(192, 214, 247, 0.64);
  --scrollbar-thumb: rgba(79, 131, 255, 0.62);
  --scrollbar-thumb-hover: rgba(240, 200, 79, 0.86);
}

body.school-theme[data-theme="dark"],
html[data-theme="dark"] body.school-theme,
html.school-theme[data-theme="dark"] {
  --bg: #0d1a31;
  --bg-secondary: #16284a;
  --panel: rgba(16, 32, 62, 0.5);
  --panel-strong: rgba(24, 44, 82, 0.68);
  --panel-border: rgba(255, 212, 92, 0.16);
  --text: #eef4ff;
  --text-soft: #bdd0f5;
  --accent: #6da2ff;
  --accent-strong: #f0c84f;
  --accent-shadow: rgba(109, 162, 255, 0.22);
  --shadow: 0 28px 80px rgba(3, 10, 26, 0.38);
  --hero-shadow: 0 34px 96px rgba(3, 10, 26, 0.42);
  --wave-a: rgba(67, 120, 219, 0.18);
  --wave-b: rgba(240, 200, 79, 0.1);
  --scrollbar-track: #16284a;
  --scrollbar-thumb: #2b4a78;
  --scrollbar-thumb-hover: #3a629c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

html,
body {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
  transition: background 0.5s ease, color 0.5s ease;
}

.cursor-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
  background:
    radial-gradient(
      280px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.06) 24%,
      transparent 68%
    );
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
}

body[data-theme="dark"] .cursor-spotlight {
  background:
    radial-gradient(
      300px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
      rgba(244, 247, 255, 0.08) 0%,
      rgba(174, 198, 255, 0.04) 26%,
      transparent 68%
    );
}

body.school-theme .cursor-spotlight {
  background:
    radial-gradient(
      300px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
      rgba(124, 181, 255, 0.12) 0%,
      rgba(255, 224, 118, 0.05) 26%,
      transparent 68%
    );
}

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

video {
  width: 100%;
  height: auto;
  display: block;
}

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

button {
  font: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  opacity: 0.08;
}

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

.parallax-bg {
  position: fixed;
  inset: -12%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, var(--wave-a) 0%, transparent 28%),
    radial-gradient(circle at 78% 22%, var(--wave-b) 0%, transparent 24%),
    radial-gradient(circle at 52% 78%, color-mix(in srgb, var(--wave-a) 72%, transparent) 0%, transparent 30%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 48%, var(--bg) 100%);
  background-size: 140% 140%, 150% 150%, 160% 160%, 100% 100%;
  background-position: 0% 0%, 100% 0%, 50% 100%, 0% 0%;
  opacity: 1;
  filter: blur(0px);
  will-change: transform, background-position;
  animation: ambientFlow 18s ease-in-out infinite alternate;
}

@keyframes ambientFlow {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1.02);
    background-position: 0% 8%, 100% 4%, 52% 100%, 0% 0%;
  }

  25% {
    transform: translate3d(1%, 1.2%, 0) scale(1.04);
    background-position: 10% 2%, 92% 10%, 48% 92%, 0% 0%;
  }

  50% {
    transform: translate3d(2.2%, -1.4%, 0) scale(1.05);
    background-position: 16% 10%, 84% 4%, 54% 86%, 0% 0%;
  }

  75% {
    transform: translate3d(-0.8%, 2%, 0) scale(1.03);
    background-position: 8% 16%, 96% 14%, 46% 94%, 0% 0%;
  }

  100% {
    transform: translate3d(-2%, 0.8%, 0) scale(1.04);
    background-position: 2% 12%, 88% 6%, 58% 88%, 0% 0%;
  }
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.75;
}

.orb-one {
  top: 8%;
  left: -4%;
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, rgba(144, 173, 255, 0.42), rgba(255, 255, 255, 0.16));
}

.orb-two {
  top: 48%;
  right: -8%;
  width: 420px;
  height: 420px;
  background: linear-gradient(135deg, rgba(255, 202, 230, 0.28), rgba(133, 171, 255, 0.2));
}

.orb-three {
  bottom: -6%;
  left: 28%;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(111, 208, 255, 0.18));
}

body[data-theme="dark"] .orb-one {
  background: linear-gradient(135deg, rgba(88, 121, 184, 0.24), rgba(227, 236, 255, 0.08));
}

body[data-theme="dark"] .orb-two {
  background: linear-gradient(135deg, rgba(46, 64, 98, 0.3), rgba(112, 140, 194, 0.14));
}

body[data-theme="dark"] .orb-three {
  background: linear-gradient(135deg, rgba(220, 232, 255, 0.08), rgba(60, 82, 122, 0.18));
}

body.school-theme .orb-one {
  background: linear-gradient(135deg, rgba(79, 131, 255, 0.34), rgba(255, 230, 122, 0.16));
}

body.school-theme .orb-two {
  background: linear-gradient(135deg, rgba(255, 215, 107, 0.24), rgba(100, 146, 255, 0.18));
}

body.school-theme .orb-three {
  background: linear-gradient(135deg, rgba(112, 157, 255, 0.18), rgba(255, 234, 154, 0.14));
}

body.school-theme[data-theme="dark"] .orb-one {
  background: linear-gradient(135deg, rgba(86, 133, 255, 0.26), rgba(255, 210, 82, 0.12));
}

body.school-theme[data-theme="dark"] .orb-two {
  background: linear-gradient(135deg, rgba(255, 204, 73, 0.18), rgba(78, 119, 214, 0.16));
}

body.school-theme[data-theme="dark"] .orb-three {
  background: linear-gradient(135deg, rgba(129, 170, 255, 0.12), rgba(255, 219, 104, 0.1));
}

.site-header {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 40;
  padding: 0 16px;
  pointer-events: none;
}

.nav-shell,
.glass,
.contact-card {
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  transition: background 0.55s ease, border-color 0.55s ease, box-shadow 0.55s ease, color 0.55s ease;
}

.nav-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 999px;
  pointer-events: auto;
  isolation: isolate;
}

.nav-dock {
  position: relative;
}

.nav-active-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--indicator-size, 56px);
  height: var(--indicator-size, 56px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 24px rgba(10, 16, 28, 0.12);
  transform: translate(var(--indicator-x, 0), var(--indicator-y, 0)) scale(0.82);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    width 320ms ease,
    height 320ms ease,
    opacity 220ms ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.nav-active-indicator.is-visible {
  opacity: 1;
  transform: translate(var(--indicator-x, 0), var(--indicator-y, 0)) scale(1);
}

.logo,
.nav-center-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: visible;
}

.nav-center-logo {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: 0 16px 32px rgba(11, 17, 28, 0.28);
}

.logo img,
.nav-center-logo img {
  display: block;
  width: auto;
  height: 30px;
  max-width: 54px;
  object-fit: contain;
  transform-origin: center center;
  margin: 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 0;
}

.site-nav-left {
  justify-content: flex-end;
}

.site-nav-right {
  justify-content: flex-start;
}

.nav-icon-link {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-soft);
  position: relative;
  z-index: 1;
  transition: transform 220ms ease, color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.nav-icon-link::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translate(-50%, 8px);
  min-width: max-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 30px rgba(4, 10, 20, 0.22);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.nav-icon-link:hover::after,
.nav-icon-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.nav-center-logo::after {
  content: none;
}

.nav-icon-link svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  position: relative;
  z-index: 1;
  transition: transform 220ms ease;
}

.nav-icon-link:hover,
.nav-icon-link:focus-visible {
  color: var(--text);
  transform: translateY(-3px);
}

.nav-icon-link.is-active,
.nav-center-logo.is-active {
  color: #ffffff;
}

.nav-icon-link.is-active {
  transform: translateY(-2px);
}

.nav-icon-link.is-active svg {
  transform: scale(1.06);
}

.nav-center-logo.is-active {
  transform: scale(1.04);
  box-shadow: 0 18px 34px rgba(255, 255, 255, 0.12);
}

.nav-center-logo.is-active::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.26);
  animation: navPulseRing 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: none;
}

.nav-theme-toggle {
  display: none;
}

body[data-theme="dark"] .nav-center-logo {
  border-color: #0a0f17;
}

body:not([data-theme="dark"]) .nav-center-logo {
  border-color: #dbe4f1;
}

body:not([data-theme="dark"]) .nav-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(236, 242, 251, 0.96));
  border-color: rgba(128, 148, 182, 0.16);
}

body:not([data-theme="dark"]) .nav-icon-link {
  color: #5d6d83;
}

body:not([data-theme="dark"]) .nav-icon-link:hover,
body:not([data-theme="dark"]) .nav-icon-link:focus-visible {
  color: #182230;
}

body:not([data-theme="dark"]) .nav-icon-link.is-active {
  color: #182230;
}

body:not([data-theme="dark"]) .nav-center-logo {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(236, 242, 251, 1));
  box-shadow: 0 14px 28px rgba(98, 120, 160, 0.18);
}

body:not([data-theme="dark"]) .nav-center-logo.is-active {
  box-shadow: 0 16px 30px rgba(98, 120, 160, 0.2);
}

body:not([data-theme="dark"]) .nav-center-logo.is-active::before {
  border-color: rgba(24, 34, 48, 0.18);
}

body:not([data-theme="dark"]) .nav-active-indicator {
  background: rgba(24, 34, 48, 0.08);
  box-shadow: inset 0 0 0 1px rgba(24, 34, 48, 0.08), 0 10px 24px rgba(98, 120, 160, 0.1);
}

body:not([data-theme="dark"]) .nav-icon-link::after {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(120, 144, 184, 0.16);
  box-shadow: 0 14px 28px rgba(98, 120, 160, 0.16);
  color: #182230;
}

@keyframes navPulseRing {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

main {
  padding: 32px 0 118px;
}

.site-footer {
  padding-bottom: 120px;
}

.scroll-top-button {
  bottom: 112px;
}

@media (max-width: 760px) {
  .site-header {
    bottom: 10px;
    padding: 0 10px;
  }

  .nav-shell {
    width: min(calc(100vw - 20px), 340px);
    gap: 8px;
    padding: 10px 12px;
  }

  .site-nav {
    gap: 6px;
    justify-content: space-evenly;
  }

  .nav-icon-link {
    width: 42px;
    height: 42px;
  }

  .nav-icon-link svg {
    width: 20px;
    height: 20px;
  }

  .nav-center-logo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .logo img,
  .nav-center-logo img {
    height: 26px;
    max-width: 46px;
    transform: none;
  }

  main {
    padding-top: 24px;
    padding-bottom: 108px;
  }

  .site-footer {
    padding-bottom: 108px;
  }

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

  .floating-theme-toggle {
    right: 16px;
    top: 16px;
    bottom: auto;
  }
}

.site-nav a,
.social-links a {
  color: var(--text-soft);
  transition: color 0.55s ease, opacity 180ms ease;
}

.site-nav a:hover,
.social-links a:hover {
  color: var(--text);
}

.theme-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.theme-toggle-track {
  position: relative;
  width: 124px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  transition: background 0.55s ease, border-color 0.55s ease;
}

.theme-icon {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: color 0.55s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 56px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 12px 30px rgba(24, 37, 72, 0.16);
  transition: transform 0.4s ease, background 0.55s ease, box-shadow 0.55s ease;
}

body[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(60px);
  background: linear-gradient(180deg, rgba(120, 150, 214, 0.34), rgba(42, 55, 82, 0.74));
}

main,
.site-footer {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

main {
  padding: 32px 0 20px;
}

.section {
  padding: 24px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 24px;
  align-items: start;
}

.hero-copy,
.hero-panel,
.skill-card,
.project-card,
.about-grid .glass,
.contact-card {
  border-radius: var(--radius-xl);
}

.hero-copy,
.hero-panel {
  padding: 30px;
  box-shadow: var(--hero-shadow);
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(3.4rem, 9vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.08em;
}

.subtitle {
  margin-bottom: 16px;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: var(--text-soft);
}

.hero-text,
.about-grid p,
.skill-card p,
.project-copy p,
.contact-card p,
.hero-highlights span {
  color: var(--text-soft);
  line-height: 1.68;
  font-size: 1rem;
}

.hero-text {
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.project-card:hover,
.skill-card:hover,
.social-links a:hover {
  transform: translateY(-3px);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 34px var(--accent-shadow);
}

.button-secondary {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 0.55s ease, background 0.55s ease, color 0.55s ease;
}

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

.hero-highlights article {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.55s ease, border-color 0.55s ease;
}

.hero-highlights strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.hero-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid var(--panel-border);
  font-size: 0.8rem;
  color: var(--text-soft);
  transition: background 0.55s ease, border-color 0.55s ease, color 0.55s ease;
}

.hero-portrait {
  overflow: hidden;
  aspect-ratio: 4 / 4.4;
  border-radius: calc(var(--radius-xl) - 8px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(73, 112, 193, 0.14));
  position: relative;
}

body[data-theme="dark"] .hero-portrait {
  background: linear-gradient(135deg, rgba(233, 206, 178, 0.08), rgba(115, 74, 48, 0.16));
}

.hero-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.42s ease, filter 0.55s ease;
}

.profile-image-main {
  opacity: 1;
  visibility: visible;
}

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

.section-heading h2,
.contact-card h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.about-grid,
.skills-grid,
.projects-grid {
  display: grid;
  gap: 20px;
}

.work-categories {
  display: grid;
  gap: 22px;
}

.work-category {
  position: relative;
  padding: 26px;
}

.work-category-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: var(--radius-xl);
}

.work-category-head,
.work-category .projects-grid {
  position: relative;
  z-index: 1;
}

.work-category .projects-grid {
  align-items: start;
}

.work-category:hover {
  transform: translateY(-3px);
}

.work-category-head {
  margin-bottom: 18px;
}

.work-category-head h3,
.project-copy h4 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.about-grid .glass,
.skill-card,
.project-card,
.contact-card {
  padding: 26px;
}

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

.skill-card,
.project-card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.skill-card h3,
.project-copy h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.tools-card {
  grid-column: span 2;
}

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

.tool-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.2;
  transition: background 0.55s ease, border-color 0.55s ease, color 0.55s ease;
}

.tool-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  flex: 0 0 36px;
}

.tool-name {
  font-weight: 600;
  color: var(--text);
}

.tool-ai .tool-icon {
  background: linear-gradient(180deg, #ff9a00, #d67200);
}

.tool-ps .tool-icon {
  background: linear-gradient(180deg, #31a8ff, #0d6fd1);
}

.tool-canva .tool-icon {
  background: linear-gradient(180deg, #18c3c8, #0f8ca8);
}

.tool-pr .tool-icon {
  background: linear-gradient(180deg, #ea77ff, #a73cc8);
}

.tool-ae .tool-icon {
  background: linear-gradient(180deg, #c58cff, #7c4dca);
}

.tool-capcut .tool-icon {
  background: linear-gradient(180deg, #3f4658, #11161f);
}

.tool-chatgpt .tool-icon {
  background: linear-gradient(180deg, #3ecf8e, #1e8b63);
}

.tool-gemini .tool-icon {
  background: linear-gradient(180deg, #6da2ff, #4f6bff);
}

.tool-icon-img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px;
}

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

.project-card {
  overflow: hidden;
  height: fit-content;
  align-self: start;
}

.project-media {
  margin: -26px -26px 20px;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);
  position: relative;
  isolation: isolate;
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(10, 16, 30, 0.2));
  z-index: -1;
}

.project-media span {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.media-card {
  pointer-events: none;
}

.page-intro {
  padding-bottom: 10px;
}

.bento-grid {
  column-count: 3;
  column-gap: 20px;
}

.bento-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  isolation: isolate;
  break-inside: avoid;
  cursor: zoom-in;
}

.bento-card::after,
.video-frame::after,
.logo-face .project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--interactive-tint, transparent) 10%, transparent),
      color-mix(in srgb, var(--interactive-tint, transparent) 34%, transparent)
    );
  opacity: 0;
  transition: opacity 0.5s ease, background 0.5s ease;
}

.bento-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.5s ease;
  cursor: zoom-in;
}

.bento-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.02), rgba(8, 12, 22, 0.72));
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.gallery-page .bento-overlay {
  display: none;
}

.bento-overlay h4,
.bento-overlay p {
  margin: 0;
  color: #ffffff;
  transform: translateY(18px);
  transition: transform 0.45s ease;
}

.bento-overlay h4 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.bento-overlay p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.bento-card:hover img,
.bento-card:focus-within img,
.video-card:hover .video-frame img,
.video-card:hover .video-frame video,
.logo-disclosure:hover .logo-face img,
.logo-card.is-open .logo-face img,
.logo-disclosure:focus-visible .logo-face img {
  transform: scale(1.05);
}

.bento-card:hover img,
.bento-card:focus-within img,
.video-card:hover .video-frame img,
.video-card:hover .video-frame video,
.logo-disclosure:hover .logo-face img,
.logo-card.is-open .logo-face img,
.logo-disclosure:focus-visible .logo-face img {
  filter: saturate(0.95) contrast(1.03) brightness(0.92);
}

.bento-card:hover .bento-overlay,
.bento-card:focus-within .bento-overlay {
  opacity: 1;
}

.bento-card:hover .bento-overlay h4,
.bento-card:hover .bento-overlay p,
.bento-card:focus-within .bento-overlay h4,
.bento-card:focus-within .bento-overlay p {
  transform: translateY(0);
}

.bento-card:hover::after,
.bento-card:focus-within::after,
.video-card:hover .video-frame::after,
.logo-disclosure:hover .logo-face .project-media::after,
.logo-card.is-open .logo-face .project-media::after,
.logo-disclosure:focus-visible .logo-face .project-media::after {
  opacity: 1;
}

.video-grid {
  column-count: 2;
  column-gap: 22px;
}

.video-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  padding: 20px;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  break-inside: avoid;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.video-frame img,
.video-frame video {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease, filter 0.5s ease;
}

.video-frame video {
  background: #000000;
}

.video-card:hover {
  transform: translateY(-4px);
}

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

.logo-grid {
  display: grid;
  align-items: start;
}

.media-card,
.logo-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

.media-card .project-media,
.logo-face .project-media {
  position: relative;
  margin: 0 0 18px;
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.media-card img,
.media-card video,
.logo-face img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease, filter 0.5s ease;
}

.media-card video {
  background: #000000;
}

.media-card .project-copy,
.logo-face .project-copy {
  padding: 0;
}

.freelance-category .media-grid {
  align-items: start;
}

.freelance-category .freelance-card {
  display: flex;
  flex-direction: column;
  height: auto;
}

.freelance-category .freelance-card .project-media {
  min-height: 0;
  aspect-ratio: 9 / 16;
  align-items: center;
  justify-content: center;
}

.freelance-category .freelance-card .project-copy {
  display: grid;
  gap: 10px;
}

.freelance-category .freelance-card img,
.freelance-category .freelance-card video {
  width: 100%;
  height: 100%;
}

.freelance-category .freelance-card img {
  object-fit: cover;
  transform: scale(1.08);
}

.freelance-category .freelance-card video {
  object-fit: cover;
}

.freelance-category .freelance-card:nth-child(1) img {
  object-position: center top;
}

.freelance-category .freelance-card:nth-child(2) img {
  object-position: center center;
  transform: scale(1.22);
}

.logo-grid .media-card .project-media {
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: 1px solid rgba(120, 144, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

body:not([data-theme="dark"]) .logo-grid .media-card:nth-child(1) .project-media {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.58), transparent 28%),
    linear-gradient(180deg, #4f607b 0%, #3f4f68 100%);
}

body:not([data-theme="dark"]) .logo-grid .media-card:nth-child(2) .project-media {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.54), transparent 28%),
    linear-gradient(180deg, #dbe3ef 0%, #bcc8da 100%);
}

body:not([data-theme="dark"]) .logo-grid .media-card:nth-child(3) .project-media {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.52), transparent 28%),
    linear-gradient(180deg, #5b5651 0%, #47423d 100%);
}

.logo-grid .media-card img {
  width: 100%;
  max-width: 220px;
  max-height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(15, 20, 32, 0.12));
}

body[data-theme="dark"] .logo-grid .media-card:nth-child(1) .project-media {
  background: linear-gradient(180deg, rgba(43, 54, 74, 0.92), rgba(31, 38, 54, 0.94));
}

body[data-theme="dark"] .logo-grid .media-card:nth-child(2) .project-media {
  background: linear-gradient(180deg, rgba(41, 54, 74, 0.92), rgba(28, 37, 53, 0.94));
}

body[data-theme="dark"] .logo-grid .media-card:nth-child(3) .project-media {
  background: linear-gradient(180deg, rgba(57, 53, 49, 0.92), rgba(37, 33, 31, 0.94));
}

.logo-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  overflow: hidden;
  padding: 0;
}

.logo-disclosure {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.logo-face {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.logo-disclosure:hover .logo-face,
.logo-disclosure:focus-visible .logo-face {
  transform: translateY(-3px);
}

.logo-brand-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-18px);
  will-change: max-height, opacity, transform;
  transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.36s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-brand-panel.is-open {
  max-height: 1400px;
  opacity: 1;
  transform: translateY(0);
}

.logo-brand-reveal {
  min-height: 0;
  overflow: hidden;
  transform-origin: top center;
}

.logo-brand-panel.is-open .logo-brand-reveal {
  animation: logoBrandContentIn 0.52s ease both;
}

.logo-brand-panel .project-media img {
  cursor: zoom-in;
}

.logo-brand-panel .project-media::before {
  content: "View larger";
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 16, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.logo-brand-panel .project-media:hover::before,
.logo-brand-panel .project-media:focus-within::before {
  opacity: 1;
  transform: translateY(0);
}

@keyframes logoBrandContentIn {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo-showcase {
  display: grid;
  gap: 24px;
}

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

.logo-showcase-option {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 244, 252, 0.94));
  box-shadow: var(--shadow);
  color: #182230;
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.logo-showcase-option:hover,
.logo-showcase-option:focus-visible,
.logo-showcase-option.is-active {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--option-accent, var(--accent)) 45%, rgba(255, 255, 255, 0.12));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.logo-showcase-thumb {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border-radius: calc(var(--radius-lg) - 6px);
  background: linear-gradient(180deg, rgba(231, 238, 248, 0.96), rgba(210, 220, 236, 0.96));
  overflow: hidden;
  border: 1px solid rgba(112, 136, 176, 0.14);
}

.logo-showcase-thumb img {
  max-height: 170px;
  object-fit: contain;
}

.logo-showcase-copy {
  display: grid;
  gap: 4px;
}

.logo-showcase-copy strong {
  color: #182230;
  font-size: 1.1rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.logo-showcase-copy span {
  color: #5a687c;
  font-size: 0.94rem;
}

.logo-showcase-option strong,
.logo-showcase-option span {
  color: inherit;
}

body:not([data-theme="dark"]) .logo-showcase-option {
  border-color: rgba(125, 149, 188, 0.2);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.86), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(236, 242, 251, 0.98));
}

body:not([data-theme="dark"]) .logo-showcase-thumb {
  background: linear-gradient(180deg, rgba(222, 231, 244, 0.98), rgba(198, 210, 229, 0.98));
  border: 1px solid rgba(112, 136, 176, 0.16);
}

body:not([data-theme="dark"]) .logo-showcase-option:nth-child(1) .logo-showcase-thumb {
  background: linear-gradient(180deg, #75849d 0%, #59677e 100%);
}

body:not([data-theme="dark"]) .logo-showcase-option:nth-child(2) .logo-showcase-thumb {
  background: linear-gradient(180deg, #d7e2f2 0%, #becde3 100%);
}

body:not([data-theme="dark"]) .logo-showcase-option:nth-child(3) .logo-showcase-thumb {
  background: linear-gradient(180deg, #857c73 0%, #675f57 100%);
}

body[data-theme="dark"] .logo-showcase-option {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(27, 34, 46, 0.86), rgba(18, 24, 34, 0.94));
  color: #f4f7fb;
}

body[data-theme="dark"] .logo-showcase-copy strong {
  color: #f4f7fb;
}

body[data-theme="dark"] .logo-showcase-copy span {
  color: rgba(232, 238, 248, 0.74);
}

body[data-theme="dark"] .logo-showcase-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-feature {
  position: relative;
  padding: 28px;
  overflow: hidden;
}

.logo-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--logo-accent) 18%, transparent) 0%, transparent 26%),
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.06) 0%, transparent 18%);
  pointer-events: none;
}

.logo-feature > * {
  position: relative;
  z-index: 1;
}

.logo-feature-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.logo-feature-head h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.logo-feature-kicker {
  margin: 0;
  color: color-mix(in srgb, var(--logo-accent) 70%, var(--text));
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.logo-feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.logo-feature-board-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius-lg) - 2px);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo-feature-board-button {
  position: relative;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

.logo-feature-board-button img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s ease, filter 0.4s ease;
}

.logo-feature-board-button:hover img,
.logo-feature-board-button:focus-visible img {
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.02);
}

.logo-feature-zoom {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo-feature-description {
  max-width: 78ch;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.logo-feature.is-animating .logo-feature-board-button,
.logo-feature.is-animating .logo-feature-description,
.logo-feature.is-animating .logo-feature-head {
  animation: logoFeatureSwap 0.52s ease;
}

@keyframes logoFeatureSwap {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-brand {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.35), transparent 22%),
    linear-gradient(135deg, #2d3240, #8093bc);
}

.project-poster {
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.3), transparent 18%),
    linear-gradient(135deg, #9b5c62, #e8a78f);
}

.project-video {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 18%),
    linear-gradient(135deg, #7f4d45, #c5895f);
}

.project-social {
  background:
    radial-gradient(circle at 75% 24%, rgba(255, 255, 255, 0.32), transparent 20%),
    linear-gradient(135deg, #2a6a7c, #7dbbba);
}

.contact-card {
  text-align: center;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  text-align: left;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-soft);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-field textarea {
  resize: vertical;
  min-height: 150px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-status {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.form-status[data-state="pending"] {
  color: #9cb7ff;
}

.form-status[data-state="success"] {
  color: #7fddab;
}

.form-status[data-state="error"] {
  color: #ff9e9e;
}

.form-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 12, 20, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 70;
}

.form-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.form-modal-card {
  width: min(100%, 440px);
  padding: 28px;
  border-radius: 28px;
  text-align: center;
}

.form-modal-card h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.form-modal-card p:last-of-type {
  margin-bottom: 20px;
}

.contact-form .button {
  justify-self: start;
}

.site-footer {
  padding: 0 0 32px;
}

.site-footer p {
  margin: 0;
  text-align: center;
  color: var(--text-soft);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(8, 12, 20, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 60;
}

.image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-lightbox-img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.image-lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.scroll-top-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 55;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.55s ease, border-color 0.55s ease, color 0.55s ease;
}

.scroll-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-button:hover,
.scroll-top-button:focus-visible {
  transform: translateY(-3px);
}

.floating-theme-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 55;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s ease, bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.55s ease, border-color 0.55s ease, color 0.55s ease;
}

.floating-theme-toggle.is-raised {
  bottom: 84px;
}

.floating-theme-toggle:hover,
.floating-theme-toggle:focus-visible {
  transform: translateY(-3px);
}

.floating-theme-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@media (max-width: 1024px) {
  .hero,
  .skills-grid,
  .projects-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid,
  .video-grid {
    column-count: 1;
  }

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

  .hero-portrait {
    aspect-ratio: 16 / 11;
  }

  .media-grid,
  .logo-grid {
    grid-template-columns: 1fr;
  }

  .logo-selector-grid,
  .logo-feature-layout {
    grid-template-columns: 1fr;
  }

  .tools-card {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    bottom: 10px;
    padding: 0 10px;
  }

  main,
  .site-footer {
    width: min(calc(100% - 20px), var(--container));
  }

  main {
    padding-top: 24px;
  }

  .nav-shell {
    width: min(calc(100vw - 20px), 340px);
    gap: 8px;
    padding: 10px 12px;
  }

  .site-nav-left {
    margin-right: 0;
    justify-content: space-evenly;
  }

  .site-nav-right {
    margin-left: 0;
    justify-content: space-evenly;
  }

  .nav-icon-link {
    width: 42px;
    height: 42px;
  }

  .nav-icon-link svg {
    width: 20px;
    height: 20px;
  }

  .nav-center-logo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    transform: none;
  }

  .logo img,
  .nav-center-logo img {
    height: 26px;
    max-width: 46px;
    transform: none;
  }

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

  .floating-theme-toggle {
    right: 16px;
    top: 16px;
    bottom: auto;
  }

  .floating-theme-toggle.is-raised {
    top: 16px;
    bottom: auto;
  }

  .hero-copy,
  .hero-panel,
  .about-grid .glass,
  .skill-card,
  .project-card,
  .contact-card,
  .work-category {
    padding: 20px;
    border-radius: 28px;
  }

  .tool-list {
    grid-template-columns: 1fr;
  }

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

  .contact-form .button {
    width: 100%;
    justify-self: stretch;
  }

  .project-media {
    min-height: 180px;
    margin: -22px -22px 18px;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4rem);
  }

  .section {
    padding: 18px 0;
  }

  .hero,
  .about-grid,
  .skills-grid,
  .projects-grid,
  .media-grid,
  .logo-grid,
  .contact-form {
    gap: 16px;
  }

  .hero-copy,
  .hero-panel {
    padding: 22px;
  }

  .hero-actions {
    gap: 10px;
    margin: 22px 0 18px;
  }

  .button {
    min-height: 50px;
    width: 100%;
  }

  .hero-highlights article,
  .skill-card,
  .about-grid .glass {
    border-radius: 22px;
  }

  .hero-highlights article {
    padding: 14px;
  }

  .hero-portrait {
    aspect-ratio: 4 / 5;
  }

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

  .section-heading h2,
  .contact-card h2,
  .page-title {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
    line-height: 1.02;
  }

  .hero-text,
  .about-grid p,
  .skill-card p,
  .project-copy p,
  .contact-card p,
  .hero-highlights span {
    font-size: 0.96rem;
    line-height: 1.6;
  }

  .work-category {
    padding: 18px;
  }

  .work-category-head {
    margin-bottom: 14px;
  }

  .media-card .project-media,
  .logo-face .project-media {
    margin: 0 0 14px;
    border-radius: 22px;
  }

  .freelance-category .freelance-card .project-media {
    aspect-ratio: 4 / 5;
  }

  .freelance-category .freelance-card img,
  .freelance-category .freelance-card video {
    object-fit: cover;
  }

  .freelance-category .freelance-card img {
    transform: none;
  }

  .freelance-category .freelance-card:nth-child(2) img {
    transform: none;
  }

  .page-intro {
    padding-top: 8px;
    padding-bottom: 4px;
  }

  .gallery-page main {
    padding-top: 20px;
  }

  .gallery-page .section-heading {
    margin-bottom: 14px;
  }

  .gallery-page .bento-grid,
  .gallery-page .video-grid {
    display: grid;
    column-count: initial;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-page .bento-grid.reveal,
  .gallery-page .video-grid.reveal,
  .gallery-page .section-heading.reveal {
    opacity: 1;
    transform: none;
  }

  .gallery-page .bento-card,
  .gallery-page .video-card {
    margin: 0;
    width: 100%;
    break-inside: auto;
  }

  .gallery-page .bento-card {
    display: grid;
    overflow: hidden;
    border-radius: 26px;
  }

  .gallery-page .bento-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
  }

  .gallery-page .bento-card.bento-wide img,
  .gallery-page .bento-card.bento-tall img {
    aspect-ratio: 4 / 5;
  }

  .gallery-page .video-card {
    padding: 16px;
    border-radius: 26px;
  }

  .gallery-page .video-frame {
    border-radius: 22px;
    margin-bottom: 12px;
  }

  .gallery-page .video-frame video {
    aspect-ratio: 9 / 16;
    object-fit: cover;
  }

  .image-lightbox {
    padding: 16px;
  }

  .image-lightbox-img {
    max-width: 100%;
    max-height: 78vh;
  }
}
