@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400;1,500&family=DM+Sans:wght@300;400;500;600;700&display=swap');

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

:root {
  --sage:        #5a6b52;
  --sage-light:  #8a9a82;
  --sage-pale:   #e2e8de;
  --stone:       #eeebe4;
  --stone-mid:   #e4e0d8;
  --stone-dark:  #ccc8be;
  --ink:         #2c3028;
  --ink-mid:     #4a5244;
  --ink-light:   #6b7560;
  --ink-faint:   #9aa090;
  --white:       #faf9f6;
  --tank-bg:     #bfcbbb;
  --tank-floor:  #a9b4a1;
  --sidebar-w:   210px;
  --font-serif:  'Lora', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
  --transition:  0.18s ease;
}

html, body {
  height: 100%;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
ul { list-style: none; }

/* ── Custom cursor ────────────────────────────────── */
.cursor-dot {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--sage);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor-bubble {
  position: fixed;
  border-radius: 50%;
  background: rgba(90, 107, 82, 0.18);
  border: 1.5px solid rgba(90, 107, 82, 0.7);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  animation: bcpop 0.75s ease-out forwards;
}

@keyframes bcpop {
  0%   { opacity: 0.9;  width: 6px;  height: 6px; }
  50%  { opacity: 0.55; width: 22px; height: 22px; }
  100% { opacity: 0;    width: 34px; height: 34px; }
}

/* ── Layout ───────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--stone);
  border-right: 0.5px solid var(--stone-dark);
  display: flex;
  flex-direction: column;
  padding: 36px 24px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
  transition: transform var(--transition);
}

/* ── Logotype ─────────────────────────────────────── */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  margin-bottom: 44px;
  line-height: 1;
  text-decoration: none;
}
.logo-ux {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-light);
  position: relative;
  top: -1px;
}
.logo-berty {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.logo-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  margin-left: 3px;
  position: relative;
  top: -6px;
  flex-shrink: 0;
}

/* ── Nav ──────────────────────────────────────────── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink-light);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1px;
  cursor: none;
  transition: background var(--transition), color var(--transition);
}
.nav-item:hover  { background: var(--stone-mid); color: var(--ink-mid); }
.nav-item.active { background: var(--sage-pale); color: var(--sage); font-weight: 600; }
.nav-item.active svg { color: var(--sage); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; transition: opacity var(--transition); }
.nav-item:hover svg, .nav-item.active svg { opacity: 1; }

/* ── Sidebar footer — reef + credit ──────────────── */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-reef {
  flex-shrink: 0;
  width: 22px;
  height: 28px;
}

.sidebar-reef .reef-bubble {
  animation: reef-bubble-rise linear infinite;
  opacity: 0;
}

@keyframes reef-bubble-rise {
  0%   { opacity: 0;    transform: translateY(0); }
  20%  { opacity: 0.75; }
  80%  { opacity: 0.3;  transform: translateY(-10px); }
  100% { opacity: 0;    transform: translateY(-16px); }
}

.sidebar-credit {
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.2px;
  line-height: 1.4;
  white-space: nowrap;
}
.sidebar-credit span {
  color: var(--ink-light);
  font-style: italic;
  font-family: var(--font-serif);
}

/* ── Main ─────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.page-content {
  flex: 1;
  padding: 56px 52px 160px;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
}

.page-content::-webkit-scrollbar {
  display: none;
}

.content-inner {
  max-width: 700px;
}

/* ── Custom sidebar-edge scrollbar ────────────────── */
.custom-scrollbar {
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-w) - 2px);
  width: 3px;
  height: 100vh;
  z-index: 101;
  pointer-events: none;
}

