:root {
  --bg:            #f0f2f5;
  --card:          #ffffff;
  --border:        #dadde1;
  --muted:         #65676b;
  --text:          #1c1e21;
  --primary:       #1877f2;
  --primary-hover: #166fe5;
  --primary-light: #e7f0fd;
  --success:       #42b72a;
  --success-light: #e4f5de;
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.07);
  --shadow-md:     0 2px 10px rgba(0,0,0,0.10);
  --shadow-lg:     0 6px 20px rgba(0,0,0,0.13);
  --radius:        8px;
  --radius-lg:     12px;
  --ease:          0.2s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo { height: 36px; }
.topbar-left { display: flex; align-items: center; gap: 12px; }

.search-box { position: relative; display: flex; align-items: center; }
.search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  pointer-events: none;
  color: var(--muted);
}
.search-box input {
  width: 240px;
  padding: 8px 14px 8px 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.profile-short {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease);
}
.profile-short:hover { background: var(--bg); }
.profile-short img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-short span { font-size: 14px; font-weight: 600; }

/* Cover + Profile Card */
.cover-area {
  position: relative;
  height: 240px;
  background: #b0b8c1;
  overflow: visible;
}
.cover-photo {
  width: 100%; height: 240px;
  object-fit: cover;
  display: block;
}

