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

:root {
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text-primary: #111111;
  --text-secondary: #9ca3af;
  --accent: #3b82f6;
  --radius: 20px;
  --gap: 16px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.page {
  padding: 2px 24px 24px;
}

/* ── Header ── */
.header {
  z-index: 50;
  margin-bottom: 2px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  min-height: 46px;
}

/* Brand */
.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-primary);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ── Say hi popup ── */
.sayhi-wrapper {
  position: relative;
}

.sayhi-trigger {
  cursor: pointer;
  font-family: var(--font);
}

.sayhi-popup {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 12px 36px rgba(0, 0, 0, 0.1);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 100;
}

.sayhi-popup::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: var(--card-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  transform: rotate(45deg);
}

.sayhi-wrapper:hover .sayhi-popup,
.sayhi-popup.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sayhi-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.sayhi-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sayhi-input,
.sayhi-textarea {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f5f5f6;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
  resize: none;
}

.sayhi-input:focus,
.sayhi-textarea:focus {
  border-color: var(--accent);
}

.sayhi-input::placeholder,
.sayhi-textarea::placeholder {
  color: var(--text-secondary);
}

.sayhi-send {
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: var(--text-primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.sayhi-send:hover {
  background: var(--accent);
}

.btn-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.1s;
}

.btn-menu:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.1s;
}

.mobile-menu a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-cta {
  margin-top: 4px;
  justify-content: center;
  padding: 10px 14px !important;
  font-size: 14px !important;
}

/* Responsive: hide tabs and hamburger on phone, keep Say hi */
@media (max-width: 600px) {
  .nav-links,
  .btn-menu,
  .mobile-menu {
    display: none !important;
  }
}

/* ── Bento section ── */
.bento {
  background-color: #ececed;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.15) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  min-height: calc(100vh - 112px);
  padding: 12px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Bento card (shared) ── */
.bento-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 16px;
}

/* ── About card ── */
.bento-about {
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.bento-about:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.bento-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.bento-about-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bento-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.bento-role {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.bento-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 4px;
}

.bento-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}


