/* Argonauta Hub — Deep sea meets starlit navigation */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --base: #0B1120;
  --surface: #111B2E;
  --surface-hover: #182640;
  --border: rgba(201, 169, 110, 0.12);
  --border-hover: rgba(201, 169, 110, 0.3);
  --gold: #C9A96E;
  --gold-dim: rgba(201, 169, 110, 0.6);
  --ocean: #5B8FB9;
  --text: #E8E2D6;
  --text-muted: #8A9BB5;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--base);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* === Starfield background === */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.starfield::before,
.starfield::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  animation: drift 60s linear infinite;
}

.starfield::before {
  width: 2px; height: 2px;
  top: 20%; left: 15%;
  box-shadow:
    80vw 10vh 0 0.5px var(--gold-dim),
    25vw 45vh 0 1px rgba(91, 143, 185, 0.4),
    60vw 70vh 0 0.5px var(--gold-dim),
    10vw 80vh 0 1px rgba(91, 143, 185, 0.3),
    90vw 30vh 0 0.5px var(--gold-dim),
    45vw 15vh 0 1px rgba(201, 169, 110, 0.3),
    70vw 55vh 0 0.5px rgba(91, 143, 185, 0.4),
    30vw 90vh 0 1px var(--gold-dim),
    55vw 35vh 0 0.5px rgba(91, 143, 185, 0.3),
    85vw 75vh 0 1px var(--gold-dim);
  opacity: 0.7;
}

.starfield::after {
  width: 1.5px; height: 1.5px;
  top: 50%; left: 70%;
  box-shadow:
    -50vw 20vh 0 1px rgba(201, 169, 110, 0.25),
    -20vw -30vh 0 0.5px rgba(91, 143, 185, 0.3),
    20vw 40vh 0 1px rgba(201, 169, 110, 0.2),
    -60vw 60vh 0 0.5px rgba(91, 143, 185, 0.25),
    10vw -20vh 0 1px rgba(201, 169, 110, 0.3),
    -35vw -10vh 0 0.5px rgba(91, 143, 185, 0.2);
  opacity: 0.5;
  animation-duration: 90s;
  animation-direction: reverse;
}

@keyframes drift {
  from { transform: translateY(0) translateX(0); }
  to { transform: translateY(-30px) translateX(15px); }
}

/* === Layout === */
.hub {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

/* === Header === */
.hub-header {
  text-align: center;
  margin-bottom: 5rem;
}

.hub-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(201, 169, 110, 0.2));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hub-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hub-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* === Project grid === */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* === Project card === */
.project {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.8rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, var(--gold)), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.project:hover,
.project:focus-visible {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(201, 169, 110, 0.08);
}

.project:hover::before,
.project:focus-visible::before {
  opacity: 1;
}

.project-icon {
  font-size: 1.6rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(201, 169, 110, 0.08);
  margin-bottom: 0.25rem;
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, var(--gold));
  opacity: 0.7;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Accent per project */
.project[data-accent="gold"] { --accent: #C9A96E; }
.project[data-accent="ocean"] { --accent: #5B8FB9; }
.project[data-accent="coral"] { --accent: #E07A5F; }
.project[data-accent="sage"] { --accent: #7FB685; }
.project[data-accent="violet"] { --accent: #9B8EC4; }
.project[data-accent="rose"] { --accent: #C97B84; }
.project[data-accent="amber"] { --accent: #D4A03C; }
.project[data-accent="teal"] { --accent: #4ECDC4; }

/* === Footer === */
.hub-footer {
  text-align: center;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hub-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* === Responsive === */
@media (max-width: 680px) {
  .hub {
    padding: 3rem 1.25rem 4rem;
  }
  .hub-header {
    margin-bottom: 3.5rem;
  }
  .projects {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .project {
    padding: 1.5rem 1.4rem;
  }
}

/* === Focus visible === */
.project:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .hub-logo { animation: none; }
  .starfield::before, .starfield::after { animation: none; }
  .project { transition-duration: 0.1s; }
}
