:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #4b5563;
  --line: #e4e7ef;
  --accent: #2563eb;
  --radius: 14px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
  align-items: center;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.04);
}

.avatar-wrap {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f8fafc;
}

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

.profile-details h1 {
  margin: 0.25rem 0;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.handle {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.bio {
  margin: 0.35rem 0 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, color 140ms ease, border-color 140ms ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.14);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}

.button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

.button.secondary {
  background: #ffffff;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.12);
}

.button.secondary:hover {
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.14);
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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


.tile {
  background: var(--tile-bg, var(--panel));
  border: 1px solid var(--tile-border, var(--line));
  color: var(--tile-text, var(--text));
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.tile h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.tile p {
  margin: 0;
  color: var(--tile-subtext, var(--muted));
  line-height: 1.45;
}

.tile-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  background: var(--tag-bg, #f3f4f6);
  color: var(--tag-text, var(--muted));
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid var(--tile-border, var(--line));
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.tile:focus-visible {
  outline: 3px solid var(--tile-link-text, var(--accent));
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .profile {
    grid-template-columns: 1fr;
  }
}

.page.detail-page {
  gap: 1rem;
}

.detail-header {
  display: flex;
  justify-content: flex-end;
}

.detail-card {
  gap: 0.75rem;
  cursor: default;
  transition: none;
}

.detail-card:hover {
  transform: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.detail-title {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.detail-meta {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.detail-description {
  margin: 0;
  line-height: 1.6;
}
