:root {
  --bg: #f4efe7;
  --surface: rgba(255, 252, 247, 0.78);
  --surface-strong: #fffaf2;
  --text: #201815;
  --muted: #6e6259;
  --accent: #ca5d2c;
  --accent-dark: #9f441c;
  --line: rgba(32, 24, 21, 0.12);
  --shadow: 0 24px 70px rgba(65, 37, 21, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(202, 93, 44, 0.18), transparent 24%),
    radial-gradient(circle at right 20%, rgba(63, 107, 88, 0.16), transparent 22%),
    linear-gradient(180deg, #f7f2ea 0%, #efe7dc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(32, 24, 21, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 24, 21, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.topbar,
.hero-panel,
.project-card,
.workspace-grid article,
.note-card {
  backdrop-filter: blur(18px);
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.66);
  box-shadow: var(--shadow);
}

.brand,
.panel-label,
.mini-label,
.eyebrow,
.chip,
.meta-line,
.note-type {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand {
  font-size: 0.9rem;
  font-weight: 500;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar a,
.project-links a {
  color: inherit;
  text-decoration: none;
}

.topbar a:hover,
.project-links a:hover {
  color: var(--accent);
}

.hero {
  min-height: calc(100svh - 40px);
  display: flex;
  flex-direction: column;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: end;
  flex: 1;
}

.hero-copy {
  padding: 24px 6px 24px 0;
  animation: rise 0.7s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.82rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 20px;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-text,
.workspace-grid p,
.note-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 58ch;
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.hero-actions,
.project-links,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.filter-button {
  border-radius: 999px;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  text-decoration: none;
  font-weight: 700;
}

.button:hover,
.filter-button:hover,
.project-card:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: #fffaf2;
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
}

.hero-panel,
.project-card,
.workspace-grid article,
.note-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  align-self: stretch;
  padding: 26px;
  border-radius: 28px;
  animation: rise 0.85s ease both;
}

.panel-label,
.mini-label,
.meta-line,
.note-type {
  color: var(--accent-dark);
  font-size: 0.74rem;
}

.hero-points {
  margin: 18px 0 28px;
  padding: 0;
  list-style: none;
}

.hero-points li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 1.02rem;
}

.signal-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-strong);
}

.signal-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.section {
  padding-top: 48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.search-box {
  display: grid;
  gap: 8px;
  min-width: min(100%, 360px);
}

.search-box span {
  font-size: 0.92rem;
  font-weight: 700;
}

.search-box input {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font: inherit;
  background: rgba(255, 250, 242, 0.76);
}

.filter-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.72);
  font: inherit;
  cursor: pointer;
}

.filter-button.active {
  background: var(--text);
  color: #fffaf2;
}

.project-grid,
.notes-grid,
.workspace-grid {
  display: grid;
  gap: 18px;
}

.project-grid {
  grid-template-columns: repeat(12, 1fr);
}

.project-card {
  grid-column: span 6;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card.featured {
  grid-column: span 12;
}

.project-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.chip {
  align-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(202, 93, 44, 0.12);
  color: var(--accent-dark);
  font-size: 0.72rem;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-links a {
  font-weight: 700;
}

.project-link-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--text);
  color: #fffaf2 !important;
}

.project-link-primary:hover {
  background: var(--accent-dark);
  color: #fffaf2;
}

.workspace-grid {
  grid-template-columns: repeat(3, 1fr);
}

.workspace-grid article,
.note-card,
.workspace-card {
  padding: 22px;
  border-radius: 24px;
}

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

.note-card {
  animation: rise 0.6s ease both;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255, 250, 242, 0.55);
}

.detail-page {
  padding-top: 24px;
}

.detail-layout {
  display: grid;
  gap: 22px;
}

.detail-hero {
  max-width: 900px;
  padding: 18px 0 6px;
}

.detail-grid,
.detail-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}

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

.timer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.timer-panel,
.timer-display {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timer-form {
  display: grid;
  gap: 16px;
}

.timer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 700;
  font-size: 0.96rem;
}

.field input,
.field select {
  min-height: 50px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 250, 242, 0.82);
}

.field-note,
.timer-hint,
.timer-formula,
.timer-error {
  color: var(--muted);
  line-height: 1.6;
}

.timer-error {
  padding: 14px 16px;
  border: 1px solid rgba(159, 68, 28, 0.28);
  border-radius: 18px;
  background: rgba(202, 93, 44, 0.08);
  color: var(--accent-dark);
}

.timer-error[hidden] {
  display: none;
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.timer-actions button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.timer-actions button:hover {
  transform: translateY(-2px);
}

.timer-actions button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.timer-actions .button-primary {
  color: #fffaf2;
}

.timer-actions .button-secondary {
  background: transparent;
}

.timer-display {
  display: grid;
  gap: 18px;
}

.timer-stat {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.timer-stat:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.timer-stat-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.timer-big {
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.timer-status {
  font-size: 1.25rem;
  font-weight: 800;
}

.timer-formula {
  margin: 0;
}

.workspace-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace-card ul,
.project-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

code {
  padding: 0.1em 0.4em;
  border-radius: 8px;
  background: rgba(32, 24, 21, 0.07);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .workspace-grid,
  .notes-grid,
  .detail-grid,
  .detail-columns,
  .timer-workspace,
  .timer-fields {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card.featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar,
  .controls,
  .section-heading,
  .project-card header,
  .timer-actions {
    display: grid;
  }

  h1 {
    max-width: 12ch;
  }
}
