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

:root {
  --text-primary: #121212;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --placeholder-bg: #d8d8d8;
  --accent: #4a9de0;
  --accent-text: #1E6EAF;
}

html {
  font-size: 16px;
}

body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: #fff;
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 40px;
  gap: 40px;
  z-index: 10;
}

.logo {
  display: block;
  line-height: 0;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar a {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.sidebar a:hover,
.sidebar a.active {
  color: var(--text-primary);
}

.linkedin-link {
  margin-top: auto;
  color: var(--text-muted);
  transition: color 0.15s ease;
  line-height: 0;
}

.linkedin-link:hover {
  color: var(--text-primary);
}

.sidebar .plus {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: transform 0.25s ease;
}

.nav-work.open .plus {
  transform: rotate(45deg);
}

.sidebar .work-submenu {
  list-style: none;
  border-left: 2px solid var(--border);
  margin-left: 2px;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease, margin-bottom 0.3s ease, opacity 0.3s ease;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
}

.sidebar .nav-work.open .work-submenu {
  max-height: 200px;
  margin-top: 18px;
  margin-bottom: 10px;
  opacity: 1;
}

.work-submenu a {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Main content ── */
.content {
  flex: 1;
  padding: 200px 200px 80px 120px;
}

/* ── Background logo ── */
@keyframes slow-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.bg-logo-wrap {
  position: fixed;
  right: -100px;
  top: 40%;
  translate: 0 -60%;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transition: opacity 0.4s ease;
}

.bg-logo {
  display: block;
  width: 680px;
  opacity: 0.10;
  animation: slow-spin 120s linear infinite;
}

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-bottom: 120px;
}

.hero-text {
  flex: 1;
}

.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.hero .tagline {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.rotating-word {
  display: inline-block;
  position: relative;
  padding: 2px 8px 3px 6px;
  transform: rotate(-0.5deg);
  text-align: center;
  vertical-align: baseline;
  font-weight: 300;
}

.rotating-word::before {
  content: '';
  position: absolute;
  inset: 1px 0px 1px -4px;
  background: rgba(147, 210, 245, 0.55);
  border-radius: 1px;
  filter: url(#rough-marker);
  z-index: -1;
}

.rotating-word-inner {
  display: inline-block;
  transform: rotate(0.5deg);
  transition: opacity 0.25s ease, filter 0.25s ease;
  white-space: nowrap;
  filter: blur(0px);
}

.rotating-word-inner.fade-out {
  opacity: 0;
  filter: blur(6px);
}

/* ── Headshot ── */
.headshot {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ── Section label ── */
.section-label {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dots {
  display: flex;
  gap: 8px;
  font-style: normal;
}

.dots span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* ── Projects ── */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}

.project-image-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  margin-bottom: 16px;
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.project-image.placeholder {
  background: var(--placeholder-bg);
}

.project-image-link:hover .project-image {
  opacity: 0.65;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

/* ── List layout ── */
.projects-list {
  display: flex;
  flex-direction: column;
}

.project-list-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.project-list-item:first-child {
  border-top: none;
}

.project-list-item:last-child {
  border-bottom: 1px solid var(--border);
}

.project-list-item:hover {
  opacity: 0.6;
}

.project-list-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.project-list-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Name tooltip ── */
.name-tooltip {
  position: relative;
  cursor: default;
  text-decoration: underline wavy;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.name-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text-primary);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.name-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── About ── */
.about-page {
  padding-top: 120px;
}

.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  max-width: 860px;
  align-items: start;
}

.about-photo {
  width: 100%;
  border-radius: 12px;
  display: block;
  animation: float 6s ease-in-out infinite;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.about-photo:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  animation-play-state: paused;
}

@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.about-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.inline-link {
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.inline-link::after {
  content: ' ↗';
  font-size: 0.9em;
  vertical-align: middle;
  text-decoration: none;
  display: inline-block;
}

.inline-link:hover {
  opacity: 0.7;
}

.about-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-bio:last-child {
  margin-bottom: 0;
}

.about-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.copy-btn-wrap {
  position: relative;
  display: inline-flex;
}

@keyframes tooltip-bounce {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px); }
  40%  { opacity: 1; transform: translateX(-50%) translateY(-6px); }
  65%  { transform: translateX(-50%) translateY(2px); }
  85%  { transform: translateX(-50%) translateY(-3px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.copy-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.copy-tooltip.visible {
  animation: tooltip-bounce 0.5s ease forwards;
}

@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-photo {
    max-width: 240px;
    aspect-ratio: 1 / 1;
  }
}

/* ── Case Study ── */
.case-study {
  padding-top: 120px;
  position: relative;
}

.case-header {
  margin-bottom: 40px;
}

.case-header h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.case-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 20px;
}

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

.tag {
  font-size: 0.80rem;
  color: var(--accent-text);
  background: #D9EEFF;
  border-radius: 999px;
  padding: 4px 12px;
}

.case-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
}

.case-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
}

.case-card-label {
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 12px;
}

.case-card-body {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin: 0;
}

.case-card-body a {
  color: var(--accent-text);
  font-weight: inherit;
  text-decoration: none;
}

.case-card-body a:hover {
  opacity: 0.7;
}

.case-glance {
  display: flex;
  flex-direction: column;
  max-width: 680px;
}

.case-glance-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
}

.case-glance-row + .case-glance-row {
  border-top: 1px solid var(--border);
}

.case-glance-key {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.20rem;
  color: var(--accent-text);
}

.case-hero-image {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 391px;
  border-radius: 12px;
  pointer-events: none;
  user-select: none;
}

.case-hero-image--small {
  width: 200px;
}

.case-confidential {
  margin-top: 48px;
  max-width: 680px;
  background: #D9EEFF;
  border-radius: 12px;
  padding: 32px 36px;
}

.case-confidential-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: #1E6EAF;
  margin: 0 0 10px 0;
}

.case-confidential-body {
  font-size: 0.95rem;
  color: #1E6EAF;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 860px) {
  .case-glance-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 1350px) {
  .case-hero-image {
    display: none;
  }
}

/* ── Case CTA ── */
.case-cta {
  display: flex;
  justify-content: center;
  max-width: 680px;
  margin: 48px 0;
}

.case-cta-btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-text);
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  background: transparent;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.case-cta-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Case Story ── */
.case-story {
  max-width: 680px;
  margin-top: 72px;
}

