:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-muted: #f0f3f6;
  --border: #d0d7de;
  --border-strong: #8c959f;
  --text: #24292f;
  --muted: #57606a;
  --accent: #0969da;
  --accent-strong: #0550ae;
  --green: #1a7f37;
  --green-soft: #dafbe1;
  --amber: #9a6700;
  --coral: #cf222e;
  --shadow: 0 16px 40px rgba(31, 35, 40, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-muted: #21262d;
  --border: #30363d;
  --border-strong: #8b949e;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-strong: #79c0ff;
  --green: #3fb950;
  --green-soft: #12361f;
  --amber: #d29922;
  --coral: #ff7b72;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(180px, 520px) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 24px;
  background: #24292f;
  color: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 700;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo,
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
}

.brand-logo {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0 16%, #0969da 16% 52%, #2da44e 52% 100%);
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.global-search input {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 0 12px;
  outline: none;
}

.global-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.global-search input:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.25);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.session-chip {
  max-width: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-gate {
  width: min(1120px, calc(100% - 32px));
  margin: 38px auto 64px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.auth-copy {
  display: grid;
  gap: 16px;
  padding: 24px 0;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.02;
}

.auth-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-note {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 12px 14px;
  overflow-wrap: anywhere;
}

.auth-note strong {
  color: var(--text);
}

.auth-panels {
  display: grid;
  gap: 14px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.link-button {
  display: inline;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 700;
}

.link-button:hover,
.link-button:focus-visible {
  text-decoration: underline;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(230px, 296px) minmax(0, 1fr);
  gap: 28px;
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.profile-column {
  min-width: 0;
}

.avatar {
  position: relative;
  display: grid;
  width: min(100%, 260px);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(9, 105, 218, 0.95) 0 34%, rgba(36, 41, 47, 0.96) 34% 67%, rgba(26, 127, 55, 0.95) 67% 100%);
  color: #ffffff;
  font-size: clamp(48px, 12vw, 86px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.12);
}

.avatar span {
  position: relative;
  z-index: 1;
}

.avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.has-image {
  background: var(--surface-muted);
  box-shadow: none;
}

.avatar.has-image span {
  opacity: 0;
}

.identity-block h1 {
  margin: 20px 0 2px;
  font-size: 26px;
  line-height: 1.15;
}

.identity-block p,
.profile-bio,
.muted {
  color: var(--muted);
}

.identity-block p {
  margin: 0;
  font-size: 20px;
}

.profile-bio {
  margin: 18px 0;
  line-height: 1.55;
}

.wide-button,
.primary-action,
.ghost-button,
.icon-button,
.theme-button {
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  padding: 7px 12px;
  font-weight: 600;
}

.wide-button {
  width: 100%;
}

.primary-action {
  border-color: #1f883d;
  background: #1f883d;
  color: #ffffff;
}

.primary-action:hover {
  background: #1a7f37;
}

.ghost-button:hover,
.wide-button:hover,
.icon-button:hover,
.theme-button:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.icon-button {
  display: inline-grid;
  width: 36px;
  padding: 0;
  place-items: center;
}

.theme-button {
  min-width: 58px;
  padding-right: 10px;
  padding-left: 10px;
}

.profile-meta {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.profile-meta div {
  display: grid;
  gap: 2px;
}

.profile-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 22px 0;
}

.stat-grid div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 8px;
  text-align: center;
}

.stat-grid strong {
  display: block;
  font-size: 22px;
}

.stat-grid span {
  color: var(--muted);
  font-size: 12px;
}

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

.sidebar-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.profile-view-note {
  margin: 12px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.skill-list,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 650;
}

.content-column {
  min-width: 0;
}

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.tab {
  position: relative;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-weight: 650;
  white-space: nowrap;
}

.tab.active {
  color: var(--text);
}

.tab.active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: #fd8c73;
  content: "";
}

.tab-panel {
  display: none;
  padding-top: 24px;
}

.tab-panel.active {
  display: grid;
  gap: 18px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.readme-preview {
  display: grid;
  gap: 10px;
  line-height: 1.6;
}

.readme-preview h1,
.readme-preview h2,
.readme-preview h3,
.readme-preview p,
.readme-preview ul {
  margin: 0;
}

.readme-preview h1 {
  font-size: 24px;
}

.readme-preview h2 {
  font-size: 20px;
}

.readme-preview h3 {
  font-size: 17px;
}

.readme-preview ul {
  padding-left: 20px;
}

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

.profile-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.profile-card .avatar {
  width: 56px;
  font-size: 20px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.profile-card-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-card-body strong,
.profile-card-body span,
.profile-card-body p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card-body span,
.profile-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.editor-wrap {
  margin-top: 16px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 10px;
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.16);
}

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

.entry-form {
  display: grid;
  gap: 14px;
}

.repo-drop-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 16px;
}

.repo-drop-zone strong,
.repo-drop-zone span {
  display: block;
}

.repo-drop-zone strong {
  margin-bottom: 4px;
}

.repo-drop-zone span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.repo-drop-zone.is-dragging {
  border-color: var(--accent);
  background: rgba(9, 105, 218, 0.08);
}

.form-actions,
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.contact-settings,
.privacy-settings {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 14px;
}

.contact-settings h3,
.privacy-settings h3 {
  margin: 0;
  font-size: 17px;
}

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

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #1f883d;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(13, minmax(12px, 1fr));
  grid-auto-rows: 12px;
  gap: 4px;
  min-height: 112px;
}

