:root {
  /* Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  
  /* Layout */
  --nav-height: 60px;
  --max-width: 480px; /* Mobile width constraint */
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: calc(var(--nav-height) + 20px); /* Space for bottom nav */
}

/* Container for mobile view centering on desktop */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--bg-body);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* --- Profile Header Section --- */
.profile-header-card {
  background-color: var(--bg-card);
  padding-bottom: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.banner-container {
  height: 150px;
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: #000;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.banner-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #1e40af 0%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-direction: column;
  text-align: center;
  position: relative;
}

.banner-placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.2);
}

.banner-title {
  font-family: "Times New Roman", Times, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  z-index: 1;
  background: -webkit-linear-gradient(#fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.feather-icon {
  font-size: 1.5em;
  vertical-align: middle;
  -webkit-text-fill-color: initial; /* Reset gradient for emoji */
  filter: none;
}

.profile-top-row {
  display: flex;
  align-items: flex-end;
  padding: 0 var(--spacing-md);
  margin-top: -50px; /* Overlap banner */
  position: relative;
  z-index: 10;
  margin-bottom: var(--spacing-sm);
}

.avatar-container {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  overflow: hidden;
  flex-shrink: 0;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  z-index: 20;
}

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

.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-container {
  flex-grow: 1;
  display: flex;
  justify-content: space-around;
  padding-bottom: 25px;
  padding-left: var(--spacing-sm);
  padding-right: var(--spacing-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.stat-num {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-info {
  padding: 0 var(--spacing-md);
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: var(--spacing-xs);
}

.profile-location {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  gap: 4px;
  margin-bottom: var(--spacing-md);
}

.action-buttons {
  display: flex;
  gap: var(--spacing-sm);
  padding: 0 var(--spacing-md);
}

.btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 20px; /* Rounded pill shape like screenshot */
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* --- Feed Section --- */
.feed-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.post-card {
  background-color: var(--bg-card);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ddd;
  margin-right: var(--spacing-sm);
  overflow: hidden;
}

.post-meta {
  flex: 1;
}

.post-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-author {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
}

.post-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-read-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
}

.post-snippet {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-image {
  width: 100%;
  height: 200px;
  background-color: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--spacing-md);
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-image-placeholder {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  border-top: 1px solid #f3f4f6;
  padding-top: var(--spacing-sm);
}

.action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.action-item.align-right {
  margin-left: auto;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%; /* Center relative to screen */
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--nav-height);
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  gap: 4px;
  width: 100%;
  height: 100%;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  width: 24px;
  height: 24px;
}

/* Icons */
.icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.icon-md {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Utility */
.text-bold { font-weight: 700; }
