:root {
  color-scheme: dark;
  --bg: #060b09;
  --card-bg: #0e1613;
  --card-bg-soft: #111d19;
  --border: #1c2b25;
  --border-strong: #2a3d34;
  --text: #eef2ef;
  --muted: #8fa599;
  --accent: #22c55e;
  --accent-2: #84cc16;
  --accent-hover: #16a34a;
  --error: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 900px 600px at 50% -10%, #0f2318 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Login page ---------- */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  position: relative;
  background: linear-gradient(180deg, var(--card-bg-soft), var(--card-bg));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hero-image {
  width: 180px;
  height: 180px;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 0 0 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.tagline-side {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.8;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

input {
  background: #0c0e13;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: #4b5262;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

button {
  margin-top: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

button:active {
  transform: translateY(0);
}

.error-message {
  margin: 1.25rem 0 0;
  color: var(--error);
  font-size: 0.82rem;
}

/* ---------- App shell (post-login) ---------- */

.app-body {
  position: relative;
  overflow-x: hidden;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(8, 9, 13, 0.9);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 3rem;
}

.app-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.app-nav a:hover {
  color: var(--text);
  background: var(--card-bg-soft);
}

.app-nav a.active {
  color: var(--text);
  background: var(--card-bg);
}

.app-nav a.active::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.logout-form {
  margin-top: auto;
}

.logout-form button {
  margin-top: 0;
  width: 100%;
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.logout-form button:hover {
  background: var(--card-bg-soft);
  color: var(--text);
  transform: none;
  filter: none;
}

.bg-magnet {
  position: fixed;
  top: 50%;
  right: -180px;
  width: 760px;
  height: 760px;
  transform: translateY(-50%);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  filter: blur(0.3px);
}

.app-main {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-left: 240px;
  padding: 4rem 3.5rem 6rem;
}

.app-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.app-section:last-child {
  border-bottom: none;
}

.section-index {
  display: block;
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.app-section h2 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.app-section p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 46ch;
}

/* ---------- Hero ---------- */

.hero {
  padding: 1rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero .tagline {
  margin-bottom: 1rem;
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 46ch;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06170d;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}

.step-number {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Timeline ---------- */

.timeline {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border-strong);
}

.timeline-year {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  min-width: 3.5rem;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Testimonials ---------- */

.testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.testimonial {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}

.testimonial p {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.testimonial-name {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Projects ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card h3 {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--card-bg-soft), var(--card-bg));
  border: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .login-card,
  .app-section {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 700px) {
  .app-sidebar {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .app-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0;
    margin-left: 1.5rem;
  }

  .app-nav a.active::before {
    display: none;
  }

  .logout-form {
    margin-top: 0;
    margin-left: auto;
  }

  .app-main {
    margin-left: 0;
    padding: 2.5rem 1.5rem;
  }

  .bg-magnet {
    width: 420px;
    height: 420px;
    right: -140px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .steps,
  .testimonials,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