.case-story-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 40px;
}

.case-story-block {
  margin-bottom: 56px;
}

.case-story-block:last-child {
  margin-bottom: 0;
}

.case-story-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}

.case-story-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.case-story-image {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.case-story-image.placeholder {
  aspect-ratio: 16 / 9;
  background: var(--placeholder-bg);
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.gallery-stack-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-image {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.lightbox-trigger {
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.lightbox-trigger:hover {
  opacity: 0.88;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ── Hamburger button (hidden on wide screens) ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-secondary);
  line-height: 0;
}

.nav-toggle:hover {
  color: var(--text-primary);
}

/* ── Footer ── */
.site-footer {
  grid-column: 2;
  padding: 0 0 24px 120px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 0;
    z-index: 100;
    background: #fff;
  }

  .nav-toggle {
    display: block;
  }

  .sidebar > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  .sidebar > ul li > a,
  .sidebar > ul li > span {
    display: block;
    padding: 12px 24px;
  }

  .sidebar.nav-open > ul {
    display: flex;
  }

  .work-submenu {
    padding-left: 36px !important;
    gap: 0 !important;
  }

  .sidebar .nav-work.open .work-submenu {
    margin-top: 4px;
    margin-bottom: 4px;
  }

  .linkedin-link {
    display: none;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  .content {
    padding: 100px 24px 80px;
  }

  .case-study {
    padding-top: 120px;
  }
}
