/* ================================================
   FAST-CV  ·  Black & White Project Links
   ================================================ */

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

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-hover: #161616;
  --border: #1e1e1e;
  --border-hover: #333333;
  --text-primary: #f0f0f0;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent: #ffffff;
  --ongoing: #d4d4d4;
  --ongoing-bg: rgba(255, 255, 255, 0.06);
  --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

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

/* --- Container --- */
.container {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s var(--transition-smooth) both;
}

.header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: all var(--transition-fast);
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.social-link:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

/* --- Section headers --- */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
  animation: fadeUp 0.5s var(--transition-smooth) both;
}

.section-header:first-child {
  margin-top: 0;
}

.section-header h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Projects grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

/* --- Project card --- */
.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  min-height: 160px;
  animation: fadeUp 0.5s var(--transition-smooth) both;
  cursor: default;
}

/* stagger delays applied via JS */

/* hover state */
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.project-card:active {
  transform: translateY(-1px) scale(0.99);
}

/* --- Card top row: title + badges --- */
.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.35;
  transition: color var(--transition-fast);
  flex: 1;
}

.project-card:hover .project-title {
  color: var(--accent);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-ongoing {
  background: var(--ongoing-bg);
  color: var(--ongoing);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-date {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.35);
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
}

/* --- Notice --- */
.project-notice {
  font-size: 0.725rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-left: 2px solid;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* --- Description --- */
.project-desc {
  font-size: 0.775rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* --- Card footer: links --- */
.project-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.675rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.project-link:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
}

.project-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.no-links {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Footer --- */
.footer {
  margin-top: auto;
  padding-top: 2.5rem;
  padding-bottom: 1rem;
  text-align: center;
  animation: fadeUp 0.6s 0.5s var(--transition-smooth) both;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* --- Loading state --- */
.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  grid-column: 1 / -1;
}

.loading-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  margin: 0 2px;
  animation: loadPulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 520px) {
  .container {
    padding: 2rem 1rem 1.5rem;
  }
  .header h1 {
    font-size: 1.5rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    min-height: auto;
  }
}

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

/* --- Selection --- */
::selection {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