.heatmap-cell,
.heatmap-legend i {
  border-radius: 3px;
  border: 1px solid rgba(27, 31, 36, 0.06);
}

.heatmap-cell {
  min-width: 12px;
}

.level-0 {
  background: var(--surface-muted);
}

.level-1 {
  background: #9be9a8;
}

.level-2 {
  background: #40c463;
}

.level-3 {
  background: #30a14e;
}

.level-4 {
  background: #216e39;
}

[data-theme="dark"] .level-1 {
  background: #0e4429;
}

[data-theme="dark"] .level-2 {
  background: #006d32;
}

[data-theme="dark"] .level-3 {
  background: #26a641;
}

[data-theme="dark"] .level-4 {
  background: #39d353;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.heatmap-legend i {
  width: 12px;
  height: 12px;
}

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

.project-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card,
.work-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.project-card {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(31, 35, 40, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.project-thumb {
  position: relative;
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(9, 105, 218, 0.9), rgba(31, 136, 61, 0.9)),
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.55), transparent 32%);
  color: #ffffff;
}

.project-thumb::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  content: "";
}

.project-initial {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 28px;
  font-weight: 800;
}

.play-button {
  position: relative;
  z-index: 1;
  display: inline-grid;
  min-width: 58px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(13, 17, 23, 0.76);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.play-button:hover {
  background: rgba(13, 17, 23, 0.94);
  text-decoration: none;
}

.play-button.disabled {
  cursor: default;
  opacity: 0.48;
}

.project-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  min-width: 0;
}

.card-title h3 {
  margin: 0;
  color: var(--accent);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.card-title p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.card-menu {
  display: inline-flex;
  flex-shrink: 0;
  gap: 6px;
}

.mini-button {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.mini-button:hover {
  border-color: var(--border-strong);
}

.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.rating-row span {
  font-weight: 700;
}

.rating-button {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.rating-button:hover,
.rating-button.active {
  border-color: #bf8700;
  background: rgba(191, 135, 0, 0.14);
  color: var(--text);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.planlandi {
  background: var(--amber);
}

.status-dot.tamamlandi {
  background: var(--accent);
}

.status-dot.arsiv {
  background: var(--border-strong);
}

.list-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px;
  gap: 12px;
}

.compact-field {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.work-list {
  display: grid;
  gap: 14px;
}

.work-body {
  color: var(--text);
  line-height: 1.58;
  white-space: pre-wrap;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 26px;
  text-align: center;
}

.admin-panel {
  display: grid;
  gap: 16px;
}

.admin-create-form {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 14px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--surface);
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.success-pill {
  border-color: rgba(31, 136, 61, 0.32);
  background: var(--green-soft);
  color: var(--green);
}

.danger-pill {
  border-color: rgba(207, 34, 46, 0.28);
  color: var(--coral);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 0 0 18px 24px;
  border-left: 2px solid var(--border);
}

.timeline-item::before {
  position: absolute;
  top: 1px;
  left: -7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.timeline-item strong {
  line-height: 1.3;
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
}

.profile-dialog {
  width: min(720px, calc(100% - 24px));
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  padding: 0;
}

.avatar-editor {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.avatar-preview {
  width: 104px;
  font-size: 34px;
}

.avatar-editor-controls {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.avatar-editor-controls .ghost-button {
  width: max-content;
}

.avatar-editor-controls .muted {
  margin: -4px 0 0;
  font-size: 12px;
}

.profile-dialog::backdrop,
.source-dialog::backdrop {
  background: rgba(1, 4, 9, 0.55);
}

.source-dialog {
  width: min(920px, calc(100% - 24px));
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  padding: 0;
}

.source-dialog-card {
  max-height: min(82vh, 780px);
}

.source-dialog-meta {
  margin: -8px 0 0;
}

.source-code-view {
  max-height: 54vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0d1117;
  color: #e6edf3;
  padding: 14px;
  white-space: pre-wrap;
}

.source-code-view code {
  font-family: "Cascadia Mono", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.dialog-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100% - 36px));
  transform: translateY(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.is-filtered-out,
.global-hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .global-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .profile-column {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .avatar {
    width: 104px;
    font-size: 36px;
  }

  .identity-block h1 {
    margin-top: 0;
  }

  .profile-bio,
  .wide-button,
  .profile-meta,
  .stat-grid,
  .sidebar-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .session-chip {
    max-width: 112px;
  }

  .primary-action,
  .ghost-button,
  .wide-button,
  .mini-button,
  .theme-button {
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-shell {
    width: min(100% - 20px, 1200px);
  }

  .panel {
    padding: 14px;
  }

  .section-head,
  .card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .project-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .project-thumb {
    width: 88px;
  }

  .avatar-editor {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .avatar-preview {
    width: 88px;
    font-size: 30px;
  }

  .toolbar-actions,
  .form-actions,
  .repo-drop-zone {
    justify-content: stretch;
  }

  .toolbar-actions > *,
  .form-actions > * {
    flex: 1;
  }

  .repo-drop-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .project-grid,
  .project-grid.compact,
  .profile-directory,
  .privacy-grid,
  .list-tools {
    grid-template-columns: 1fr;
  }

  .compact-field {
    grid-template-columns: 1fr;
  }
}
