:root {
  color-scheme: dark;
  --canvas: #100f0d;
  --canvas-rgb: 16, 15, 13;
  --grid-line: rgba(255, 250, 243, 0.045);
  --surface: #1b1814;
  --surface-soft: #241f19;
  --surface-strong: #fffaf3;
  --text: #fff6ea;
  --text-muted: #bcae9d;
  --text-soft: #8f8273;
  --accent: #ff8a1f;
  --accent-2: #35c4ff;
  --border: rgba(255, 250, 243, 0.11);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --media-bg: #18130f;
  --brand-bg: #2d2a24;
  --brand-shadow: rgba(0, 0, 0, 0.26);
  --toggle-a: #241f19;
  --toggle-b: #ff8a1f;
  --button-text: #ffffff;
  --grid-size: 42px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --canvas: #f5efe6;
  --canvas-rgb: 245, 239, 230;
  --grid-line: rgba(45, 42, 36, 0.05);
  --surface: #fffaf3;
  --surface-soft: #e9ded0;
  --surface-strong: #2d2a24;
  --text: #2d2a24;
  --text-muted: #665b4e;
  --text-soft: #827464;
  --accent: #ff8400;
  --accent-2: #34bfff;
  --border: rgba(45, 42, 36, 0.12);
  --shadow: 0 24px 70px rgba(45, 42, 36, 0.13);
  --media-bg: #15120f;
  --brand-bg: #2d2a24;
  --brand-shadow: rgba(45, 42, 36, 0.12);
  --toggle-a: #fffaf3;
  --toggle-b: #34bfff;
  --button-text: #ffffff;
  --grid-size: 42px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(180deg, rgba(var(--canvas-rgb), 0.98), var(--canvas));
  background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), auto;
  color: var(--text);
  font-family: "Urbanist", Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  text-rendering: geometricPrecision;
}

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

picture {
  display: block;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 10000;
  transform: translateY(-150%);
  background: var(--surface-strong);
  color: var(--canvas);
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  transition: transform 180ms var(--ease);
}

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

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

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

#work,
#about,
#contact {
  scroll-margin-top: 118px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: rgba(var(--canvas-rgb), 0.76);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 166px;
  min-height: 52px;
  border-radius: 999px;
  background: var(--brand-bg);
  box-shadow: 0 14px 32px var(--brand-shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.brand-mark img {
  width: 118px;
  height: auto;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.2));
}

.nav-links {
  display: flex;
  justify-self: center;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(var(--canvas-rgb), 0.42);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .nav-links {
  background: rgba(233, 222, 208, 0.82);
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 20px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.nav-links a:hover {
  background: var(--surface-strong);
  color: var(--canvas);
  transform: translateY(-1px);
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--toggle-a), var(--toggle-b));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), filter 180ms var(--ease);
}

.theme-toggle::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 18px var(--accent-2);
}

html[data-theme="light"] .theme-toggle::after {
  right: auto;
  left: 8px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
  filter: saturate(1.1);
}

.theme-toggle-avatar {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-image: image-set(url("../webp/thill_pfp.webp") type("image/webp"), url("../thill_pfp.png") type("image/png"));
  background-position: center;
  background-size: cover;
  box-shadow: 0 0 0 4px rgba(255, 250, 243, 0.74);
  transform: translateX(-14px);
  transition: transform 260ms var(--ease);
}

html[data-theme="light"] .theme-toggle-avatar {
  transform: translateX(14px);
}

.hero {
  padding: 24px 0 20px;
}

.hero-shell {
  width: min(900px, calc(100% - 40px));
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  justify-items: start;
  column-gap: 42px;
  min-height: 356px;
  text-align: left;
}

.hero-portrait {
  display: grid;
  place-items: center;
  width: 178px;
  height: 178px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--surface-soft);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.hero-portrait img {
  width: 142px;
  height: 142px;
  border-radius: 34px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.hero-copy {
  display: grid;
  justify-items: start;
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-size: 7rem;
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: 0;
}

.subtitle {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--text-muted);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: 0;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 100%;
  margin-top: 26px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.social-links a:hover {
  transform: translateY(-3px);
  background: var(--surface-strong);
  color: var(--canvas);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-links .fiverr-link,
.footer-fiverr {
  min-width: auto;
  padding: 0 18px;
  color: var(--button-text);
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 900;
}

.social-links .fiverr-link:hover,
.footer-fiverr:hover {
  background: var(--surface-strong);
  color: var(--canvas);
}

.showreel-section,
.work-section,
.about-contact {
  padding: 44px 0;
}

.section-header {
  margin: 0 0 22px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
}

.showreel-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--media-bg);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.showreel-card iframe,
.square-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-facade {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  background:
    linear-gradient(180deg, rgba(13, 13, 16, 0.12), rgba(13, 13, 16, 0.24)),
    var(--video-poster) center / cover no-repeat,
    var(--media-bg);
  color: #ffffff;
  cursor: pointer;
}

.video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0 24%, rgba(0, 0, 0, 0.2) 100%);
  opacity: 0.84;
  transition: opacity 180ms var(--ease);
}

.video-facade:hover::after,
.video-facade:focus-visible::after {
  opacity: 0.55;
}

.video-play {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 54px;
  border-radius: 18px;
  background: #ff0033;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  transition: transform 180ms var(--ease), filter 180ms var(--ease);
}

.video-play::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 15px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid #ffffff;
}

