:root {
  --bg: #0a0b0f;
  --panel: #12141c;
  --line: #25283a;
  --text: #eceff6;
  --muted: #a6acbd;
  --accent: #6c8dff;
  --accent-soft: rgba(108, 141, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 10% 0%, #171b27 0%, var(--bg) 45%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  backdrop-filter: blur(8px);
  background: rgba(10, 11, 15, 0.75);
  border-bottom: 1px solid var(--line);
}

.brand {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

nav {
  display: flex;
  gap: 1rem;
}

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

nav a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 56vh;
  padding: 6rem 2rem 3rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1 {
  margin: 0.4rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

#glitch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.92;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: saturate(1.15) contrast(1.05);
}

.content-section {
  padding: 2.5rem 2rem;
}

.section-head {
  margin-bottom: 1.2rem;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin-top: 0.4rem;
  color: var(--muted);
}

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

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border-radius: 12px;
  padding: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
}

.project-card p {
  line-height: 1.6;
}

.meta {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1rem 2rem 2rem;
}

.admin-body {
  background: var(--bg);
}

.admin-main {
  padding: 2rem;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.admin-panel h1 {
  font-size: 1.6rem;
}

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

form {
  display: grid;
  gap: 0.6rem;
  margin: 0.6rem 0 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c0f16;
  color: var(--text);
  padding: 0.6rem 0.7rem;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  width: fit-content;
  cursor: pointer;
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--line);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-list {
  display: grid;
  gap: 0.5rem;
}

.admin-list-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.admin-list-item button {
  background: transparent;
  border: 1px solid #4e556d;
}

.error-text {
  color: #ff8b8b;
  min-height: 1.2rem;
}

.hidden {
  display: none;
}

.about-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 720px;
  color: var(--muted);
  margin-bottom: 2rem;
}

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

.about-section-card h3 {
  margin-bottom: 0.4rem;
}

.card-image {
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  margin: -1rem -1rem 1rem;
}

.card-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.project-status {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0 0.7rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

/* Card as link */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card:has(.card-link):hover {
  border-color: var(--accent);
}

/* Project detail page */
.project-hero {
  min-height: 38vh;
}

.project-body-section {
  max-width: 860px;
}

.project-body-text {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 2rem;
  white-space: pre-line;
}

.project-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-bottom: 2rem;
}

.gallery-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.gallery-item:hover img {
  opacity: 0.85;
}

.project-links {
  margin: 1.5rem 0 1rem;
}

.project-ext-link {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.project-ext-link:hover {
  background: var(--accent);
  color: #fff;
}

.project-back {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.project-back a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.project-back a:hover {
  color: var(--text);
}