.profile-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -88px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  background: #fff;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  width: calc(100% - 48px);
  max-width: 1152px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.avatar {
  width: 190px;
  height: 190px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.profile-info { flex: 1; padding-bottom: 4px; }
.profile-info h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.subtitle { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.location { font-size: 13px; display: flex; align-items: center; gap: 5px; margin-bottom: 14px; }

.action-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Button */
.btn {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.btn:hover { background: var(--bg); text-decoration: none; }

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn.outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn.outline:hover { background: var(--bg); }

.btn.icon {
  padding: 8px 10px;
  font-size: 16px;
  background: var(--bg);
  border-color: var(--border);
}

/* Layout */
.content-wrap {
  display: grid;
  grid-template-columns: 280px 1fr 290px;
  gap: 20px;
  padding: 108px 24px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--card);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Left Column */
.left-col .card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* About */
.about p {
  font-size: 13.5px;
  line-height: 1.65;
  color: #444;
  margin-bottom: 14px;
}
.meta { list-style: none; font-size: 13px; }
.meta li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f2f5;
  color: #444;
}
.meta li:last-child { border-bottom: none; }
.meta-icon { width: 16px; height: 16px; text-align: center; flex-shrink: 0; font-size: 14px; line-height: 1; }
img.meta-icon { object-fit: contain; vertical-align: middle; }
.btn-icon { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; flex-shrink: 0; }
.meta strong { color: var(--text); }

/* Skills */
.skill-list { display: flex; flex-direction: column; gap: 6px; }
.skill-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease);
}
.skill-badge:hover {
  background: #e4e6ea;
  border-color: var(--border);
}
.skill-name { font-size: 13.5px; font-weight: 500; }
.level {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.level.advanced  { background: var(--success-light); color: #1a7a0a; }
.level.intermediate { background: var(--primary-light); color: #0a4fa0; }

/* Experience */
.experience .card { margin-bottom: 0; }
.exp-item { margin-bottom: 20px; }
.exp-item:last-child { margin-bottom: 0; }
.exp-header { display: flex; gap: 12px; margin-bottom: 8px; }
.exp-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 5px;
}
.exp-dot.current {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-light);
}
.exp-item h4  { font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.exp-item .company { font-size: 13px; color: var(--primary); margin: 0 0 2px; }
.exp-item ul { padding-left: 18px; margin: 0; }
.exp-item ul li { font-size: 12.5px; color: #555; margin-bottom: 3px; line-height: 1.5; }

/* Achievements */
.achievement-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
}
.achievement-item:last-child { border-bottom: none; padding-bottom: 0; }
.achievement-icon { font-size: 22px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.achievement-item strong { font-size: 13.5px; font-weight: 600; display: block; margin-bottom: 2px; }

/* Main Column — Tabs */
.tabs {
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 4px;
  gap: 2px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  transition: all var(--ease);
}
.tab:hover { background: var(--bg); color: var(--text); }
.tab.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Tab fade animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-content { animation: fadeUp 0.22s ease; }

/* Composer */
.composer {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
}
.composer input {
  flex: 1;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--ease), background var(--ease);
}
.composer input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

/* Posts */
.post {
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
.post-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  padding: 14px 16px 0;
}
.mini-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-head strong { font-size: 14px; font-weight: 700; }
.post-body { padding: 0 16px; }
.post-body p { font-size: 14px; line-height: 1.65; padding: 4px 0 10px; }

/* Post image — full width, uniform height, like Facebook */
.post-img-wrap {
  margin: 0 -16px 0;
  line-height: 0;
}
.post-img-wrap a {
  display: block;
  line-height: 0;
}
.post-img-wrap img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity var(--ease);
}
.post-img-wrap a:hover img { opacity: 0.93; }

.post-footer {
  border-top: 1px solid var(--bg);
  padding: 6px 16px 10px;
  margin-top: 10px;
}
.reactions { display: flex; gap: 4px; }
.reactions .btn {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background var(--ease), color var(--ease);
}
.reactions .btn:hover { background: var(--bg); color: var(--text); }
.reactions .like:hover { color: var(--primary); }
.comments { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.comment-item {
  font-size: 13px;
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 18px;
  line-height: 1.4;
}
.comment-item strong { margin-right: 5px; }
.comment-composer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.comment-composer input {
  flex: 1;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
}
.comment-composer input:focus { outline: none; border-color: var(--primary); background: #fff; }

/* About Tab */
.about-tab-content h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.edu-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
}
.edu-item:last-child { border-bottom: none; padding-bottom: 0; }
.edu-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.edu-item strong { font-size: 14px; font-weight: 600; display: block; margin-bottom: 3px; }
.edu-item ul { margin: 6px 0 0; padding-left: 16px; }
.edu-item ul li { font-size: 13px; color: #555; margin-bottom: 2px; }
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* Projects */
.project-card { padding: 16px; }
.project-header { margin-bottom: 10px; }
.project-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tags span {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
}
.project-card p { font-size: 13.5px; color: #555; line-height: 1.6; margin: 10px 0; }
.project-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
  transition: color var(--ease);
}
.project-link:hover { color: var(--primary-hover); text-decoration: underline; }
.project-links { display: flex; gap: 16px; }

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.photo-grid img {
  width: 100%; height: 160px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity var(--ease);
}
.photo-grid img:hover { opacity: 0.9; }

/* Right Column */
.right-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.right-col .skills h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.contact-cta .btn.wfull,
.resume-card  .btn.wfull {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.contact-cta .btn:last-child,
.resume-card  .btn:last-child { margin-bottom: 0; }

.resume-card p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* Stats Card */
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f0f2f5;
}
.stat-item:last-child { border-bottom: none; }
.stat-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

/* Utilities */
.muted   { color: var(--muted); }
.small   { font-size: 12px; }
.hidden  { display: none !important; }

/* Responsive */
@media (max-width: 1100px) {
  .content-wrap {
    grid-template-columns: 260px 1fr 270px;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .content-wrap {
    grid-template-columns: 1fr;
    padding-top: 120px;
  }
  .profile-card {
    flex-wrap: wrap;
    width: calc(100% - 32px);
    bottom: -96px;
  }
  .left-col  { order: 1; }
  .main-col  { order: 2; }
  .right-col { order: 3; }
}

@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
  .search-box input { width: 160px; }
  .profile-short span { display: none; }
  .profile-card {
    flex-direction: column;
    align-items: flex-start;
    bottom: -120px;
  }
  .content-wrap { padding: 130px 12px 32px; }
  .action-row .btn { padding: 7px 12px; font-size: 13px; }
  .photo-grid { grid-template-columns: 1fr; }
  .post-img-wrap img { height: 220px; }
}

/* Contact CTA subtle gradient */
.contact-cta {
  background: linear-gradient(145deg, #fff 50%, var(--primary-light));
}
.contact-cta h4 { color: var(--primary); }

/* Skill badge hover */
.skill-badge {
  transition: background var(--ease), border-color var(--ease);
}