/* ── Work card ── */
.bento-work {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.bento-work:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.bento-work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bento-work-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-arrow-link {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.bento-arrow {
  color: var(--text-secondary);
  transition: transform 0.2s;
}

.bento-arrow-link:hover .bento-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

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

.bento-project {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.bento-project-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #f0f0f1;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.bento-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder patterns for project thumbnails */
.thumb-pattern-grid {
  background-color: #e8e8ea;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='20' viewBox='0 0 80 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q20 0 40 10 Q60 20 80 10' fill='none' stroke='rgba(0,0,0,0.06)' stroke-width='3'/%3E%3C/svg%3E");
  background-size: 80px 20px;
}

.thumb-pattern-rings {
  background-color: #e8e8ea;
  background-image:
    radial-gradient(circle, transparent 9px, rgba(0, 0, 0, 0.06) 9px, rgba(0, 0, 0, 0.06) 12px, transparent 12px),
    radial-gradient(circle, transparent 21px, rgba(0, 0, 0, 0.05) 21px, rgba(0, 0, 0, 0.05) 24px, transparent 24px),
    radial-gradient(circle, transparent 33px, rgba(0, 0, 0, 0.04) 33px, rgba(0, 0, 0, 0.04) 36px, transparent 36px);
  background-position: center;
}

.thumb-pattern-crosses {
  background-color: #e8e8ea;
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 14px
  );
}

.bento-project-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.bento-work-footer {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: auto;
  text-decoration: none;
}

.bento-work-footer:hover,
.bento-games-footer:hover {
  color: var(--accent);
}

.bento-games-footer {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: auto;
  text-decoration: none;
}

a.bento-project:hover .bento-project-name {
  color: var(--text-primary);
}

/* ── Photography card ── */
.bento-photo {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  overflow: hidden;
  padding-bottom: 8px;
}

.bento-photo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.bento-photo-carousel {
  position: relative;
  flex: 1;
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.photo-nav-prev { left: 8px; }
.photo-nav-next { right: 8px; }

.photo-nav:hover {
  background: var(--text-primary);
  color: #fff;
}

.bento-photo-image {
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
}

.photo-track {
  display: flex;
  gap: 0;
  height: 100%;
  transition: transform 0.7s ease;
}

.photo-slide {
  flex: 0 0 100%;
  height: 100%;
  object-fit: cover;
}

.bento-photo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bento-photo-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-photo:hover .bento-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

/* ── Game Designs card ── */
.bento-games {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--text-primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.bento-games:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.bento-games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bento-games-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-games .bento-arrow-link:hover .bento-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

.bento-games-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.bento-games-image {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #f0f0f1;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.bento-games-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-games-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.bento-games-link:hover .bento-games-name {
  color: var(--text-primary);
}

.bento-games-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.bento-games-placeholder {
  background-color: #e8e8ea;
  background-image:
    radial-gradient(circle, transparent 9px, rgba(0, 0, 0, 0.06) 9px, rgba(0, 0, 0, 0.06) 12px, transparent 12px),
    radial-gradient(circle, transparent 21px, rgba(0, 0, 0, 0.05) 21px, rgba(0, 0, 0, 0.05) 24px, transparent 24px),
    radial-gradient(circle, transparent 33px, rgba(0, 0, 0, 0.04) 33px, rgba(0, 0, 0, 0.04) 36px, transparent 36px);
  background-position: center;
}

.bento-games-coming .bento-games-name {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ── Journalism card ── */
.bento-journalism {
  grid-column-start: 1;
  grid-row-start: 3;
  display: none; /* Hidden for now, change to flex to re-enable */
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.bento-journalism:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.bento-journalism-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bento-journalism-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-journalism .bento-arrow-link:hover .bento-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

.bento-journalism-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  flex: 1;
}

.bento-journalism-image {
  flex: 1;
  min-height: 120px;
  max-height: 200px;
  border-radius: 12px;
  background-color: #e8e8ea;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.bento-journalism-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-journalism-article-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.bento-journalism-article-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  opacity: 0.75;
}

/* ── Analytics card ── */
.bento-analytics {
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.bento-analytics:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.bento-analytics-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bento-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bento-stat-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.bento-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

/* ── Newsletter card ── */
.bento-newsletter {
  grid-column: span 2;
  display: none; /* Hidden for now, change to flex to re-enable */
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bento-newsletter:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
}

.newsletter-layout {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex: 1;
}

.newsletter-preview {
  text-decoration: none;
  flex: 1;
}

.newsletter-preview-image {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background-color: #e8e8ea;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.newsletter-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.newsletter-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-placeholder {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.placeholder-bar {
  height: 8px;
  border-radius: 4px;
  background-color: #e8e8ea;
  width: 100%;
}

.placeholder-bar.dark {
  height: 10px;
  background-color: #c0c0c4;
  width: 60%;
}

.placeholder-bar.short {
  width: 75%;
}

.bento-newsletter-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bento-newsletter-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.bento-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.bento-newsletter-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f5f5f6;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}

.bento-newsletter-input:focus {
  border-color: var(--accent);
}

.bento-newsletter-input::placeholder {
  color: var(--text-secondary);
}

.bento-newsletter-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: var(--text-primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.bento-newsletter-btn:hover {
  background: var(--accent);
}

/* ── Responsive bento ── */

/* 3 columns */
@media (max-width: 1100px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .bento-about      { order: 1; }
  .bento-games       { order: 2; grid-column: span 2; }
  .bento-work        { order: 3; grid-column: span 3; }
  .bento-photo       { order: 4; grid-column: span 2; }
  .bento-newsletter  { order: 5; grid-column: span 2; }
  .bento-journalism  { order: 6; }
}

/* 2 columns */
@media (max-width: 750px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-about      { order: 1; }
  .bento-games       { order: 2; grid-column: span 1; }
  .bento-work        { order: 3; grid-column: span 2; }
  .bento-photo       { order: 4; grid-column: span 2; }
  .bento-newsletter  { order: 5; grid-column: span 2; }
  .bento-journalism  { order: 6; }
}

/* 1 column */
@media (max-width: 600px) {
  .bento {
    padding: 10px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-about       { order: 1; }
  .bento-work        { order: 2; grid-column: span 1; }
  .bento-games       { order: 3; grid-column: span 1; }
  .bento-photo       { order: 4; grid-column: span 1; }
  .bento-newsletter  { order: 5; grid-column: span 1; }
  .bento-journalism  { order: 6; }

  .bento-work-projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-project:nth-child(3) {
    display: none;
  }

  .bento-games-image {
    max-height: 200px;
  }
}
