:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --surface: #1c2128;
  --surface-hover: #252c36;
  --text: #e6edf3;
  --muted: #9ba6b2;
  --border: #30363d;
  --accent: #2f81f7;
  --accent-soft: rgba(47, 129, 247, 0.2);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  background: radial-gradient(circle at 5% 15%, #18243b, transparent 30%),
    radial-gradient(circle at 90% 90%, #14253b, transparent 25%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(42px);
  opacity: 0.28;
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 250px;
  height: 250px;
  background: #2f81f7;
  top: 40px;
  right: 40px;
}

.orb-2 {
  width: 170px;
  height: 170px;
  background: #1f6feb;
  bottom: 30px;
  left: 30px;
  animation-delay: 1.4s;
}

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

.container {
  position: relative;
  z-index: 1;
  width: min(1120px, 92vw);
  margin: 36px auto 60px;
  display: grid;
  gap: 24px;
}

.profile-card,
.content-card {
  background: linear-gradient(180deg, rgba(28, 33, 40, 0.95), rgba(22, 27, 34, 0.94));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px;
}

.profile-image {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
}

.profile-meta h1 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.3rem);
  line-height: 1.1;
}

.profile-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.profile-summary {
  margin: 8px 0 14px;
  color: var(--muted);
  max-width: 68ch;
}

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

.social-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(13, 17, 23, 0.55);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.social-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.content-card {
  padding: 22px;
}

.wip-banner {
  border: 1px solid #8b6f2f;
  background: rgba(187, 128, 9, 0.15);
  color: #f3d898;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.tab {
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 10px 14px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(13, 17, 23, 0.5);
}

.tab.active {
  color: var(--text);
  border-color: var(--border);
  background: rgba(13, 17, 23, 0.65);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
}

.card-anchor {
  color: inherit;
  text-decoration: none;
  display: block;
}

.card-anchor .card {
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.card-anchor:hover .card {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.card-image.fit-contain {
  object-fit: contain;
  background: #0d1117;
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.card-date,
.post-date {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.content-tag {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #8b6f2f;
  background: rgba(187, 128, 9, 0.15);
  color: #f3d898;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-description {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--bg-soft);
}

.post-card h1,
.post-card h2,
.post-card h3,
.post-card h4 {
  margin-top: 0;
}

.post-card p,
.post-card ul,
.post-card ol {
  color: var(--muted);
}

.post-card code {
  background: rgba(110, 118, 129, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: #c9d1d9;
}

.post-card pre {
  background: #0b0f14;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  padding: 10px;
}

.post-card a {
  color: var(--accent);
}

.project-page {
  width: min(920px, 92vw);
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.project-detail-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  overflow: hidden;
}

.project-hero {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.project-hero.fit-contain {
  object-fit: contain;
  background: #0d1117;
}

.project-detail-body {
  padding: 18px;
}

.project-detail-title {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
}

.project-meta-item {
  margin: 0 0 8px;
  color: var(--muted);
}

.project-markdown h1,
.project-markdown h2,
.project-markdown h3,
.project-markdown h4 {
  margin-top: 18px;
}

.project-markdown p,
.project-markdown ul,
.project-markdown ol {
  color: var(--muted);
}

.project-markdown a {
  color: var(--accent);
}

@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .container {
    margin: 20px auto 40px;
    width: min(1100px, 94vw);
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-summary {
    margin-inline: auto;
  }

  .social-links {
    justify-content: center;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}
