:root {
  --bg: #070b16;
  --surface: #0e1530;
  --surface-2: #0f1c3c;
  --surface-3: #101829;
  --text: #ebf1ff;
  --muted: #9fb1d9;
  --border: #223050;
  --accent: #4b8dff;
  --accent-2: #19d7c4;
  --danger: #d9576f;
  --success: #38c68d;
  --shadow: 0 20px 40px rgba(4, 10, 23, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(circle at 85% -20%, rgba(75, 141, 255, 0.2), transparent 35%),
    radial-gradient(circle at -10% 15%, rgba(25, 215, 196, 0.14), transparent 30%),
    linear-gradient(180deg, #090f1e 0%, #060a14 100%);
}

img {
  max-width: 100%;
  display: block;
}

.site-glow {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.24;
  pointer-events: none;
  z-index: 0;
}

.site-glow-1 {
  top: -200px;
  right: -120px;
  background: #2063dd;
}

.site-glow-2 {
  bottom: -240px;
  left: -160px;
  background: #1cb7a8;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.section {
  padding: 3.1rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(16, 26, 52, 0.58) 0%, rgba(12, 19, 38, 0.58) 100%);
  border-block: 1px solid rgba(53, 75, 124, 0.45);
}

.section-heading span {
  display: inline-block;
  font-size: 0.8rem;
  color: #7fb8ff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.section-heading h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.hero {
  padding: 1.1rem 0 3rem;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--accent-2);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  transition: 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(85, 130, 219, 0.17);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: rgba(12, 20, 40, 0.7);
  color: var(--text);
  border-radius: 10px;
  font-size: 1.1rem;
  padding: 0.32rem 0.6rem;
  cursor: pointer;
}

.hero-content {
  padding-top: 2.2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: stretch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(83, 137, 245, 0.38);
  background: rgba(48, 83, 155, 0.2);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  font-size: 0.78rem;
  color: #9ec5ff;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0.85rem 0 0.95rem;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.13;
  max-width: 14ch;
}

.hero-content p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.hero-panel {
  border: 1px solid rgba(74, 102, 164, 0.5);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(21, 34, 66, 0.86) 0%, rgba(12, 21, 43, 0.86) 100%);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.hero-panel h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.hero-stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 0.55rem;
}

.hero-stats li {
  border: 1px solid rgba(70, 93, 145, 0.5);
  border-radius: 12px;
  background: rgba(11, 18, 37, 0.7);
  padding: 0.65rem 0.7rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1.1;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.68rem 1.05rem;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(120deg, #437de2 0%, #4f8cff 50%, #29a8ff 100%);
  color: #f7fbff;
  box-shadow: 0 10px 24px rgba(50, 108, 216, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 12px 26px rgba(50, 108, 216, 0.5);
}

.btn-secondary {
  background: rgba(15, 26, 52, 0.85);
  border-color: rgba(75, 103, 167, 0.7);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(26, 39, 71, 0.95);
}

.btn-danger {
  background: rgba(116, 26, 46, 0.9);
  border-color: rgba(216, 87, 111, 0.5);
  color: #ffe7ec;
}

.categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.category-card {
  border: 1px solid rgba(66, 94, 153, 0.48);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 29, 56, 0.86), rgba(11, 18, 35, 0.86));
  padding: 1rem;
  min-height: 175px;
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.category-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.count-badge {
  border: 1px solid rgba(72, 137, 255, 0.52);
  background: rgba(38, 73, 143, 0.35);
  color: #b7d2ff;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.74rem;
  white-space: nowrap;
}

.category-card p {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid rgba(61, 88, 145, 0.72);
  border-radius: 999px;
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 600;
  transition: 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
  color: var(--text);
  background: rgba(56, 95, 178, 0.35);
  border-color: rgba(92, 143, 238, 0.8);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.project-card {
  border: 1px solid rgba(63, 91, 149, 0.48);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(19, 30, 58, 0.9), rgba(13, 20, 39, 0.92));
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 30px rgba(5, 11, 22, 0.32);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-body {
  padding: 0.9rem 0.95rem 1rem;
}

.project-body h3 {
  margin: 0.25rem 0 0.42rem;
  font-size: 1.08rem;
}

.project-body p {
  margin: 0;
  color: var(--muted);
}

.project-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.65rem;
  color: #98f4e7;
  text-decoration: none;
  font-weight: 700;
}

.project-link:hover {
  color: #c8fff7;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
}

.tag.web {
  background: rgba(57, 115, 218, 0.35);
  color: #b8d5ff;
}

.tag.mobil {
  background: rgba(83, 128, 44, 0.37);
  color: #d3ffb7;
}

.tag.robotik {
  background: rgba(143, 97, 45, 0.35);
  color: #ffdcb2;
}

.tag.grafik {
  background: rgba(135, 63, 169, 0.35);
  color: #f2c8ff;
}

.about-panel {
  border: 1px solid rgba(66, 96, 160, 0.5);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 29, 57, 0.9), rgba(11, 17, 33, 0.9));
  padding: 1.1rem;
  color: var(--muted);
}