.video-facade:hover .video-play,
.video-facade:focus-visible .video-play {
  transform: scale(1.06);
  filter: saturate(1.08);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.work-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.11);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
  box-shadow: var(--shadow);
}

.work-card > img,
.work-card > picture img,
.work-media-link img,
.square-video {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--media-bg);
}

.work-image-sculpting {
  object-position: center;
}

.work-image-modeling {
  object-position: center;
}

.work-media-link {
  display: block;
  text-decoration: none;
}

.work-card-info {
  min-height: 98px;
  padding: 18px;
}

.work-card-info h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
}

.work-card-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 800;
}

.about-contact-grid {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 0.86fr);
  gap: 22px;
  align-items: start;
}

.about-block,
.contact-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.1);
}

.about-block {
  padding: 36px;
}

.about-block p {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.62;
}

.about-block p + p {
  margin-top: 18px;
}

.contact-card {
  padding: 30px;
  background: var(--surface);
  color: var(--text);
}

.contact-card h2 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.tagline {
  margin: 10px 0 22px;
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 1.05rem;
  font-weight: 800;
}

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

.contact-card input,
.contact-card textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  color: currentColor;
  outline: none;
  padding: 14px 15px;
  font-weight: 800;
}

.contact-card textarea {
  margin-top: 10px;
  min-height: 144px;
  resize: vertical;
}

.contact-card input::placeholder,
.contact-card textarea::placeholder {
  color: color-mix(in srgb, currentColor 52%, transparent);
}

.contact-card input:focus,
.contact-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}

.btn-send {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--button-text);
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms var(--ease), filter 180ms var(--ease);
}

.btn-send:hover {
  transform: translateY(-2px);
  filter: saturate(1.1) brightness(1.05);
}

.btn-send:disabled {
  cursor: progress;
  opacity: 0.68;
  transform: none;
  filter: none;
}

.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: currentColor;
  font-weight: 900;
}

.form-status.success {
  color: #8be28f;
}

.form-status.error {
  color: #ffb8a6;
}

.email-footer {
  margin-top: 16px;
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-weight: 800;
}

.email-footer a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

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

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

.footer-shell p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 800;
}

.footer-fiverr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 70;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--canvas);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), background 180ms var(--ease);
}

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

.back-to-top:hover {
  background: var(--accent);
  color: var(--button-text);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

@media (max-width: 980px) {
  .nav-shell {
    grid-template-columns: auto auto;
  }

  .nav-links {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
  }

  .nav-links a {
    flex: 1;
  }

  .theme-toggle {
    justify-self: end;
  }

  .hero {
    padding: 24px 0 22px;
  }

  .hero-shell {
    width: min(820px, calc(100% - 40px));
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 30px;
    min-height: 340px;
  }

  .hero-portrait {
    width: 150px;
    height: 150px;
    border-radius: 36px;
  }

  .hero-portrait img {
    width: 118px;
    height: 118px;
    border-radius: 28px;
  }

  .hero h1 {
    font-size: 5.2rem;
  }

  .subtitle {
    font-size: 1.22rem;
  }

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

  .work-card > img,
  .work-media-link img,
  .square-video {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 760px) {
  .hero-shell {
    width: min(1180px, calc(100% - 28px));
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(1180px, calc(100% - 28px));
  }

  #work,
  #about,
  #contact {
    scroll-margin-top: 148px;
  }

  .site-header {
    padding: 10px 0;
  }

  .nav-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .brand-mark {
    width: 132px;
    min-height: 46px;
  }

  .brand-mark img {
    width: 96px;
  }

  .theme-toggle {
    width: 62px;
    height: 46px;
  }

  .theme-toggle-avatar {
    width: 34px;
    height: 34px;
    transform: translateX(-8px);
  }

  html[data-theme="light"] .theme-toggle-avatar {
    transform: translateX(8px);
  }

  .theme-toggle::after {
    right: 6px;
    bottom: 5px;
    width: 9px;
    height: 9px;
  }

  .nav-links {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
  }

  .nav-links a {
    min-width: 0;
    min-height: 38px;
    padding: 0 6px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 20px 0 20px;
  }

  .hero-shell {
    min-height: 370px;
  }

  .hero-portrait {
    width: 132px;
    height: 132px;
    margin-bottom: 22px;
    border-radius: 30px;
  }

  .hero-portrait img {
    width: 104px;
    height: 104px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 2.82rem;
  }

  .eyebrow {
    font-size: 0.82rem;
  }

  .subtitle {
    max-width: 100%;
    margin-top: 18px;
    font-size: 1rem;
  }

  .social-links {
    gap: 9px;
    width: min(100%, 302px);
  }

  .social-links a {
    min-width: 40px;
    min-height: 40px;
  }

  .social-links .fiverr-link {
    width: 100%;
    min-height: 44px;
  }

  .work-card > img,
  .work-media-link img,
  .square-video {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .showreel-section,
  .work-section,
  .about-contact {
    padding: 34px 0;
  }

  .showreel-card,
  .work-card,
  .about-block,
  .contact-card {
    border-radius: 12px;
  }

  .about-block,
  .contact-card {
    padding: 22px;
  }

  .about-block p {
    font-size: 1rem;
  }

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

  .form-row {
    display: grid;
  }

  .footer-shell {
    display: grid;
  }

  .footer-fiverr {
    width: 100%;
  }
}

@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;
  }
}
