:root {
  --background: #f4f3ef;
  --surface: #ffffff;
  --surface-soft: #ebe9e3;
  --foreground: #171715;
  --muted: #68675f;
  --line: rgba(23, 23, 21, 0.13);
  --accent: #ff5d3a;
  --accent-warm: #ffc65a;
  --shadow: 0 24px 80px rgba(35, 32, 24, 0.1);
}

:root[data-theme="dark"] {
  --background: #11110f;
  --surface: #1b1b18;
  --surface-soft: #24241f;
  --foreground: #f6f4ed;
  --muted: #aaa89e;
  --line: rgba(255, 255, 255, 0.13);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
  transition: background-color 220ms ease, color 220ms ease;
}

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

button {
  font: inherit;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

.site-shell {
  width: min(100% - 32px, 1240px);
  margin: 0 auto;
}

.site-header {
  min-height: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  width: max-content;
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.brand strong {
  font-weight: 800;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 1px;
  height: 2px;
  background: var(--accent);
  transition: right 180ms ease;
}

.main-nav a:hover {
  color: var(--foreground);
}

.main-nav a:hover::after {
  right: 0;
}

.theme-toggle {
  justify-self: end;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--foreground);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.theme-toggle:hover {
  transform: rotate(10deg);
  background: var(--surface-soft);
}

.theme-toggle svg,
.button svg,
.project-meta svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.17fr);
  gap: 18px;
  min-height: 610px;
}

.portrait-card,
.intro-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
}

.portrait-card {
  background: #d99a00;
}

.portrait-card > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 57% center;
  filter: saturate(0.9);
}

.portrait-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(10, 10, 8, 0.45));
  pointer-events: none;
}

.availability {
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(17, 17, 15, 0.52);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.availability i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7bea8b;
  box-shadow: 0 0 0 5px rgba(123, 234, 139, 0.13);
}

.intro-card {
  display: flex;
  min-height: 610px;
  padding: clamp(32px, 6vw, 76px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.28)),
    #ffd051;
  color: #191813;
  isolation: isolate;
}

:root[data-theme="dark"] .intro-card {
  background:
    linear-gradient(135deg, rgba(55, 35, 0, 0.08), rgba(0, 0, 0, 0.24)),
    #d49b14;
}

.intro-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(22, 22, 18, 0.12) 0.8px, transparent 0.8px);
  background-size: 12px 12px;
  mask-image: linear-gradient(to bottom right, transparent, #000 60%);
}

.orb {
  position: absolute;
  z-index: -1;
  display: block;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.72;
}

.orb-one {
  width: 190px;
  height: 190px;
  top: -58px;
  left: -40px;
  background: #fff1a5;
}

.orb-two {
  width: 280px;
  height: 280px;
  right: -86px;
  top: -92px;
  background: #ff7b47;
  filter: blur(28px);
}

