﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  scroll-behavior: smooth;
}

:root {
  --bg: #f8f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f5fb;
  --text: #111827;
  --muted: #5b6774;
  --accent: #fb923c;
  --accent-dark: #ef476f;
  --border: #e5e7eb;
  --radius: 28px;
  --shadow: 0 24px 65px rgba(22, 28, 52, 0.08);
  --transition: 0.28s ease;
}

html {
  background: #eef0f6;
}

body {
  min-height: 100vh;
  background: linear-gradient(145deg, #fdf8fc, #f5f5f7);
  color: var(--text);
}

body.dark {
  background: linear-gradient(145deg, #111827, #1f2937);
  color: #f8fafc;
}

body.dark .top-bar,
body.dark .profile-card,
body.dark .post-card,
body.dark .project-timeline,
body.dark .about-card,
body.dark .skills-card,
body.dark .contact-card,
body.dark .modal-content {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

body.dark .top-actions button,
body.dark .follow-button,
body.dark .timeline-item.active,
body.dark .like-button,
body.dark .contact-card button {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

body.dark .profile-handle,
body.dark .profile-bio,
body.dark .story p,
body.dark .timeline-item,
body.dark .skill-pill,
body.dark .modal-meta a,
body.dark .contact-card input,
body.dark .contact-card textarea,
body.dark .result-message {
  color: #d1d5db;
}

.instagram-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 32px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  position: relative;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.top-actions button,
.follow-button,
.contact-card button,
.modal-close {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.top-actions button,
.follow-button {
  padding: 10px 18px;
  background: #fafafa;
  color: var(--text);
  border: 1px solid #d1d5db;
  font-weight: 700;
}

.top-actions button:hover,
.follow-button:hover,
.contact-card button:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.back-btn {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: #ffffff;
  color: var(--text);
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.back-btn:hover {
  transform: translateY(-50%) scale(1.05);
}

.profile-card,
.about-card,
.skills-card,
.contact-card,
.post-card,
.project-timeline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-top: 24px;
}

.profile-photo img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fb923c;
}

.profile-header h1 {
  font-size: clamp(2rem, 2.8vw, 3rem);
  margin-bottom: 10px;
}

.profile-handle {
  display: inline-flex;
  color: #6b7280;
  font-weight: 600;
}

.profile-bio {
  margin: 18px 0 0;
  line-height: 1.85;
  color: #374151;
  max-width: 640px;
}

.profile-stats {
  display: flex;
  gap: 22px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.profile-stats div {
  min-width: 90px;
  text-align: center;
}

.profile-stats strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.story-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 24px 0 0;
  margin-top: 20px;
  scrollbar-width: thin;
}

/* make stories snap and feel tactile */
.story-row {
  scroll-snap-type: x proximity;
}

.story { scroll-snap-align: start; }

/* prominent follow button */
.follow-button {
  padding: 10px 18px;
  background: var(--accent-dark);
  color: #fff;
  border: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 28px rgba(239,71,111,0.12);
  border-radius: 999px;
}

.follow-button.pulse { animation: pulseAnim 650ms ease; }

@keyframes pulseAnim { 0%{ transform: scale(1); } 50%{ transform: scale(1.06); } 100%{ transform: scale(1); } }

.story {
  min-width: 110px;
  text-align: center;
  cursor: pointer;
}

.story img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid #fbbf24;
  object-fit: cover;
}

/* Focus styles for accessibility */
button:focus-visible,
.story:focus-visible,
.timeline-item:focus-visible,
.post-card:focus-visible,
.follow-button:focus-visible {
  outline: 3px solid rgba(59,130,246,0.18);
  outline-offset: 3px;
  box-shadow: 0 6px 24px rgba(59,130,246,0.08);
}

.story p {
  margin-top: 10px;
  font-weight: 700;
}

.story.active img {
  border-color: var(--accent-dark);
}

.feed-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 28px;
}

/* Right column: project timeline panel tweaks */
.project-timeline {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-timeline .section-heading { margin: 0 0 6px 0; }

.timeline-items {
  background: var(--surface-soft);
  padding: 12px;
  border-radius: 14px;
}

.project-list {
  display: grid;
  gap: 20px;
}

.post-card {
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.post-card:hover,
.post-card.active {
  transform: translateY(-4px);
  border-color: var(--accent-dark);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

.post-header {
  padding: 22px;
}

.post-header h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.post-header p {
  color: var(--muted);
  line-height: 1.65;
}

.post-image {
  min-height: 220px;
  display: grid;
  align-items: flex-end;
  padding: 22px;
  color: #fff;
  position: relative;
}

.post-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(7, 11, 29, 0.85) 90%);
}

.post-image span {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 1.05rem;
}

.post-image button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
}

.project-1 {
  background: linear-gradient(180deg, rgba(239, 71, 111, 0.84), rgba(254, 202, 202, 0.3)), url('flower.jpg') no-repeat center / cover;
}

.project-2 {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.88), rgba(191, 219, 254, 0.35)), url('sd.jpg') no-repeat center / cover;
}

.project-3 {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.9), rgba(209, 250, 229, 0.35)), url('skills.jpg') no-repeat center / cover;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.timeline-items {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.timeline-item.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.timeline-content {
  padding: 14px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(17,17,17,0.03);
}

.timeline-content h3 {
  margin-bottom: 12px;
}

.timeline-content ul {
  list-style: disc outside;
  color: var(--muted);
  line-height: 1.8;
  margin: 8px 0 0 0;
  padding-left: 1.1rem;
}

.about-card,
.skills-card,
.contact-card {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--border);
}

.about-card h2,
.skills-card h2,
.contact-card h2 {
  margin-bottom: 14px;
}

.skill-badges,
.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: #f8f7fb;
  color: var(--text);
  font-weight: 700;
}

.contact-card form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.contact-card input,
.contact-card textarea {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #f8f7fb;
  padding: 16px 18px;
  color: inherit;
  font: inherit;
}

.contact-card textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-card button {
  padding: 16px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 20px;
}

.contact-card button:hover {
  background: var(--accent-dark);
}

.result-message {
  margin-top: 14px;
  font-weight: 700;
}

.receipt {
  margin-top: 20px;
  padding: 18px;
  border-radius: 20px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.75);
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: min(560px, 100%);
  padding: 30px;
  border-radius: 32px;
  background: var(--surface);
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  background: #f8f7fb;
  color: var(--text);
  display: grid;
  place-items: center;
}

.modal-meta {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-meta span,
.modal-meta a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 20px;
  background: #f8f7fb;
  color: var(--text);
}

.modal-meta a {
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 980px) {
  .profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-photo {
    margin: 0 auto;
  }

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

@media (max-width: 720px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .back-btn {
    left: 12px;
  }

  .story-row {
    padding-top: 18px;
  }
}
