:root {
  --text: #f5f7fb;
  --muted: #9aa3b2;
  --soft: rgba(255, 255, 255, 0.06);
  --soft-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #c8f36a;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #07070a; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #151521 0%, #0b0b10 55%, #07070a 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

.profile-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  padding: 32px 16px;
  place-items: center;
}

.profile-card {
  width: min(100%, 860px);
  padding: 34px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 24px;
  animation: fadeUp 400ms ease both;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 48px;
  align-items: center;
  text-align: left;
}

.app-content { width: 100%; }
.app-content > .profile-footer { margin-top: 30px; }
.auth-panel, .dashboard-panel, .public-profile { max-width: 540px; margin: 0 auto; text-align: left; }
.auth-panel h1, .dashboard-panel h1, .public-profile h1 { margin-bottom: 14px; }
.stack-form { display: grid; gap: 14px; margin-top: 24px; }
.stack-form label { display: grid; gap: 7px; color: var(--muted); font-size: .8rem; }
.stack-form input, .stack-form textarea { width: 100%; padding: 12px 13px; color: var(--text); font: inherit; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; outline: none; }
.stack-form textarea { min-height: 92px; resize: vertical; }
.stack-form input:focus, .stack-form textarea:focus { border-color: rgba(200,243,106,.7); }
.stack-form .route-btn { width: 100%; border: 0; cursor: pointer; font: inherit; }
.form-feedback { min-height: 18px; margin: 0; color: #c8f36a; font-size: .78rem; }
.form-feedback.error { color: #f3a8a8; }
.intro-note { margin-bottom: 18px; }
.text-button { padding: 0; color: var(--muted); font: inherit; background: none; border: 0; cursor: pointer; }
.text-button:hover { color: var(--text); }
.dashboard-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.public-profile { text-align: center; }
.public-avatar { display: grid; width: 96px; height: 96px; margin: 0 auto 22px; place-items: center; color: var(--text); font-size: 2.2rem; font-weight: 700; background: #212631; border-radius: 50%; }
.public-profile .about-copy { margin: 0 auto 22px; text-align: center; }
.public-profile .social-btn { margin-top: 14px; }
.public-profile .route-back { text-align: center; }

.home-intro h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); line-height: 0.98; }
.home-intro h1 span { color: var(--muted); }
.home-intro .tagline { max-width: 420px; margin: 20px 0 18px; }
.home-intro .about-copy { max-width: 430px; }
.about-copy strong { color: var(--text); font-weight: 600; }

.login-form {
  padding: 24px;
  text-align: left;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.login-form label {
  display: block;
  margin: 16px 0 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

.login-form input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
}

.login-form input:focus { border-color: rgba(200, 243, 106, 0.7); }
.login-form input::placeholder { color: #687283; }
.login-form .route-btn { width: 100%; border: 0; cursor: pointer; font: inherit; }
.form-feedback { min-height: 18px; margin: 12px 0 0; color: #f3a8a8; font-size: 0.78rem; }
.form-note { margin: 14px 0 0; color: var(--muted); font-size: 0.78rem; }
.form-note a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.avatar {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  border-radius: 50%;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.tagline {
  margin: 12px 0 27px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tagline span { color: #717b8a; }

.social-links {
  display: grid;
  gap: 10px;
}

.social-btn {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  transition: transform 180ms ease, background 180ms ease;
}

.social-btn:hover { transform: translateY(-2px); background: var(--soft-hover); }
.social-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.social-btn svg { width: 19px; height: 19px; fill: currentColor; opacity: 0.88; }
.social-btn .external { margin-left: auto; color: var(--muted); font-size: 1rem; font-weight: 400; }

.about {
  margin-top: 28px;
  padding-top: 22px;
  text-align: left;
  border-top: 1px solid var(--border);
}

.section-label {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.about-copy {
  max-width: 330px;
  margin: 0;
  color: #c5cbd5;
  font-size: 0.85rem;
  line-height: 1.65;
}

.profile-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  color: #737d8c;
  font-size: 0.75rem;
}

.route-btn {
  color: var(--text);
  text-decoration: none;
  margin-top: 24px;
}

.route-back {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color .18s ease;
}

.route-back:hover,
.route-back:focus-visible {
  color: var(--text);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 480px) {
  .profile-shell { padding: 20px 16px; }
  .profile-card { padding: 20px; border-radius: 20px; }
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .home-intro h1 { font-size: 2.35rem; }
  .login-form { padding: 18px; }
  .avatar { width: 88px; height: 88px; margin-bottom: 18px; }
  .social-btn { width: 100%; }
}
