:root {
  --white: #f7f4ec;
  --paper: #fffaf0;
  --ink: #111111;
  --soft-ink: rgba(17, 17, 17, 0.68);
  --muted: rgba(17, 17, 17, 0.48);
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.22);
  --brand-yellow: #ddff00;
  --accent-yellow: #ddff00;
  --radius-large: 34px;
  --radius-medium: 24px;
  --shadow: 0 28px 80px rgba(17, 17, 17, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

#designCanvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  background: var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 76%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 76%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 20%, rgba(221, 255, 0, 0.16), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.34), transparent 30%),
    radial-gradient(circle at 78% 86%, rgba(120, 120, 120, 0.10), transparent 26%),
    linear-gradient(180deg, rgba(255, 250, 240, 0.12), rgba(255, 250, 240, 0.9));
}

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

::selection {
  background: var(--brand-yellow);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--brand-yellow);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  body,
  body a,
  body button,
  body .button,
  body .nav-menu a,
  body .footer-links a,
  body .tag-cloud span,
  body .project-card,
  body .project-card * {
    cursor: none !important;
  }

  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
    background: center / contain no-repeat url("assets/cursor-pen-dark.png");
    filter: drop-shadow(2px 4px 6px rgba(17, 17, 17, 0.18));
    transition:
      opacity 0.18s ease,
      filter 0.18s ease,
      background-image 0.18s ease;
    will-change: top, left, opacity, filter;
  }

  body.has-custom-cursor .custom-cursor {
    opacity: 1;
  }

  .custom-cursor.is-hover {
    width: 18px;
    height: 18px;
    background-image: url("assets/cursor-pen-hover.png");
    filter: drop-shadow(2px 4px 6px rgba(17, 17, 17, 0.22));
  }

  .custom-cursor.is-hidden {
    opacity: 0;
  }
}

.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 100;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.74);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 18px 60px rgba(17, 17, 17, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  overflow: hidden;
}

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

.brand-text {
  display: flex;
  align-items: center;
  min-height: 58px;
}

.brand-text strong {
  display: block;
  font-size: clamp(1.28rem, 1.55vw, 1.58rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.brand-text span {
  display: none;
}

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

.nav-menu a {
  padding: 13px 18px;
  border-radius: 999px;
  color: var(--soft-ink);
  font-size: 0.92rem;
  font-weight: 800;
  transition: 0.25s ease;
}

.nav-menu a:hover {
  color: var(--ink);
  background: var(--brand-yellow);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.04);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: 0.25s ease;
}

.menu-toggle span:nth-child(1) {
  top: 16px;
}

.menu-toggle span:nth-child(2) {
  top: 23px;
}

.menu-toggle span:nth-child(3) {
  top: 30px;
}

.menu-open .menu-toggle span:nth-child(1) {
  top: 23px;
  transform: rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  top: 23px;
  transform: rotate(-45deg);
}

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

.hero {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 150px 0 72px;
}

.hero-inner {
  max-width: 970px;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.065em;
  line-height: 0.96;
}

h1 {
  max-width: 980px;
  font-size: clamp(3.5rem, 8.3vw, 7.8rem);
}

h2 {
  max-width: 820px;
  font-size: clamp(2.2rem, 5.4vw, 5rem);
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 2.05rem);
}

.hero-copy {
  max-width: 670px;
  margin-top: 26px;
  color: var(--soft-ink);
  font-size: clamp(1.08rem, 1.6vw, 1.34rem);
  line-height: 1.58;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 23px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 900;
  transition: 0.25s ease;
}

.button-dark {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button-light {
  border: 1px solid var(--line-strong);
  background: rgba(255, 250, 240, 0.58);
  color: var(--ink);
}

.button-light:hover {
  border-color: rgba(17, 17, 17, 0.32);
  background: var(--brand-yellow);
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.10);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--line);
  box-shadow: var(--shadow);
}

.hero-meta div {
  position: relative;
  padding: 24px;
  background: rgba(255, 250, 240, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-meta div::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 18px;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--brand-yellow);
}

.hero-meta span {
  display: block;
  margin-top: 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-meta strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.section {
  padding: 96px 0;
}

.section-intro {
  max-width: 830px;
  margin-bottom: 40px;
}

.section-intro p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 20px;
  color: var(--soft-ink);
  font-size: 1.06rem;
  line-height: 1.62;
}

.featured-work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.featured-card {
  min-height: 100%;
}

.project-link {
  display: grid;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-link:hover {
  transform: translateY(-8px);
  border-color: rgba(17, 17, 17, 0.24);
  box-shadow: 0 34px 90px rgba(17, 17, 17, 0.14);
}

.project-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111111;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

.project-link:hover .project-image-wrap img {
  transform: scale(1.055);
  filter: saturate(1.08) contrast(1.04);
}

.project-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0) 45%, rgba(17, 17, 17, 0.28) 100%);
  opacity: 0.75;
}

