:root {
  color-scheme: dark;
  --bg: #08101b;
  --bg-soft: rgba(14, 25, 36, 0.94);
  --surface: rgba(23, 36, 52, 0.9);
  --surface-strong: rgba(29, 45, 65, 0.98);
  --border: rgba(255, 255, 255, 0.08);
  --text: #edf2fb;
  --muted: #9db4d0;
  --accent: #7c87ff;
  --accent-soft: rgba(124, 135, 255, 0.18);
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.22);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(124, 135, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #07101a 0%, #03080f 100%);
  color: var(--text);
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 14px 0;
}

.brand {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header a:hover {
  color: var(--accent);
}

.hero-section,
.work-section,
.about-section,
.admin-main {
  margin-top: 48px;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-copy .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.05;
  margin: 0;
}

.highlight {
  color: var(--accent);
}

.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 1.4rem 0 2rem;
  max-width: 38rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #08101b;
  text-decoration: none;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  background: #90a0ff;
}

.button.outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.glass-card {
  width: min(100%, 420px);
  padding: 2rem;
  background: rgba(15, 26, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.pulse-text {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.6;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0.72;
    transform: translateY(-6px);
  }
}

.section-header {
  display: grid;
  gap: 1rem;
}

.section-tag {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.work-section h2,
.about-section h3,
.admin-panel h1 {
  margin: 0;
}

.work-section p,
.about-section p,
.admin-panel p {
  color: var(--muted);
  max-width: 52rem;
}

.projects-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 28px;
  background: rgba(12, 20, 33, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 20px;
  background: #101c2d;
}

.project-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tech-list li {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(124, 135, 255, 0.14);
  color: #d6e0ff;
  font-size: 0.88rem;
}

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

.project-actions a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.loader,
.form-status {
  color: var(--muted);
}

.admin-shell {
  min-height: 100vh;
}

.admin-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 84px);
}

.admin-panel {
  width: min(760px, 100%);
  padding: 2.2rem;
  background: rgba(10, 18, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.project-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-form label {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.project-form input,
.project-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 16, 27, 0.9);
  color: var(--text);
  resize: vertical;
}

.project-form input:focus,
.project-form textarea:focus {
  outline: 2px solid rgba(124, 135, 255, 0.3);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0 1rem;
  text-align: center;
  color: var(--muted);
}

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

  .hero-visual {
    order: -1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 18px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .project-card img {
    height: 160px;
  }
}
