/* ============================================================
   PortfolioHub — Super Advanced UI System
   Works for: index, login, dashboard, search
   ============================================================ */

:root {
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-2: rgba(255, 255, 255, 0.6);
  --border: rgba(15, 23, 42, 0.1);
  --border-2: rgba(15, 23, 42, 0.16);

  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.64);

  --nav: rgba(2, 6, 23, 0.92);
  --navText: rgba(255, 255, 255, 0.9);

  --primary: #2563eb;
  --primary-2: #60a5fa;
  --danger: #dc2626;

  --radius: 18px;
  --radius-sm: 14px;
  --pill: 999px;

  --shadow: 0 18px 50px rgba(2, 6, 23, 0.12);
  --shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.08);

  --focus: 0 0 0 4px rgba(96, 165, 250, 0.35);

  --gridMax: 1180px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(
      900px 500px at 12% 10%,
      rgba(96, 165, 250, 0.22),
      transparent 60%
    ),
    radial-gradient(
      800px 500px at 88% 16%,
      rgba(37, 99, 235, 0.14),
      transparent 60%
    ),
    linear-gradient(to bottom, #f7f8ff, #f6f7fb);
}

.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 0.88rem;
}

.container {
  width: min(var(--gridMax), calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.2rem 0;
}

/* -------------------- Navigation -------------------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--nav);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.nav-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.logo {
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--navText);
}

.nav-link {
  text-decoration: none;
  color: var(--navText);
  font-size: 0.94rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.nav-link:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--navText);
  padding: 0.45rem 0.75rem;
  border-radius: var(--pill);
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.nav-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  border-radius: var(--pill);
  padding: 0.7rem 1.05rem;
  font-weight: 750;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  user-select: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: white;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover {
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.26);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, var(--danger));
  color: white;
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.18);
}
.btn-danger:hover {
  box-shadow: 0 18px 46px rgba(220, 38, 38, 0.22);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
}

.text-link {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover {
  color: #1e40af;
}
.text-link:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 10px;
}

/* -------------------- Chips / badges -------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--pill);
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.6);
}
.chip-primary {
  color: #1e3a8a;
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.1);
}
.chip-glow {
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(37, 99, 235, 0.18);
}

/* -------------------- Headings -------------------- */
.page-head {
  margin-bottom: 1rem;
}
.page-head h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.55rem, 1.05rem + 1.7vw, 2.15rem);
  letter-spacing: -0.02em;
}
.page-head p {
  margin: 0.25rem 0;
}

/* -------------------- Hero -------------------- */
.hero-card {
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}
.hero-content {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 1.2rem;
  align-items: stretch;
}
.hero-title {
  margin: 0.25rem 0 0.4rem;
  font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.4rem);
  letter-spacing: -0.03em;
}
.hero-subtitle {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.hero-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.hero-hint {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.hero-metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.1);
  background:
    radial-gradient(
      500px 260px at 40% 20%,
      rgba(96, 165, 250, 0.22),
      transparent 65%
    ),
    radial-gradient(
      540px 260px at 80% 70%,
      rgba(37, 99, 235, 0.16),
      transparent 65%
    ),
    rgba(255, 255, 255, 0.55);
}
.metric {
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.65);
}
.metric-k {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}
.metric-v {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* -------------------- Profile page -------------------- */
.profile-page {
  padding: 1.2rem;
}
.profile-header {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.2rem;
  padding: 0.5rem 0.2rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.profile-pic-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background:
    radial-gradient(
      300px 180px at 30% 20%,
      rgba(96, 165, 250, 0.25),
      transparent 60%
    ),
    rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.55);
  overflow: hidden;
}
.profile-pic-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  margin: 0;
  font-size: clamp(1.6rem, 1.1rem + 1.7vw, 2.2rem);
  letter-spacing: -0.03em;
}
.profile-username {
  margin: 0.1rem 0 0.4rem;
  color: var(--muted);
  font-weight: 800;
}
.profile-dob {
  margin: 0.2rem 0 0.6rem;
  color: var(--muted);
}
.profile-dob-text {
  font-weight: 900;
  color: rgba(15, 23, 42, 0.78);
}
.profile-bio {
  margin: 0.25rem 0 0.9rem;
  font-size: 1.02rem;
}
.profile-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.profile-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.1rem;
  margin-top: 1.15rem;
}
.section-head h3 {
  margin: 0 0 0.15rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.project-card {
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.7);
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.1);
}
.project-title {
  margin: 0 0 0.3rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.project-description {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.sidebar {
  display: grid;
  gap: 0.9rem;
}
.sidebar-card {
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.7);
  padding: 1rem;
}

.skills-list,
.contact-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-chip {
  padding: 0.35rem 0.65rem;
  border-radius: var(--pill);
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.08);
  font-weight: 800;
  font-size: 0.9rem;
}
.contact-list {
  flex-direction: column;
  gap: 0.6rem;
}
.contact-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}
.contact-k {
  font-weight: 900;
  color: rgba(15, 23, 42, 0.76);
}

