/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f6f3;
  --text: #0e0e0e;
  --text-mid: #444444;
  --text-light: #888888;
  --border: #e5e3de;
  --accent: #0e0e0e;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  cursor: none;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Custom Cursor ─── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), background 0.2s;
  will-change: transform;
}
.cursor.expanded {
  width: 40px; height: 40px;
  background: transparent;
  border: 1.5px solid var(--text);
  mix-blend-mode: difference;
}
.cursor-follower {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1px solid rgba(14,14,14,0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease), width 0.25s var(--ease-out), height 0.25s var(--ease-out), opacity 0.2s;
  will-change: transform;
}

/* ─── Nav ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.scrolled { border-color: var(--border); }

.nav-logo {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-mid);
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--text);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 100px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.nav-cta:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-icon {
  width: 18px; height: 18px;
  color: var(--text-mid);
  transition: color 0.2s;
}
.nav-icon:hover { color: var(--text); }

/* ─── Sections base ─── */
section { padding: 120px 40px; }
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 48px;
}
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 80px;
}

/* ─── Hero ─── */
#hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 124px 40px 48px;
  border-bottom: 1px solid var(--border);
}
.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 32px;
}
.hero-headline {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 900px;
  margin-bottom: 48px;
}
.hero-headline em {
  font-style: italic;
  color: var(--text-mid);
}
.hero-meta {
  display: flex;
  gap: 40px;
  font-size: 0.875rem;
  color: var(--text-mid);
}
.hero-meta span { display: flex; align-items: center; gap: 8px; }
.hero-meta span::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-light);
}

/* ─── Intro ─── */
#intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-top: 60px;
  padding-bottom: 60px;
}
.intro-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.intro-left .section-label { margin-bottom: 24px; align-self: flex-start; }

.intro-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-width: 320px;
}
.intro-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}
.intro-photo-laugh { opacity: 0; }
#intro:hover .intro-photo-smile { opacity: 0; }
#intro:hover .intro-photo-laugh { opacity: 1; }
.intro-right {
  text-align: left;
  padding-right: max(0px, calc((100% - 320px) / 2));
}
.intro-right p {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-mid);
  margin-bottom: 20px;
}
.intro-right p strong { color: var(--text); font-weight: 500; }
.intro-links {
  display: flex;
  gap: 20px;
  margin-top: 32px;
  justify-content: flex-start;
}
.text-email {
  font-size: 0.875rem;
  color: var(--text);
}
.text-link {
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  color: var(--text);
}
.text-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--text);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.3s var(--ease-out);
}
.text-link:hover::after {
  transform-origin: left;
  transform: scaleX(0);
}

/* ─── Work ─── */
#work {
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.work-section-header {
  padding: 80px 40px 48px;
  border-bottom: 1px solid var(--border);
}
.work-list { display: flex; flex-direction: column; }

.work-item {
  position: sticky;
  top: 64px; /* nav height */
  height: calc(100vh - 64px);
  background: var(--bg);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
  padding: 40px 40px 40px;
  border-bottom: 1px solid var(--border);
  transition: filter 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  overflow: hidden;
  will-change: filter, transform;
}
.work-item.blurred {
  filter: blur(8px) brightness(0.8);
  transform: scale(0.97);
}

.work-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.work-header-left { display: flex; flex-direction: column; gap: 8px; }

.work-index {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 0.08em;
}
.work-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.work-desc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.work-company {
  font-size: 0.9rem;
  color: var(--text-light);
}
.work-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-mid);
}

.work-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  padding: 14px 24px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.work-cta-btn:hover {
  background: #333;
  transform: scale(1.02);
}
.work-cta-btn svg {
  width: 14px; height: 14px;
}

.work-image {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-subtle);
  height: 100%;
  min-height: 0;
}
.work-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.work-item:hover .work-image img { transform: scale(1.02); }
.work-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* ─── Experience ─── */
#experience { border-bottom: 1px solid var(--border); }

.experience-list { display: flex; flex-direction: column; }
.experience-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 40px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.experience-item:last-child { border-bottom: none; }
.experience-item.visible { opacity: 1; transform: translateY(0); }

.exp-date {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}
.exp-role { font-size: 1rem; font-weight: 500; }
.exp-company { font-size: 0.875rem; color: var(--text-mid); margin-top: 2px; }
.exp-desc { font-size: 0.85rem; color: var(--text-light); margin-top: 8px; max-width: 480px; }
.exp-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-light);
  white-space: nowrap;
}

/* ─── About ─── */
#about {
  display: flex;
  flex-direction: column;
  gap: 60px;
  border-bottom: 1px solid var(--border);
}
.about-text p {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 20px;
}
.about-text p strong { color: var(--text); font-weight: 500; }
.about-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.about-photo {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-subtle);
  border-radius: 6px;
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* ─── Footer ─── */
footer {
  padding: 60px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}
.footer-left {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-mid);
  position: relative;
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--text);
  transition: width 0.3s var(--ease-out);
}
.footer-links a:hover { color: var(--text); }
.footer-links a:hover::after { width: 100%; }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ─── Scroll reveal base ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Work Index Page ─── */
.work-page-header {
  padding: 140px 40px 80px;
  border-bottom: 1px solid var(--border);
}
.work-page-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: 20px;
}
.work-page-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  margin-top: 20px;
  font-weight: 300;
}

.project-list {
  padding: 0;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  min-height: 340px;
  overflow: hidden;
  transition: background 0.25s var(--ease);
}
.project-card:hover { background: var(--bg-subtle); }

.project-card-image {
  overflow: hidden;
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
}
.project-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out);
}
.project-card:hover .project-card-image img { transform: scale(1.04); }
.project-card-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.project-card-info {
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.project-title {
  font-size: clamp(1.6rem, 2.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 8px;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.project-company {
  font-size: 0.875rem;
  color: var(--text-light);
}
.project-desc {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-top: 24px;
  flex: 1;
  max-width: 540px;
}
.project-footer {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  position: relative;
}
.project-cta::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--text);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.3s var(--ease-out);
}
.project-card:hover .project-cta::after {
  transform-origin: left;
  transform: scaleX(0);
}
.project-cta svg { width: 14px; height: 14px; flex-shrink: 0; }

.nav-link-active {
  color: var(--text) !important;
}
.nav-link-active::after { width: 100% !important; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  section { padding: 80px 24px; }
  #hero { padding: 100px 24px 60px; }
  #intro { grid-template-columns: 1fr; gap: 40px; }
  #about { gap: 40px; }
  .work-item { grid-template-rows: auto 1fr; height: calc(100vh - 64px); padding: 24px; }
  .work-header { grid-template-columns: 1fr; gap: 16px; }
  .work-cta-btn { display: none; }
  .experience-item { grid-template-columns: 1fr; gap: 8px; }
  footer { flex-direction: column; gap: 32px; align-items: flex-start; }
  .footer-right { align-items: flex-start; }
  .nav-links { display: none; }

  .work-page-header { padding: 100px 24px 60px; }
  .project-card { grid-template-columns: 1fr; min-height: 0; }
  .project-card-image { height: 240px; border-right: none; border-bottom: 1px solid var(--border); }
  .project-card-info { padding: 32px 24px; }
  .project-footer { flex-direction: column; align-items: flex-start; }
}