.custom-scrollbar-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.custom-scrollbar-thumb {
  position: absolute;
  left: 0;
  width: 100%;
  background: var(--stone-dark);
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* ── Hero ─────────────────────────────────────────── */
.greeting {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}
.greeting em {
  font-style: italic;
  color: var(--sage);
  font-size: 20px;
  font-weight: 400;
  display: block;
  margin-top: 6px;
}

/* ── Bio ──────────────────────────────────────────── */
.bio {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.85;
  max-width: 520px;
  margin-bottom: 44px;
}
.bio code {
  font-family: var(--font-sans);
  font-size: 13px;
  background: var(--stone-mid);
  color: var(--ink-mid);
  padding: 1px 6px;
  border-radius: 4px;
  border: 0.5px solid var(--stone-dark);
}

/* ── Superpowers ──────────────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

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

.pill {
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--ink-mid);
  border: 0.5px solid #b8b4aa;
  border-radius: 100px;
  padding: 6px 16px;
  letter-spacing: 0.1px;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  cursor: none;
}
.pill:hover { border-color: var(--sage); color: var(--sage); background: var(--sage-pale); }

.writing-soon {
  padding-top: 20px;
}

.writing-soon-heading {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.writing-soon-sub {
  font-size: 14px;
  color: var(--ink-faint);
  line-height: 1.8;
  max-width: 420px;
}

/* ── Experience table ─────────────────────────────── */
.exp-table {
  margin-top: 4px;
  margin-bottom: 44px;
}

.exp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  gap: 24px;
}

.exp-row:first-child {
  padding-top: 0;
}

.exp-role {
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
}

.exp-company {
  font-size: 14px;
  color: var(--ink-light);
  font-family: var(--font-body);
  white-space: nowrap;
}

.exp-divider {
  height: 0.5px;
  background: var(--stone-dark);
  width: 100%;
}

/* ── Inspiration card ─────────────────────────────── */
.inspo-card {
  background: var(--white);
  border: 0.5px solid var(--stone-dark);
  border-radius: 12px;
  padding: 20px;
  max-width: 680px;
  margin-bottom: 40px;
  margin-top: 4px;
}

.inspo-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inspo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--stone-mid);
  border-radius: 6px;
  gap: 24px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  cursor: none;
  border: 0.5px solid transparent;
}

.inspo-row:hover {
  background: var(--sage-pale);
  border-color: var(--sage-light);
}

.inspo-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  font-family: var(--font-body);
  transition: color var(--transition);
}

.inspo-row:hover .inspo-title { color: var(--sage); }

.inspo-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.inspo-creator {
  font-size: 13px;
  color: var(--ink-light);
  font-family: var(--font-body);
  white-space: nowrap;
  transition: color var(--transition);
}

.inspo-row:hover .inspo-creator { color: var(--sage-light); }

.inspo-anchor {
  font-size: 12px;
  color: var(--ink-faint);
  transition: color var(--transition);
  line-height: 1;
}

.inspo-row:hover .inspo-anchor { color: var(--sage); }

/* ── About contact line ───────────────────────────── */
.about-contact {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.8;
}

.about-contact a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--stone-dark);
  transition: color var(--transition), text-decoration-color var(--transition);
}

.about-contact a:hover {
  color: var(--sage);
  text-decoration-color: var(--sage-light);
}

.email-copy-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--stone-dark);
  transition: color var(--transition), text-decoration-color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.email-copy-btn:hover {
  color: var(--sage);
  text-decoration-color: var(--sage-light);
}

.back-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--ink-faint);
  text-decoration: none;
  letter-spacing: 0.1px;
  transition: color var(--transition);
  cursor: none;
}
.back-link:hover { color: var(--sage); }

/* ── Work page ────────────────────────────────────── */
.work-tabs {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.work-tab {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-faint);
  background: transparent;
  border: 0.5px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: none;
  transition: all var(--transition);
  letter-spacing: 0.1px;
}

.work-tab:hover {
  background: var(--stone-mid);
  color: var(--ink-mid);
  border-color: var(--stone-dark);
}

.work-tab.active {
  background: var(--white);
  color: var(--ink);
  border-color: var(--stone-dark);
  font-weight: 500;
}

.work-panel { display: block; }
.work-panel.hidden { display: none; }

/* ── Work frame — wraps cards ─────────────────────── */
.work-frame {
  background: var(--white);
  border: 0.5px solid var(--stone-dark);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 644px;
}

.work-frame .case-card {
  max-width: 100%;
}

/* ── Case card ────────────────────────────────────── */
.case-card {
  display: block;
  position: relative;
  background: #b8c4b0;
  border-radius: 20px;
  overflow: hidden;
  min-height: 320px;
  max-width: 620px;
  text-decoration: none;
  cursor: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(44,48,40,0.10);
}

.case-card--soon {
  background: #d4d8ce;
  cursor: default;
}
.case-card--soon:hover {
  transform: none;
  box-shadow: none;
}

