:root {
  --bg: #06110d;
  --bg-soft: #0b1a14;
  --surface: rgba(10, 24, 18, 0.86);
  --surface-strong: rgba(14, 35, 26, 0.92);
  --line: rgba(73, 233, 169, 0.22);
  --line-strong: rgba(73, 233, 169, 0.44);
  --text-main: #dfffee;
  --text-muted: #8bc8a8;
  --accent: #49e9a9;
  --accent-strong: #1cbf80;
  --danger: #ff7a7a;
  --radius: 14px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Consolas", "SFMono-Regular", "Menlo", "Monaco", monospace;
  color: var(--text-main);
  background:
    radial-gradient(circle at 8% 8%, rgba(73, 233, 169, 0.14), transparent 34%),
    radial-gradient(circle at 89% 12%, rgba(73, 233, 169, 0.09), transparent 36%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 100%);
  padding: clamp(1rem, 2.4vw, 2rem);
  overflow-x: hidden;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(73, 233, 169, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 233, 169, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(6, 17, 13, 0) 0px,
    rgba(6, 17, 13, 0) 2px,
    rgba(4, 12, 8, 0.16) 3px
  );
  mix-blend-mode: soft-light;
  animation: scan-shift 10s linear infinite;
}

header,
main,
footer {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(12, 33, 24, 0.85) 0%, rgba(8, 23, 16, 0.85) 100%);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 0 0 1px rgba(73, 233, 169, 0.12), 0 22px 46px rgba(0, 0, 0, 0.35);
}

.eyebrow {
  margin: 0 0 0.28rem;
  color: var(--text-muted);
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.brand-block h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  color: #f3fff8;
  text-shadow: 0 0 18px rgba(73, 233, 169, 0.32);
}

.projects-link {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.projects-link:hover {
  background: rgba(73, 233, 169, 0.16);
  color: #f2fffa;
}

.layout {
  display: grid;
  gap: 0.95rem;
  margin-top: 1rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
  padding: clamp(1rem, 2vw, 1.45rem);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -70% -20%;
  height: 160%;
  background: radial-gradient(circle, rgba(73, 233, 169, 0.14) 0%, transparent 65%);
  pointer-events: none;
}

.hero-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.hero-lead {
  margin: 0.52rem 0 0;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  line-height: 1.22;
  max-width: 25ch;
}

.hero-copy {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 70ch;
}

.hero-stats {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem 0.68rem;
  background: rgba(10, 27, 20, 0.72);
}

.stat-box span {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-box strong {
  display: block;
  margin-top: 0.22rem;
  color: #f4fff9;
  font-size: 1rem;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.12rem, 2.2vw, 1.55rem);
}

#about p,
.section-head p,
.project-body p,
.project-empty,
label,
.status-message {
  color: var(--text-muted);
}

#about p {
  margin: 0;
  line-height: 1.6;
}

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

.section-head p {
  margin: 0.28rem 0 0;
}

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

.project-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--surface-strong);
  opacity: 0;
  transform: translateY(10px);
  animation: rise-in 0.45s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.04s; }
.project-card:nth-child(2) { animation-delay: 0.08s; }
.project-card:nth-child(3) { animation-delay: 0.12s; }
.project-card:nth-child(4) { animation-delay: 0.16s; }
.project-card:nth-child(5) { animation-delay: 0.2s; }
.project-card:nth-child(6) { animation-delay: 0.24s; }

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-body {
  padding: 0.82rem 0.88rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.56rem;
}

.project-body h3 {
  margin: 0;
  font-size: 1rem;
}

.project-body p {
  margin: 0;
  line-height: 1.48;
  flex: 1;
}

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

.project-body a:hover {
  text-decoration: underline;
}

.admin-panel {
  border-color: var(--line-strong);
}

.admin-subsection {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 22, 16, 0.7);
  padding: 0.9rem;
}

.admin-subsection + .admin-subsection {
  margin-top: 0.8rem;
}

.admin-subsection h3 {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  color: #c8f9e3;
}

.project-form {
  display: grid;
  gap: 0.74rem;
}

label {
  display: grid;
  gap: 0.32rem;
  font-size: 0.9rem;
}

.field-label {
  margin: 0 0 0.38rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 21, 15, 0.82);
  color: var(--text-main);
  padding: 0.62rem 0.72rem;
}

input::placeholder,
textarea::placeholder {
  color: rgba(139, 200, 168, 0.68);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(73, 233, 169, 0.36);
  border-color: var(--line-strong);
}

button {
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #032213;
  font-weight: 800;
  padding: 0.6rem 0.92rem;
  cursor: pointer;
  transition: filter 0.2s ease;
}

button:hover {
  filter: brightness(1.04);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

.admin-project-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 20, 14, 0.85);
  padding: 0.62rem 0.72rem;
}