.intro-content {
  align-self: flex-end;
  position: relative;
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro-card .eyebrow {
  color: rgba(25, 24, 19, 0.62);
}

.intro-card h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(3rem, 6.5vw, 6.25rem);
  font-weight: 750;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.intro-card h1 span {
  display: block;
  font-weight: 400;
}

.hero-copy {
  max-width: 600px;
  margin: 28px 0 0;
  color: rgba(25, 24, 19, 0.72);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

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

.button-primary {
  background: #191813;
  color: #fff;
  box-shadow: 0 12px 28px rgba(25, 24, 19, 0.18);
}

.button-diecast {
  border: 1px solid rgba(25, 24, 19, 0.84);
  background: rgba(255, 255, 255, 0.72);
  color: #191813;
  box-shadow: 0 10px 24px rgba(25, 24, 19, 0.08);
  backdrop-filter: blur(8px);
}

.button-diecast:hover {
  background: #fff;
  box-shadow: 0 14px 30px rgba(25, 24, 19, 0.14);
}

.button-quiet {
  border: 1px solid rgba(25, 24, 19, 0.24);
  color: #191813;
}

.section {
  padding: 124px 0 22px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 54px;
}

.section-heading h2,
.contact h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-heading .eyebrow,
.contact .eyebrow {
  color: var(--accent);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(50px, 9vw, 130px);
}

.about-lead {
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.5;
  letter-spacing: -0.025em;
}

.focus-list article {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 20px;
  padding: 23px 0;
  border-top: 1px solid var(--line);
}

.focus-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.focus-list article > span {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.focus-list h3 {
  margin: -3px 0 8px;
  font-size: 1.12rem;
}

.focus-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.section-heading-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.section-heading-row > div {
  max-width: 760px;
}

.section-note {
  max-width: 220px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

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

.project-card {
  position: relative;
  min-width: 0;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  border: 0;
  border-radius: 26px;
  color: #171715;
  text-align: left;
  cursor: zoom-in;
  isolation: isolate;
  transition: transform 230ms ease, box-shadow 230ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.project-card--sun {
  background: #f7c44e;
}

.project-card--ink {
  background: #b6b1ff;
}

.project-card--aqua {
  background: #65d4d2;
}

.project-card--coral {
  background: #ff8274;
}

.project-card--sky {
  background: #80cdef;
}

.project-card--violet {
  background: #d6b7ec;
}

.project-number {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.56;
}

.project-image {
  min-height: 390px;
  display: grid;
  place-items: center;
  padding: 36px 24px 12px;
}

.project-image img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  transition: transform 260ms ease;
}

.project-card:hover .project-image img {
  transform: scale(1.035) rotate(-0.5deg);
}

.project-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
  padding: 18px 4px 4px;
}

.project-meta > span {
  display: grid;
  gap: 5px;
}

.project-meta small {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.project-meta strong {
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  letter-spacing: -0.035em;
}

.project-meta i {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 23, 21, 0.28);
  border-radius: 50%;
  transition: transform 180ms ease;
}

.project-card:hover .project-meta i {
  transform: translateX(3px);
}

.contact {
  margin-top: 116px;
  margin-bottom: 18px;
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 60px;
  padding: clamp(34px, 6vw, 76px);
  border-radius: 28px;
  background: var(--accent-warm);
  color: #1b1914;
}

.contact-copy {
  max-width: 800px;
}

.contact .eyebrow {
  color: rgba(27, 25, 20, 0.58);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.button-dark {
  white-space: nowrap;
  background: #191813;
  color: #fff;
}

.text-link {
  margin-left: 16px;
  border-bottom: 1px solid rgba(25, 24, 19, 0.36);
  font-size: 0.78rem;
  font-weight: 800;
}

.site-footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 8, 7, 0.74);
  backdrop-filter: blur(16px);
  animation: fade-in 160ms ease both;
}

.modal-backdrop[hidden] {
  display: none;
}

.project-modal {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: clamp(20px, 4vw, 44px);
  border-radius: 28px;
  color: #171715;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.36);
  animation: modal-in 220ms ease both;
}

.project-modal img {
  width: 100%;
  max-height: 66dvh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(23, 23, 21, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #171715;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.modal-meta p {
  margin: 18px 0 6px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.62;
}

.modal-meta h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
}

.project-modal.project-card--sun {
  background: #f7c44e;
}

.project-modal.project-card--ink {
  background: #b6b1ff;
}

.project-modal.project-card--aqua {
  background: #65d4d2;
}

.project-modal.project-card--coral {
  background: #ff8274;
}

.project-modal.project-card--sky {
  background: #80cdef;
}

.project-modal.project-card--violet {
  background: #d6b7ec;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-height: 530px;
  }

  .portrait-card > img {
    object-position: 59% center;
  }

  .intro-card {
    min-height: 530px;
    padding: 34px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .contact {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 24px, 1240px);
  }

  .site-header {
    min-height: 78px;
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    width: 100%;
    padding: 0 2px 18px;
  }

  .main-nav a {
    font-size: 0.78rem;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
  }

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

  .portrait-card {
    min-height: 480px;
    aspect-ratio: 4 / 5;
  }

  .portrait-card > img {
    object-position: 57% center;
  }

  .intro-card {
    min-height: 500px;
    padding: 34px 26px;
  }

  .intro-card h1 {
    font-size: clamp(3.15rem, 16vw, 5.15rem);
  }

  .hero-copy {
    margin-top: 24px;
  }

  .button {
    width: 100%;
  }

  .section {
    padding-top: 94px;
  }

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

  .section-heading-row {
    display: block;
  }

  .section-note {
    max-width: none;
    margin-top: 20px;
  }

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

  .project-card {
    min-height: 440px;
    padding: 16px;
  }

  .project-image {
    min-height: 310px;
    padding: 38px 14px 8px;
  }

  .project-image img {
    max-height: 290px;
  }

  .contact {
    min-height: 460px;
    margin-top: 90px;
    padding: 34px 24px;
  }

  .contact-actions {
    width: 100%;
  }

  .text-link {
    margin-left: 0;
  }

  .site-footer {
    min-height: 130px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
  }
}

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