.case-card-body {
  position: relative;
  z-index: 2;
  padding: 36px 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
}

.case-card-text {
  margin-top: auto;
}

.case-title {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.case-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 20px;
}

/* Metric chip — glassy, always visible */
.case-metric {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  padding: 5px 12px;
  letter-spacing: 0.1px;
  white-space: nowrap;
  width: fit-content;
  margin-bottom: 10px;
}

/* Decorative illustration */
.case-card-deco {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 160px;
  height: 200px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

.case-card-deco svg {
  width: 100%;
  height: 100%;
}

/* Coming soon label */
.coming-soon-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 0.5px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 16px;
}

/* ── Generic page content ─────────────────────────── */
.page-heading {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}
.page-sub { font-size: 14px; color: var(--ink-faint); margin-bottom: 48px; }

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.placeholder-card {
  background: var(--white);
  border: 0.5px solid var(--stone-dark);
  border-radius: 12px;
  padding: 28px 24px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--transition);
}
.placeholder-card:hover { border-color: var(--sage-light); }
.card-tag   { font-size: 10px; font-weight: 500; color: var(--ink-faint); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px; }
.card-title { font-family: var(--font-serif); font-size: 17px; font-weight: 400; color: var(--ink); line-height: 1.4; margin-bottom: 12px; }
.card-arrow { font-size: 16px; color: var(--sage-light); align-self: flex-end; }

/* ── Fish Tank ────────────────────────────────────── */
.tank {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 110px;
  background: var(--tank-bg);
  overflow: hidden;
  z-index: 50;
}

.tank-floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 20px;
  background: var(--tank-floor);
}

.wave { position: absolute; width: 100%; pointer-events: none; }

.pebble { position: absolute; bottom: 5px; border-radius: 50%; }

.seaweed { position: absolute; bottom: 20px; }

.bubble {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.45);
  animation: bubble-rise linear infinite;
  opacity: 0;
}
@keyframes bubble-rise {
  0%   { opacity: 0.65; transform: translateY(0) translateX(0); }
  50%  { opacity: 0.3;  transform: translateY(-32px) translateX(3px); }
  100% { opacity: 0;    transform: translateY(-68px) translateX(-2px); }
}

/* ── Fish ─────────────────────────────────────────── */
.fish-wrap {
  position: absolute;
  bottom: 14px;
  left: 0;
  will-change: transform;
}

/* Fish tail & fin wag — speed controlled by JS class */
.fish-tail {
  animation: wag-tail 0.38s ease-in-out infinite alternate;
  transform-origin: 5px 14px;
}
.fish-tail.fast { animation-duration: 0.12s; }

@keyframes wag-tail {
  from { transform: rotate(-12deg); }
  to   { transform: rotate(12deg); }
}

.fish-fin {
  animation: wag-fin 0.38s ease-in-out infinite alternate;
  transform-origin: 26px 9px;
}
.fish-fin.fast { animation-duration: 0.12s; }

@keyframes wag-fin {
  from { transform: rotate(-6deg); }
  to   { transform: rotate(8deg); }
}

/* ── Whale ────────────────────────────────────────── */
.whale-wrap {
  position: absolute;
  bottom: 8px;
  left: 0;
  will-change: transform;
}

.whale-tail {
  animation: whale-wag 1.4s ease-in-out infinite alternate;
  transform-origin: 12px 30px;
}
@keyframes whale-wag {
  from { transform: rotate(-8deg); }
  to   { transform: rotate(8deg); }
}

/* ── Mobile nav toggle ────────────────────────────── */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 200;
  background: var(--stone);
  border: 0.5px solid var(--stone-dark);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.mobile-nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44,48,40,0.25);
  z-index: 99;
}

/* ── Case card cursor pill ────────────────────────── */
.card-cursor-pill {
  position: fixed;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 100px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.card-cursor-pill.visible {
  opacity: 1;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-nav-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); box-shadow: 4px 0 24px rgba(44,48,40,0.08); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; height: 100vh; }
  .page-content { padding: 72px 24px 160px; }
  .greeting { font-size: 24px; }
  .greeting em { font-size: 17px; }
  .placeholder-grid { grid-template-columns: 1fr; }
  body { cursor: auto; }
  .cursor-dot, .cursor-bubble { display: none; }
  .custom-scrollbar { display: none; }
}
