/* ─────────────────────────────────────────
   ionetiq Project Hub — main.css
   ───────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #0089D1;
  --blue-dim:   #006fa8;
  --blue-glow:  rgba(0, 137, 209, 0.15);
  --dark:       #1a1a1a;
  --card-bg:    #252525;
  --grey:       #3D3D3D;
  --mid-grey:   #858585;
  --light-grey: #F5F5F5;
  --border:     rgba(255, 255, 255, 0.06);
  --font-head:  'Montserrat', sans-serif;
  --font-body:  'Roboto', sans-serif;
  --radius:     12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--light-grey);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── grid texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 137, 209, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 137, 209, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* breadcrumb variant (used in project pages) */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-family: var(--font-body);
}

.breadcrumb a {
  color: var(--mid-grey);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a:hover { color: var(--blue); }

.breadcrumb img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.breadcrumb-sep { color: var(--grey); }

.breadcrumb-current { color: var(--light-grey); }

.header-tag {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-glow);
  border: 1px solid rgba(0, 137, 209, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-body);
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-grey);
  text-decoration: none;
  font-family: var(--font-body);
  transition: color 0.2s;
}

nav a:hover { color: var(--blue); }

/* ══════════════════════════════════════════
   HERO (hub)
══════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  padding: 100px 48px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  font-family: var(--font-body);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.1s;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--light-grey);
  max-width: 640px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.2s;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero p {
  margin-top: 20px;
  color: var(--mid-grey);
  font-size: 0.85rem;
  line-height: 1.8;
  max-width: 480px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.35s;
}

/* ══════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════ */
.divider {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.divider-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid-grey);
  white-space: nowrap;
  font-family: var(--font-body);
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.5s;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.5s;
}

.project-count {
  font-size: 0.68rem;
  color: var(--blue);
  letter-spacing: 0.1em;
  font-family: var(--font-body);
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.5s;
}

/* ══════════════════════════════════════════
   PROJECT GRID
══════════════════════════════════════════ */
.projects {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ── project card ── */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover {
  border-color: rgba(0, 137, 209, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 137, 209, 0.12);
}

.project-card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--blue-glow);
  border: 1px solid rgba(0, 137, 209, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--light-grey);
}

.card-desc {
  font-size: 0.73rem;
  color: var(--mid-grey);
  line-height: 1.6;
  font-family: var(--font-body);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-glow);
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-body);
}

.card-arrow {
  width: 24px;
  height: 24px;
  color: var(--mid-grey);
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.project-card:hover .card-arrow {
  color: var(--blue);
  transform: translate(3px, -3px);
}

/* ── add project placeholder ── */
.add-card {
  background: transparent;
  border: 1px dashed rgba(133, 133, 133, 0.3);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.add-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(133, 133, 133, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid-grey);
  font-size: 1.4rem;
  transition: border-color 0.25s, color 0.25s;
}

.add-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-grey);
  font-family: var(--font-body);
  transition: color 0.25s;
}

/* ── loading / error states ── */
.state-message {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 80px;
  font-size: 0.8rem;
  color: var(--mid-grey);
}

.state-message.error { color: #f87171; }

/* ══════════════════════════════════════════
   PROJECT PAGE HERO
══════════════════════════════════════════ */
.project-hero {
  position: relative;
  z-index: 1;
  padding: 80px 48px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
  font-family: var(--font-body);
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.1s;
}

.project-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--light-grey);
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.2s;
}

.hero-meta {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.35s;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid-grey);
  font-family: var(--font-body);
}

.meta-value {
  font-size: 0.8rem;
  color: var(--light-grey);
  font-family: var(--font-body);
}

/* ══════════════════════════════════════════
   PROJECT PAGE LAYOUT
══════════════════════════════════════════ */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 48px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── section blocks ── */
.section-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.section-block:nth-child(1) { animation-delay: 0.45s; }
.section-block:nth-child(2) { animation-delay: 0.55s; }
.section-block:nth-child(3) { animation-delay: 0.65s; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--light-grey);
}

.section-badge {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid-grey);
  font-family: var(--font-body);
}

.section-body { padding: 24px; }

.placeholder-text {
  font-size: 0.8rem;
  color: var(--mid-grey);
  line-height: 1.8;
  font-family: var(--font-body);
}

.placeholder-text strong { color: var(--light-grey); }

/* checklist */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--mid-grey);
  line-height: 1.5;
  font-family: var(--font-body);
}

.check-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--grey);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--blue);
}

.check-box.done {
  background: var(--blue-glow);
  border-color: rgba(0, 137, 209, 0.4);
}

/* code block */
.code-block {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.73rem;
  color: var(--mid-grey);
  line-height: 1.7;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
}

.code-block .comment { color: #4a5568; }
.code-block .key     { color: var(--blue); }
.code-block .val     { color: #68d391; }

/* ── sidebar ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.sidebar-card:nth-child(1) { animation-delay: 0.5s; }
.sidebar-card:nth-child(2) { animation-delay: 0.6s; }
.sidebar-card:nth-child(3) { animation-delay: 0.7s; }

.sidebar-heading {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--light-grey);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* status */
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.75rem;
}

.status-row + .status-row { border-top: 1px solid var(--border); }
.status-label { color: var(--mid-grey); font-family: var(--font-body); }

.status-pill {
  font-size: 0.62rem;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.pill-planning { background: rgba(133, 133, 133, 0.12); color: var(--mid-grey); }
.pill-active   { background: rgba(0, 137, 209, 0.15);   color: var(--blue); }
.pill-review   { background: rgba(251, 191, 36, 0.12);  color: #fbbf24; }
.pill-done     { background: rgba(52, 211, 153, 0.12);  color: #34d399; }

/* team */
.team-list { display: flex; flex-direction: column; gap: 12px; }

.team-member { display: flex; align-items: center; gap: 12px; font-size: 0.76rem; }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-glow);
  border: 1px solid rgba(0, 137, 209, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--blue);
  flex-shrink: 0;
  font-family: var(--font-head);
}

.member-name { color: var(--light-grey); font-family: var(--font-body); }
.member-role { font-size: 0.67rem; color: var(--mid-grey); font-family: var(--font-body); }

/* links */
.link-list { display: flex; flex-direction: column; gap: 8px; }

.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--mid-grey);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s;
}

.link-item:hover { background: var(--blue-glow); color: var(--blue); }

.link-icon { width: 16px; height: 16px; opacity: 0.6; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text {
  font-size: 0.7rem;
  color: var(--mid-grey);
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}

.footer-text a { color: var(--blue); text-decoration: none; }
.footer-text span { color: var(--blue); }

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 860px) {
  header, footer { padding-left: 20px; padding-right: 20px; }
  .hero, .project-hero { padding-left: 20px; padding-right: 20px; }
  .layout { grid-template-columns: 1fr; padding: 24px 20px 60px; }
  .sidebar { grid-row: 1; }
}

@media (max-width: 640px) {
  nav { display: none; }
  .hero { padding-top: 60px; }
  .divider { padding-left: 20px; padding-right: 20px; }
  .projects { padding: 0 20px 60px; grid-template-columns: 1fr 1fr; gap: 14px; }
  footer { flex-direction: column; gap: 8px; text-align: center; padding: 20px; }
}