.empty-state {
  border-radius: var(--radius);
  border: 1px dashed rgba(15, 23, 42, 0.18);
  padding: 1.05rem;
  background: rgba(255, 255, 255, 0.55);
}

/* -------------------- Auth page -------------------- */
.auth-body {
  background:
    radial-gradient(
      900px 520px at 18% 12%,
      rgba(96, 165, 250, 0.22),
      transparent 62%
    ),
    radial-gradient(
      820px 520px at 84% 18%,
      rgba(37, 99, 235, 0.18),
      transparent 62%
    ),
    linear-gradient(to bottom, #050a18, #070b14);
  color: rgba(255, 255, 255, 0.92);
}

.auth-page {
  margin-top: 2rem;
}
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.auth-info,
.auth-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
}

.auth-info {
  padding: 1.25rem;
}
.auth-panel {
  padding: 1.25rem;
}

.auth-title {
  margin: 0.35rem 0 0.3rem;
  letter-spacing: -0.03em;
  font-size: 1.7rem;
}
.auth-lead {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.auth-list {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.76);
}
.auth-list li {
  margin: 0.4rem 0;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.14);
  margin-right: 0.55rem;
}

.auth-side-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.auth-side-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
}
.auth-side-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.tab {
  border-radius: 14px;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.tab:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}
.tab.is-active {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.3);
}

.form {
  display: grid;
  gap: 0.75rem;
}
.form-head h2 {
  margin: 0;
  letter-spacing: -0.02em;
}
.form-head p {
  margin: 0.2rem 0 0;
}

.field {
  display: grid;
  gap: 0.3rem;
}
.field span {
  font-weight: 800;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(2, 6, 23, 0.3);
  color: rgba(255, 255, 255, 0.92);
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
textarea {
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: var(--focus);
  background: rgba(2, 6, 23, 0.38);
}

.input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.icon-btn {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.7rem 0.85rem;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.form-message {
  min-height: 1.1em;
  margin: 0.2rem 0 0;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
}
.form-message[data-type="ok"] {
  color: rgba(134, 239, 172, 0.95);
}
.form-message[data-type="error"] {
  color: rgba(252, 165, 165, 0.95);
}

.form-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-links .text-link {
  color: rgba(191, 219, 254, 0.95);
}
.form-links .text-link:hover {
  color: rgba(219, 234, 254, 1);
}

.strength {
  height: 10px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.strength-bar {
  width: 0%;
  height: 100%;
  border-radius: var(--pill);
  background: rgba(96, 165, 250, 0.95);
  transition: width 0.2s ease;
}

/* -------------------- Dashboard / Search panels -------------------- */
.panel {
  padding: 1.1rem;
}
.panel-head h2 {
  margin: 0;
  letter-spacing: -0.02em;
}
.panel-head p {
  margin: 0.3rem 0 0;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.subhead {
  margin: 0.2rem 0 0.6rem;
  font-weight: 950;
  letter-spacing: -0.01em;
}
.project-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.project-list-item {
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}
.project-list-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.project-list-item-title {
  font-weight: 950;
  letter-spacing: -0.01em;
}
.project-list-item-desc {
  margin-top: 0.35rem;
  color: var(--muted);
}

.pill {
  border-radius: var(--pill);
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 900;
  cursor: pointer;
}
.pill-danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.1);
  color: rgba(153, 27, 27, 0.95);
}
.pill-danger:hover {
  background: rgba(220, 38, 38, 0.14);
}

.search-panel {
  padding: 1.1rem;
}
.search-controls {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 0.9rem;
  align-items: end;
  margin-bottom: 0.75rem;
}
.search-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.result-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}
.result-title {
  font-weight: 950;
  letter-spacing: -0.01em;
}
.result-subtitle {
  color: var(--muted);
  margin-top: 0.2rem;
}
.result-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* -------------------- Danger zone -------------------- */
.danger-zone {
  border-radius: 18px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.06);
  padding: 1rem;
}
.danger-title {
  color: rgba(153, 27, 27, 0.95);
}

/* -------------------- Responsive -------------------- */
@media (max-width: 980px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  .profile-content {
    grid-template-columns: 1fr;
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .field-row {
    grid-template-columns: 1fr;
  }
  .search-controls {
    grid-template-columns: 1fr;
  }
}

#strength-text {
  color: white;
}
