:root {
  --bg: #f5f3ec;
  --paper: #fbfaf6;
  --ink: #1e2a25;
  --muted: #5f6c66;
  --line: rgba(25, 50, 41, 0.12);
  --accent: #5d7f72;
  --accent-soft: #dce8e1;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 18px 45px rgba(31, 54, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #fcfbf7 0%, var(--bg) 45%, #ecebe2 100%);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-blur {
  position: fixed;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}

.bg-blur-1 {
  width: 30rem;
  height: 30rem;
  background: #dceadf;
  top: -6rem;
  right: -8rem;
}

.bg-blur-2 {
  width: 25rem;
  height: 25rem;
  background: #e8ded0;
  bottom: -7rem;
  left: -5rem;
}

.hero {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 1.2rem auto 2rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 8px);
  background: rgba(251, 250, 246, 0.86);
  box-shadow: var(--shadow);
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  letter-spacing: 0.04em;
}

.brand img {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
}

.nav-links {
  display: flex;
  gap: 1.2rem;
}

.nav-links a {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
  line-height: 1.05;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.3rem, 7vw, 4.8rem);
  margin-bottom: 1rem;
}

.hero-sub {
  max-width: 55ch;
  color: var(--muted);
}

.hero-gallery {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr;
  gap: 0.85rem;
}

.tile {
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 260px;
}

.tile-large {
  min-height: 420px;
}

main {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.section {
  margin: 4rem 0;
}

.section-head {
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  max-width: 24ch;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  overflow: hidden;
}

.project-card h3 {
  font-size: 1.8rem;
  margin: 1rem 1rem 0.4rem 0;
}

.project-card p {
  margin: 0 1rem 0.8rem 0;
  color: #36443f;
  font-size: 0.95rem;
}

.project-card a {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.thoughts-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
}

.thought {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 1.1rem;
}

.thought h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.thought p {
  margin: 0;
  color: #3f4f48;
}

.thought.featured {
  padding: 0;
  overflow: hidden;
}

.thought.featured img {
  height: 220px;
}

.thought.featured div {
  padding: 1.1rem;
}

.meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.principles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}

.principle {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(155deg, #f7f5ee, #f2f6f2);
  padding: 1rem;
}

.principle h3 {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.principle p {
  margin: 0;
  color: #41514a;
  font-size: 0.93rem;
}

.floating-chat {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(410px, calc(100vw - 1rem));
  z-index: 30;
}

.floating-chat-shell {
  position: relative;
}

.chat-open {
  display: none;
  position: absolute;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(93, 127, 114, 0.28);
  background: linear-gradient(150deg, #f4f7f4, #dbe8e0);
  color: #2f4039;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.chat-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: blur(10px);
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(31, 54, 45, 0.16);
}

.floating-chat.is-collapsed .chat-panel {
  display: none;
}

.floating-chat.is-collapsed .chat-open {
  display: inline-block;
}

.chat-panel-head {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  background: linear-gradient(145deg, rgba(243, 248, 244, 0.96), rgba(244, 239, 230, 0.9));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.chat-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
}

.chat-subtitle {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-minimize {
  border: 1px solid rgba(93, 127, 114, 0.28);
  background: #f7f4ec;
  color: #42564d;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.chat-composer textarea:focus {
  outline: 2px solid rgba(93, 127, 114, 0.25);
  border-color: rgba(93, 127, 114, 0.45);
}

.chat-composer button {
  border: 1px solid rgba(93, 127, 114, 0.25);
  background: linear-gradient(150deg, #f2f6f3, #dce8e1);
  color: #2d3f38;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-composer button:hover {
  filter: brightness(0.98);
}

.chat-messages {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  max-height: 430px;
  background:
    radial-gradient(circle at 90% 10%, rgba(204, 223, 214, 0.22), transparent 43%),
    radial-gradient(circle at 10% 100%, rgba(218, 211, 195, 0.25), transparent 40%);
}

.bubble {
  max-width: 78%;
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 0.94rem;
  line-height: 1.45;
}

.bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.bubble-user {
  margin-left: auto;
  background: #ecf4ef;
}

.bubble-assistant {
  margin-right: auto;
  background: #fbf8f1;
}

.bubble-system {
  margin: 0 auto;
  background: rgba(248, 245, 235, 0.9);
  color: #54645d;
  font-size: 0.85rem;
}

.chat-composer {
  border-top: 1px solid var(--line);
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: end;
  background: rgba(247, 245, 238, 0.94);
}

.chat-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 52px;
  max-height: 160px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--ink);
  padding: 0.65rem 0.7rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.93rem;
}

.footer {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto 2rem;
  padding: 1.3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0.15rem 0;
}

.footer a {
  color: var(--accent);
}

.footer small {
  display: inline-block;
  margin-top: 0.7rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

@media (max-width: 980px) {
  .hero-gallery,
  .projects-grid,
  .thoughts-layout,
  .principles {
    grid-template-columns: 1fr;
  }

  .floating-chat {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 0.5rem;
  }

  .chat-panel {
    min-height: 430px;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card img {
    max-height: 220px;
  }

  .tile,
  .tile-large {
    min-height: 240px;
  }
}
