:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --card: #ffffff;
  --ink: #18181b;
  --muted: #71717a;
  --soft: #a1a1aa;
  --line: #f1f1f3;
  --line-strong: #e4e4e7;
  --accent: #ff6b2b;
  --accent-light: #ff8f5c;
  --shadow: 0 24px 70px rgba(24, 24, 27, 0.08);
  --display: "PT Sans", Georgia, serif;
  --body: "DM Sans", Arial, sans-serif;
}

.dark {
  --bg: #09090b;
  --surface: #111113;
  --card: #18181b;
  --ink: #fafafa;
  --muted: #a1a1aa;
  --soft: #71717a;
  --line: #18181b;
  --line-strong: #27272a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  content: "";
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

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

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

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

h1,
h2,
h3,
.logo {
  font-family: var(--display);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 99px;
}

.container {
  margin: 0 auto;
  max-width: 1152px;
  padding: 0 24px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.site-header {
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  z-index: 50;
}

.site-header.scrolled,
.site-header:focus-within {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 12px rgba(24, 24, 27, 0.06);
}

.dark .site-header.scrolled,
.dark .site-header:focus-within {
  background: rgba(9, 9, 11, 0.9);
}

.nav-shell {
  align-items: center;
  display: flex;
  height: 64px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1152px;
  padding: 0 24px;
}

.logo {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0;
  position: relative;
  z-index: 2;
}

.logo span:first-child {
  color: var(--ink);
}

.logo span:last-child {
  color: var(--accent);
}

.desktop-nav {
  align-items: center;
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav a,
.text-link {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  position: relative;
  transition: color 0.2s ease;
}

.desktop-nav a::after,
.text-link::after {
  background: currentColor;
  bottom: -2px;
  content: "";
  height: 1.5px;
  left: 0;
  position: absolute;
  transition: width 0.25s ease;
  width: 0;
}

.desktop-nav a:hover,
.text-link:hover {
  color: var(--accent);
}

.desktop-nav a:hover::after,
.text-link:hover::after {
  width: 100%;
}

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

.icon-button,
.menu-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  transition: background 0.2s ease;
  width: 36px;
}

.icon-button:hover,
.menu-button:hover {
  background: var(--surface);
}

.dark .moon,
.sun {
  display: none;
}

.dark .sun {
  display: inline;
}

.nav-cta,
.btn {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-cta {
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  padding: 11px 20px;
}

.nav-cta:hover,
.btn-primary:hover {
  background: var(--accent-light);
}

.nav-cta::after,
.btn-primary::after {
  background: rgba(255, 255, 255, 0.2);
  content: "";
  height: 100%;
  left: -100%;
  position: absolute;
  top: 0;
  transform: skewX(-20deg);
  transition: left 0.4s ease;
  width: 60%;
}

.nav-cta:hover::after,
.btn-primary:hover::after {
  left: 160%;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-button span {
  background: currentColor;
  border-radius: 99px;
  display: block;
  height: 1.5px;
  transition: transform 0.2s ease;
  width: 15px;
}

.menu-button.open span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-button.open span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.mobile-menu {
  background: var(--bg);
  border-top: 1px solid var(--line);
  display: none;
  padding: 16px 24px 20px;
}

.mobile-menu.open {
  display: grid;
  gap: 14px;
}

.mobile-menu a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero {
  align-items: center;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  padding: 96px 0 56px;
  position: relative;
}

.hero-glow {
  background: rgba(255, 107, 43, 0.12);
  border-radius: 999px;
  filter: blur(70px);
  height: 320px;
  pointer-events: none;
  position: absolute;
  right: -80px;
  top: -40px;
  width: 320px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.78fr);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(3.4rem, 8vw, 6.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.02;
  margin-bottom: 24px;
}

h1 span,
.text-link {
  color: var(--accent);
}

.hero-text {
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.24rem);
  font-weight: 300;
  line-height: 1.78;
  margin-bottom: 40px;
  max-width: 720px;
}

.hero-text strong {
  color: color-mix(in srgb, var(--ink) 80%, var(--muted));
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  min-height: 52px;
  padding: 0 26px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.portrait-wrap {
  min-height: 500px;
  position: relative;
}

.portrait-card {
  aspect-ratio: 4 / 5;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: end;
  justify-content: center;
  margin-left: auto;
  max-width: 410px;
  overflow: visible;
  position: relative;
}

.portrait-card::after {
  content: none;
}

.portrait-card img {
  filter: drop-shadow(0 28px 38px rgba(24, 24, 27, 0.16));
  height: 92%;
  object-fit: contain;
  object-position: bottom center;
  width: 92%;
}

.section {
  padding: clamp(72px, 9vw, 116px) 0;
  position: relative;
}

.section-muted {
  background: var(--surface);
}

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

.section-title {
  max-width: 480px;
}

h2 {
  font-size: clamp(2.25rem, 5.2vw, 4.35rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.04;
  margin-bottom: 0;
}

h3 {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.24;
  margin-bottom: 14px;
}

.two-column {
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
}

.about-text p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.86;
  margin-bottom: 18px;
}

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

.service-card,
.project-card,
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(24, 24, 27, 0.04);
}

.service-card {
  border-radius: 28px;
  padding: 30px;
  transition: border-color 0.2s ease, transform 0.3s ease;
}

.service-card:hover,
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.service-card span {
  align-items: center;
  background: #fff7f4;
  border: 1px solid #fed7c7;
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  margin-bottom: 24px;
  width: 38px;
}

.dark .service-card span {
  background: var(--line-strong);
  border-color: var(--line-strong);
}

.service-card p,
.project-copy p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.74;
  margin-bottom: 0;
}

.project-list {
  display: grid;
  gap: 24px;
}

.project-card {
  border-radius: 28px;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.3s ease;
}

.project-image {
  background: var(--line-strong);
  min-height: 320px;
  overflow: hidden;
}

.project-image img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  width: 100%;
}

.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-copy {
  align-self: center;
  padding: clamp(28px, 5vw, 46px);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tags span,
.skill-cloud span {
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.tags span {
  background: var(--surface);
  color: var(--muted);
  padding: 7px 11px;
}

.tags span:first-child {
  background: #fff7f4;
  border: 1px solid #fed7c7;
  color: var(--accent);
}

.dark .tags span:first-child {
  background: var(--line-strong);
  border-color: var(--line-strong);
}

.project-copy p {
  margin-bottom: 24px;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-cloud span {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  padding: 12px 16px;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.skill-cloud span:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-section {
  padding-top: 0;
}

.contact-card {
  background: #18181b;
  border-radius: 34px;
  color: #fff;
  overflow: hidden;
  padding: clamp(34px, 7vw, 64px);
  position: relative;
  text-align: center;
}

.contact-card::before,
.contact-card::after {
  background: rgba(255, 107, 43, 0.18);
  border-radius: 999px;
  content: "";
  filter: blur(52px);
  height: 220px;
  pointer-events: none;
  position: absolute;
  width: 220px;
}

.contact-card::before {
  right: -60px;
  top: -60px;
}

.contact-card::after {
  bottom: -80px;
  left: -70px;
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.contact-card h2 {
  color: #fff;
  margin-bottom: 16px;
}

.contact-card p {
  color: #d4d4d8;
  margin: 0 auto 30px;
  max-width: 610px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.contact-links a {
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  overflow-wrap: anywhere;
  padding: 14px 22px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-links a:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--soft);
  position: relative;
  z-index: 1;
}

.footer-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 32px;
  padding-top: 32px;
}

.footer p {
  font-size: 0.88rem;
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

@media (max-width: 920px) {
  .desktop-nav,
  .nav-cta {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero {
    min-height: auto;
    padding-top: 112px;
  }

  .hero-grid,
  .two-column,
  .service-grid,
  .project-card {
    grid-template-columns: 1fr;
  }

  .portrait-wrap {
    min-height: auto;
  }

  .portrait-card {
    margin: 0 auto;
    max-width: 360px;
  }

  .portrait-wrap {
    display: grid;
    justify-items: center;
  }

  .project-image {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .container,
  .nav-shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }

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

  .btn,
  .contact-links a {
    width: 100%;
  }

  .section {
    padding: 70px 0;
  }

  .project-image {
    min-height: 230px;
  }

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