/* =====================
   FONTS
===================== */
body {
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

/* =====================
   PROFILE HERO
===================== */

.profile-hero {
  max-width: 900px;
  margin: 80px auto 0;
  padding: 60px 40px 56px;
  position: relative;
}

.profile-hero::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: 56px;
  opacity: 0.4;
}

.profile-hero-inner {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* Avatar */
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Right side */
.profile-right {
  flex: 1;
  min-width: 0;
}

.profile-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.profile-name {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1;
  margin: 0 0 20px;
  color: var(--text);
}

.profile-name em {
  font-style: italic;
  color: var(--accent);
}

.profile-bio {
  font-size: 1rem;
  color: var(--sub);
  line-height: 1.75;
  margin: 0 0 28px;
  max-width: 480px;
}

/* Social links */
.profile-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sub);
  text-decoration: none;
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  transition: all 0.2s ease;
  background: var(--surface);
}

.profile-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* =====================
   POSTS SECTION
===================== */

.posts-section {
  max-width: 900px;
  margin: 0 auto 100px;
  padding: 0 40px;
}

.posts-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
}

.posts-heading {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.5rem;
  margin: 0;
  color: var(--text);
}

.posts-count {
  font-size: 0.8rem;
  color: var(--sub);
  letter-spacing: 0.05em;
}

/* =====================
   CARDS GRID
===================== */

.home-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px var(--shadow);
  border-color: var(--accent);
}

.card-img-wrap {
  overflow: hidden;
  height: 160px;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

/* thumbnail が空のときのプレースホルダー */
.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb-placeholder::after {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border);
  opacity: 0.6;
}

.card-body {
  padding: 18px 20px 20px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
  color: var(--text);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--sub);
  margin: 0 0 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 0.75rem;
  color: var(--sub);
  letter-spacing: 0.03em;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 600px) {
  .profile-hero {
    padding: 48px 24px 40px;
  }

  .profile-hero-inner {
    flex-direction: column;
    gap: 24px;
  }

  .profile-avatar {
    width: 72px;
    height: 72px;
  }

  .posts-section {
    padding: 0 24px;
  }
}

#hero-owner {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 20px;
  line-height: 1;
  margin: 0 0 20px;
  color: var(--text);
}