.about-panel p {
  margin: 0;
}

.about-panel p + p {
  margin-top: 0.75rem;
}

.footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(59, 85, 136, 0.45);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

.footer-inner span {
  font-size: 0.9rem;
}

.empty-state {
  border: 1px dashed rgba(74, 108, 177, 0.6);
  border-radius: 14px;
  background: rgba(14, 24, 48, 0.62);
  color: var(--muted);
  padding: 1rem;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(74, 102, 162, 0.45);
  background: rgba(8, 13, 26, 0.8);
  backdrop-filter: blur(9px);
}

.admin-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0;
}

.admin-topbar strong {
  font-size: 1rem;
}

.admin-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-layout {
  width: min(1120px, 92%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-layout > .admin-card:first-child {
  grid-column: span 1;
}

.admin-layout > .admin-card:last-child {
  grid-column: span 1;
}

.auth-layout {
  max-width: 520px;
}

.auth-card,
.admin-card,
.detail-card {
  border: 1px solid rgba(67, 97, 160, 0.54);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 26, 52, 0.9), rgba(10, 16, 31, 0.9));
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.auth-card h1,
.admin-card h1,
.admin-card h2,
.detail-card h1 {
  margin: 0;
}

.auth-note {
  margin: 0.45rem 0 0.9rem;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 0.75rem;
}

.form-grid label {
  display: block;
  color: #bed0f4;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid rgba(73, 103, 164, 0.85);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  background: rgba(8, 15, 30, 0.88);
  color: var(--text);
  font: inherit;
  outline: none;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: rgba(101, 157, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(74, 131, 231, 0.2);
}

.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.alert {
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.75rem;
  font-size: 0.93rem;
}

.alert-success {
  border: 1px solid rgba(77, 166, 122, 0.55);
  background: rgba(22, 70, 48, 0.5);
  color: #b9ffd9;
}

.alert-error {
  border: 1px solid rgba(194, 82, 104, 0.56);
  background: rgba(82, 26, 39, 0.5);
  color: #ffd0d8;
}

.back-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #92eadd;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.back-link:hover {
  color: #cafdf6;
}

.admin-project-list {
  display: grid;
  gap: 0.65rem;
}

.admin-project-item {
  border: 1px solid rgba(62, 90, 149, 0.55);
  border-radius: 12px;
  background: rgba(11, 18, 36, 0.78);
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.admin-project-content strong {
  display: inline-block;
  margin-bottom: 0.28rem;
}

.admin-project-content p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.admin-meta {
  color: #87a4dc !important;
  font-size: 0.82rem;
}

.admin-item-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.inline-form {
  margin: 0;
}

.image-preview-wrap {
  display: grid;
  gap: 0.45rem;
}

.edit-preview-image {
  width: min(420px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(73, 102, 162, 0.7);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
}

.checkbox-row input {
  width: auto;
  margin-top: 0;
}

.detail-layout {
  max-width: 900px;
}

.detail-card {
  padding: 1.25rem;
}

.detail-card h1 {
  margin-top: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

.detail-image {
  border-radius: 13px;
  border: 1px solid rgba(73, 104, 167, 0.7);
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: rgba(8, 13, 25, 0.6);
  margin: 0.8rem 0 1rem;
}

.detail-content {
  color: #cfdbf7;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 54px;
    right: 0;
    width: min(240px, 90vw);
    background: rgba(13, 23, 45, 0.96);
    border: 1px solid rgba(73, 104, 167, 0.72);
    border-radius: 12px;
    padding: 0.55rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .categories {
    grid-template-columns: 1fr;
  }

  .admin-project-item {
    flex-direction: column;
  }
}
