:root {
  --bg: #fafaf9;
  --bg-alt: #ffffff;
  --text: #1c1c1c;
  --text-muted: #5f5f5f;
  --border: #e6e4e1;
  --accent: #2f6f4e;
  --accent-soft: #e7f2ec;
  --soon-bg: #f1f0ee;
  --soon-text: #8a8880;
  --claude: #d97757;
  --claude-strong: #c96442;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --bg-alt: #1c1c17;
    --text: #f2f1ec;
    --text-muted: #b4b2a9;
    --border: #33332b;
    --accent: #6fbf94;
    --accent-soft: #1f3229;
    --soon-bg: #26261f;
    --soon-text: #8a8880;
    --claude: #d97757;
    --claude-strong: #e08a6d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding: 72px 0 48px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.avatar {
  position: relative;
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initials {
  display: none;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
}

.avatar-fallback .avatar-initials {
  display: block;
}

.hero-text h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.linkedin-link svg {
  width: 16px;
  height: 16px;
}

.tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.bio {
  padding: 8px 0 32px;
  font-size: 1.05rem;
}

.bio p {
  margin: 0 0 16px;
}

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

.facts {
  display: grid;
  gap: 16px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.fact {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fact-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.fact-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.projects {
  padding: 32px 0 40px;
}

.projects h2 {
  margin: 0 0 24px;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.project-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-card-soon {
  opacity: 0.75;
}

.project-card-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-status {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-soon {
  background: var(--soon-bg);
  color: var(--soon-text);
}

footer {
  padding: 24px 0 56px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Project page ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.back-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.back-link:hover {
  color: var(--accent);
}

/* Vertical only: this element is also a .container, whose horizontal
   padding a padding shorthand here would wipe out. */
.page-hero {
  padding-top: 48px;
  padding-bottom: 32px;
}

.page-hero h1 {
  margin: 24px 0 8px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.page-hero .tagline {
  margin: 0 0 24px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--claude);
  border-color: var(--claude);
  color: #fff;
}

.btn-primary:hover {
  background: var(--claude-strong);
  border-color: var(--claude-strong);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.shot {
  margin: 0 0 40px;
}

.shot-link {
  display: block;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.shot-link:hover {
  opacity: 0.9;
}

.shot-link img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Screenshot lightbox */

.lightbox {
  display: none;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 32px;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.75);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 480px) {
  .lightbox {
    padding: 16px;
  }
}

.section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.section h3 {
  margin: 28px 0 10px;
  font-size: 1rem;
}

.section h3:first-of-type {
  margin-top: 0;
}

.section p {
  margin: 0 0 16px;
}

.section p:last-child {
  margin-bottom: 0;
}

.section a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.section ul {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-muted);
}

.section li {
  margin-bottom: 8px;
}

.section li:last-child {
  margin-bottom: 0;
}

.steps {
  margin: 0 0 16px;
  padding-left: 20px;
}

.steps li {
  margin-bottom: 14px;
}

.step-note {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--soon-bg);
  border-radius: 5px;
  padding: 2px 6px;
}

pre {
  margin: 8px 0 0;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}

/* Sample prompts */

.prompts {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prompt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 12px 12px 16px;
  margin: 0;
}

.prompt-text {
  margin: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.prompt-copy {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.prompt-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.prompt-copy svg {
  width: 15px;
  height: 15px;
  display: block;
}

.prompt-copy .icon-check,
.prompt-copy.is-copied .icon-copy {
  display: none;
}

.prompt-copy.is-copied .icon-check {
  display: block;
}

.prompt-copy.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}

/* Comparison */

.compare {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-alt);
}

.compare-head,
.compare-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
}

.compare-head {
  background: var(--soon-bg);
  border-bottom: 1px solid var(--border);
}

.compare-head span {
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.compare-head .col-mine {
  color: var(--accent);
  background: var(--accent-soft);
}

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

.compare-label {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.compare-cell {
  padding: 14px 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
}

.compare-cell.col-mine {
  background: var(--accent-soft);
  color: var(--text);
}

.compare-tag {
  display: none;
}

@media (max-width: 620px) {
  .compare-head {
    display: none;
  }

  .compare-row {
    display: block;
  }

  .compare-label {
    padding: 14px 16px 8px;
    font-size: 0.95rem;
  }

  .compare-cell {
    border-left: 0;
    padding: 0 16px 14px;
  }

  .compare-cell.col-mine {
    background: none;
    color: var(--text-muted);
  }

  .compare-tag {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 2px;
  }

  .compare-cell.col-mine .compare-tag {
    color: var(--accent);
  }
}

.note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-link svg {
  width: 16px;
  height: 16px;
}