.admin-project-card h4 {
  margin: 0;
  font-size: 0.93rem;
}

.admin-project-meta {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-project-actions {
  margin-top: 0.52rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.admin-project-actions button {
  padding: 0.42rem 0.65rem;
  font-size: 0.82rem;
}

.danger {
  background: rgba(255, 122, 122, 0.16);
  border: 1px solid rgba(255, 122, 122, 0.38);
  color: #ffd5d5;
}

.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(8, 24, 16, 0.7);
  padding: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone p {
  margin: 0;
}

.dropzone p + p {
  margin-top: 0.28rem;
}

.dropzone span {
  color: var(--accent);
  font-weight: 700;
}

.dropzone-meta {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--text-muted) 90%, #fff 10%);
}

.dropzone:hover,
.dropzone.active {
  background: rgba(11, 33, 22, 0.86);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(73, 233, 169, 0.26);
}

.dropzone:focus-visible {
  outline: 2px solid rgba(73, 233, 169, 0.4);
  border-color: var(--accent);
}

.dropzone-file {
  margin: 0.38rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.ghost {
  border-color: var(--line);
  background: rgba(10, 27, 20, 0.9);
  color: var(--text-main);
}

.status-message {
  margin: 0.22rem 0 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
}

.status-message.error {
  color: var(--danger);
}

.status-message.success {
  color: var(--accent);
}

.site-footer {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.chatbot-fab {
  position: fixed;
  right: clamp(12px, 2vw, 22px);
  bottom: clamp(22px, 3vw, 34px);
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  z-index: 24;
  font-size: 1.4rem;
  color: #032213;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

.chatbot-fab::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 0.34rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 24, 18, 0.95);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chatbot-fab:hover::after,
.chatbot-fab:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.chatbot-overlay {
  position: fixed;
  inset: 0;
  z-index: 23;
  background: rgba(3, 10, 7, 0.4);
  display: grid;
  place-items: end;
  padding: clamp(0.7rem, 2vw, 1.2rem);
}

.chatbot-window {
  width: min(390px, 100%);
  min-height: 460px;
  max-height: 82vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.7rem;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chatbot-header h2 {
  margin: 0;
}

.chatbot-close {
  padding: 0.45rem 0.62rem;
}

.chatbot-loading {
  display: grid;
  place-items: center;
  min-height: 300px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chatbot-ui {
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  gap: 0.6rem;
  min-height: 360px;
}

.chatbot-ui.chatbot-locked {
  grid-template-rows: 1fr;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 17, 13, 0.98);
  min-height: 360px;
  padding: 1rem;
}

.chatbot-messages {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 22, 16, 0.7);
  padding: 0.66rem;
  overflow-y: auto;
  min-height: 170px;
}

.chat-bubble {
  margin: 0;
  max-width: 88%;
  padding: 0.54rem 0.65rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.chat-bubble + .chat-bubble {
  margin-top: 0.45rem;
}

.chat-bubble.bot {
  border: 1px solid var(--line);
  background: rgba(73, 233, 169, 0.08);
  color: var(--text-main);
}

.chat-bubble.prank-pop {
  animation: prank-pop 0.34s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.chat-bubble.user {
  margin-left: auto;
  background: rgba(73, 233, 169, 0.2);
  border: 1px solid rgba(73, 233, 169, 0.45);
  color: #f4fff9;
}

.chatbot-fake-actions {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr;
}

.chatbot-action {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 9px;
}

.chatbot-form {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr auto;
}

.chatbot-form input {
  min-width: 0;
}

.chatbot-prank {
  margin: 0;
  min-height: 1.4rem;
  color: var(--accent);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 18ch;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(73, 233, 169, 0.26);
}

.chatbot-prank.pop {
  animation: prank-pop 0.34s cubic-bezier(0.22, 1.2, 0.36, 1);
}

@keyframes prank-pop {
  0% {
    transform: scale(0.84);
    opacity: 0.4;
  }
  65% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.secret-trigger {
  position: fixed;
  right: 6px;
  bottom: 6px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(73, 233, 169, 0.04);
  opacity: 0.04;
  z-index: 22;
  padding: 0;
}

.secret-trigger:hover {
  opacity: 0.12;
}

.secret-trigger:focus-visible {
  opacity: 0.8;
  outline: 2px solid var(--accent);
}

.hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.19s; }
.delay-4 { animation-delay: 0.26s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan-shift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(24px);
  }
}

@media (max-width: 760px) {
  body {
    padding: 0.85rem;
  }

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

  .chatbot-fab::after {
    display: none;
  }

  .chatbot-overlay {
    padding: 0.5rem;
  }

  .chatbot-window {
    width: 100%;
    min-height: min(80vh, 500px);
  }
}