.project-content {
  padding: 24px;
}

.project-label {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-content p:last-of-type {
  margin-top: 14px;
  color: var(--soft-ink);
  line-height: 1.58;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  background: linear-gradient(transparent 58%, rgba(221, 255, 0, 0.55) 58%);
}

.project-cta::after {
  content: "↗";
  font-size: 0.95rem;
  transition: transform 0.25s ease;
}

.project-link:hover .project-cta::after {
  transform: translate(3px, -3px);
}

.services-section {
  padding-top: 80px;
}

.service-list {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.service-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line-strong);
}

.service-row > span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.service-row h3 {
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 3.4vw, 3.2rem);
}

.service-row p {
  max-width: 720px;
  color: var(--soft-ink);
  font-size: 1.05rem;
  line-height: 1.6;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.about-copy,
.skills-panel,
.contact-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.about-copy {
  padding: 38px;
}

.about-copy p:not(.eyebrow) {
  max-width: 740px;
  margin-top: 20px;
  color: var(--soft-ink);
  font-size: 1.06rem;
  line-height: 1.68;
}

.skills-panel {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 30px;
  row-gap: 24px;
  padding: 34px 32px 36px;
}

.skills-panel h3 {
  order: 1;
  flex: 1 1 0;
  min-width: 0;
  min-height: 236px;
  margin: 0;
  display: flex;
  align-items: flex-end;
}

.skills-panel h3::after {
  content: none;
  display: none;
}

.skills-photo {
  order: 2;
  position: relative;
  top: auto;
  right: auto;
  flex: 0 0 224px;
  width: 224px;
  height: 252px;
}

.skills-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  border-radius: 34px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 38px rgba(17, 17, 17, 0.12);
}

.skill {
  order: 3;
  width: 100%;
  margin-bottom: 22px;
}

.skill:last-child {
  margin-bottom: 0;
}

.skill-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  color: var(--soft-ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.skill-head strong {
  color: var(--ink);
}

.skill-bar {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
}

.skill-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink), var(--brand-yellow));
  transition: width 1.1s cubic-bezier(0.19, 1, 0.22, 1);
}

.tag-cloud {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tag-cloud span {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.78);
  color: var(--soft-ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
  white-space: normal;
  box-shadow: 0 14px 34px rgba(17, 17, 17, 0.06);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.tag-cloud span:hover {
  border-color: rgba(17, 17, 17, 0.24);
  background: var(--brand-yellow);
  color: var(--ink);
}

.contact-section {
  padding-bottom: 130px;
}

.contact-box {
  padding: 48px;
  text-align: center;
}

.contact-box h2 {
  margin-inline: auto;
}

.contact-box p:not(.eyebrow) {
  max-width: 650px;
  margin: 22px auto 0;
  color: var(--soft-ink);
  font-size: 1.08rem;
  line-height: 1.6;
}

.contact-actions {
  justify-content: center;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.78);
  color: var(--soft-ink);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.footer-links a:hover {
  background: var(--brand-yellow);
  color: var(--ink);
  border-color: rgba(17, 17, 17, 0.24);
  transform: translateY(-2px);
}

.footer-links svg {
  width: 20px;
  height: 20px;
  display: block;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.76);
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: 0.25s ease;
  box-shadow: 0 14px 40px rgba(17, 17, 17, 0.12);
}

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

.back-to-top:hover {
  background: var(--ink);
  color: var(--paper);
}

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

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

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

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

.delay-3 {
  transition-delay: 0.24s;
}

@media (max-width: 940px) {
  .site-header {
    top: 14px;
    width: calc(100% - 24px);
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-menu {
    position: fixed;
    top: 78px;
    left: 12px;
    right: 12px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 250, 240, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 24px 70px rgba(17, 17, 17, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: 0.25s ease;
  }

  .nav-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-menu a {
    padding: 16px;
    background: rgba(17, 17, 17, 0.04);
  }

  .hero,
  .section {
    width: calc(100% - 28px);
  }

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

  .hero-meta,
  .featured-work,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .featured-work {
    gap: 14px;
  }

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

@media (max-width: 720px) {
  .skills-panel {
    display: block;
    padding: 28px 24px 30px;
  }

  .skills-photo {
    width: 170px;
    height: 200px;
    margin: 0 0 20px;
  }

  .skills-panel h3 {
    min-height: auto;
    display: block;
    margin: 0 0 18px;
  }

  .skills-panel h3::after {
    content: none;
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 8px;
  }

  .brand {
    gap: 14px;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-text {
    min-height: 52px;
  }

  .brand-text strong {
    font-size: 1.18rem;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-meta div,
  .project-content,
  .about-copy,
  .skills-panel,
  .contact-box {
    padding: 24px;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 28px 0;
  }

  .tag-cloud {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner {
    display: grid;
    gap: 14px;
  }
}
