* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #58a6ff, #bc8cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  color: #8b949e;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

#projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #58a6ff;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 500;
}

.badge.lock {
  background: #3d1f00;
  color: #f0883e;
}

.badge.open {
  background: #0d2818;
  color: #3fb950;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: #8b949e;
  font-size: 0.9rem;
}

.card button {
  background: #21262d;
  color: #e6edf3;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s;
}

.card button:hover {
  background: #30363d;
  border-color: #58a6ff;
}

.empty {
  text-align: center;
  color: #8b949e;
  grid-column: 1 / -1;
  font-size: 1.1rem;
  padding: 3rem 0;
}

/* Dialog / Modal */
dialog {
  background: #161b22;
  color: #e6edf3;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

dialog h2 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

dialog p {
  color: #8b949e;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

dialog input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 1rem;
  margin-bottom: 1rem;
}

dialog input:focus {
  outline: none;
  border-color: #58a6ff;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

.dialog-actions button {
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid #30363d;
}

.dialog-actions button[type="button"] {
  background: transparent;
  color: #8b949e;
}

.dialog-actions button[type="submit"] {
  background: #238636;
  color: #fff;
  border-color: #238636;
}

.dialog-actions button[type="submit"]:hover {
  background: #2ea043;
}
