/* ---------- Tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-text: #141414;
  --color-text-strong: #1a1a1a;
  --color-text-secondary: #595959;
  --color-text-tertiary: #808080;
  --color-text-muted: #8c8c8c;
  --color-border: #e6e6e6;
  --color-border-light: #e0e0e0;
  --tag-bg: #f2f2f2;
  --tag-text: #4d4d4d;
  --badge-bg: #e5f7e8;
  --badge-text: #266633;
  --surface-muted: #f5f5f7;
  --surface-preview: #e6e6e6;
  --dark: #141414;

  --container: 1200px;
  --gutter: 120px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 100px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-tertiary);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.scrolled {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04), 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.7);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-preview);
}

.identity-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-strong);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s var(--ease);
}

.header-links a:hover {
  color: var(--color-text);
}

.btn-dark {
  background: var(--dark);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.btn-dark:hover {
  background: #2b2b2b;
  transform: translateY(-1px);
}

/* ---------- Layout shell ---------- */
main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 96px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 96px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  animation: rise-in 0.7s var(--ease) forwards;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--badge-text);
  position: relative;
}

.badge-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--badge-text);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0; }
}

.hero-headline {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark);
  max-width: 34ch;
}

.hero-links {
  display: flex;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-strong);
}

.hero-links a {
  position: relative;
}

.hero-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.25s var(--ease);
}

.hero-links a:hover::after {
  width: 100%;
}

.hero-photo {
  flex-shrink: 0;
  width: 420px;
  height: 540px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.16);
  background: var(--surface-preview);
  opacity: 0;
  transform: scale(0.96);
  animation: photo-in 0.8s var(--ease) 0.15s forwards;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

@keyframes photo-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- Selected work ---------- */
.selected-work {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.project-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.project-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-top-row h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
}

.project-description {
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

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

.tags li {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.explore-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s var(--ease), transform 0.3s var(--ease);
}

.explore-link:hover {
  gap: 8px;
}

.project-card:hover .explore-link {
  transform: translateY(-2px);
}

.project-preview {
  flex-shrink: 0;
  width: 500px;
}

.project-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s var(--ease);
}

.project-card:hover .project-preview img {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}



/* Scroll reveal — applied once per card, not per element inside it */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

/* ---------- Testimonials ---------- */
.testimonials {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.testimonial-carousel {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
}

.testimonial-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 42s linear infinite;
  /* One "set" is 4 cards; each card occupies (width + gap) of horizontal space.
     Translating by exactly that repeat unit — not -50% — keeps the loop seamless,
     since flex `gap` doesn't add a trailing gap after the last item in each set. */
  --set-count: 4;
  --card-width: 320px;
  --card-gap: 20px;
}

.testimonial-carousel:hover .testimonial-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--set-count) * (var(--card-width) + var(--card-gap)))); }
}

.testimonial {
  flex: 0 0 320px;
  width: 320px;
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.testimonial-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-preview);
  box-shadow: 0 0 0 0 rgba(20, 20, 20, 0);
  transition: box-shadow 0.3s var(--ease);
}

.testimonial:hover .testimonial-photo {
  box-shadow: 0 0 0 4px rgba(20, 20, 20, 0.08);
}

.testimonial-quote {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.testimonial footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testimonial cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-strong);
}

.testimonial footer span {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ---------- Contact ---------- */
.contact {
  background: var(--surface-muted);
  border-radius: var(--radius-xl);
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.contact h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
}

.contact p {
  font-size: 15px;
  color: var(--color-text-secondary);
}

.contact-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 152px;
  height: 64px;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 12px 16px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: #cfcfcf;
}

.icon-slot {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-slot-round {
  background: #ebebeb;
  border-radius: 50%;
}

.contact-btn-text strong {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-strong);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 48px; }
}

@media (max-width: 900px) {
  main { gap: 64px; padding-top: 56px; padding-bottom: 56px; }
  .hero { flex-direction: column-reverse; }
  .hero-photo { width: 100%; height: 360px; }
  .hero-headline { font-size: 28px; max-width: none; }
  .project-card { flex-direction: column; }
  .project-preview { width: 100%; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .header-links { gap: 16px; }
  .contact { padding: 32px 20px; }
  .contact-buttons { flex-direction: column; width: 100%; }
  .contact-btn { width: 100%; justify-content: center; }
}
