/* ============================================
   jagmindersingh.com — Writing Page Styles
   ============================================ */

/* --- Hero --- */
.writing-hero {
  padding: calc(var(--nav-h) + var(--sp-9)) 0 var(--sp-7);
  position: relative;
  overflow: hidden;
}

.writing-hero .container {
  position: relative;
  z-index: 2;
}

.writing-hero__title {
  max-width: 600px;
}

.writing-hero__canvas-wrap {
  position: absolute;
  right: 0;
  top: 0;
  width: 55%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.writing-hero__canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

@media (max-width: 768px) {
  .writing-hero {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .writing-hero__canvas-wrap {
    position: relative;
    width: 100%;
    height: 280px;
    right: auto;
    top: auto;
    margin-top: var(--sp-5);
  }
}

/* --- Featured Articles --- */
.articles__header {
  margin-bottom: var(--sp-8);
}

.articles__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-7) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color 0.4s ease,
              box-shadow 0.4s ease,
              background 0.3s ease,
              transform 0.4s cubic-bezier(0.16,1,0.3,1);
  cursor: pointer;
}

/* Animated gradient background reveal on hover */
.article-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 0% 100%,
    rgba(212,98,42,0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Bottom accent bar */
.article-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4622a, #e6a832);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.article-card:hover {
  border-color: rgba(212,98,42,0.25);
  background: rgba(255,255,255,0.97);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08),
              0 0 0 1px rgba(212,98,42,0.08);
  transform: translateY(-4px);
}

.article-card:hover::before { opacity: 1; }
.article-card:hover::after { transform: scaleX(1); }

.article-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.article-card__tag {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

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

/* Reading time pill */
.article-card__reading-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(212,98,42,0.08);
  padding: 4px 10px;
  border-radius: 100px;
  width: fit-content;
  margin-bottom: var(--sp-2);
  transition: background 0.3s ease;
  position: relative;
  z-index: 1;
}

.article-card:hover .article-card__reading-pill {
  background: rgba(212,98,42,0.14);
}

.article-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
  position: relative;
  z-index: 1;
}

.article-card:hover .article-card__title {
  color: var(--accent);
}

.article-card__excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  position: relative;
  z-index: 1;
}

.article-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.article-card__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.article-card:hover .article-card__link {
  gap: 8px;
}

.article-card__arrow {
  transition: transform 0.2s ease;
}

.article-card:hover .article-card__arrow {
  transform: translate(2px, -2px);
}

/* --- Weekly Perspectives Feed (Dark) --- */
.perspectives-feed__header {
  margin-bottom: var(--sp-8);
}

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

.feed-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: background 0.4s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feed-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4622a, #e6a832);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}

.feed-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(212,98,42,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.feed-item:hover::after { transform: scaleX(1); }

.feed-item__img-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--sp-3);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  cursor: pointer;
}

/* Dark overlay to unify light/dark images on the dark section */
.feed-item__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,14,26,0.15) 0%,
    rgba(10,14,26,0.35) 100%
  );
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.feed-item:hover .feed-item__img-wrap::after {
  opacity: 0.4;
}

.feed-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              filter 0.4s ease;
  filter: brightness(0.85);
}

.feed-item:hover .feed-item__img {
  transform: scale(1.04);
  filter: brightness(1);
}

.feed-item__tag {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4622a;
}

.feed-item__text {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  flex: 1;
  transition: color 0.3s ease;
}

.feed-item:hover .feed-item__text {
  color: rgba(255,255,255,0.7);
}

.feed-item__link {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.25);
  transition: color 0.2s ease;
}

.feed-item:hover .feed-item__link {
  color: #d4622a;
}

/* --- LinkedIn CTA --- */
.linkedin-cta {
  padding: var(--sp-9) 0 var(--sp-10);
}

.linkedin-cta__card {
  background: linear-gradient(135deg, #ffffff 0%, #fdf6f0 40%, #faf0e4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-7);
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Warm radial glow overlay */
.linkedin-cta__card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle,
    rgba(212,98,42,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Bottom accent bar */
.linkedin-cta__card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4622a, #e6a832, #d4622a);
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}

.linkedin-cta__card:hover {
  box-shadow: 0 24px 64px rgba(212,98,42,0.08),
              0 0 0 1px rgba(212,98,42,0.06);
  border-color: rgba(212,98,42,0.18);
}

.linkedin-cta__card:hover::after {
  transform: scaleX(1);
}

/* Photo column */
.linkedin-cta__photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.linkedin-cta__avatar {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.linkedin-cta__photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #d4622a;
  display: block;
  box-shadow: 0 4px 20px rgba(212,98,42,0.15);
}

.linkedin-cta__initials {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4622a, #e6a832);
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
}

.linkedin-cta__badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.625rem;
  color: #d4622a;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Content column */
.linkedin-cta__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.linkedin-cta__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.linkedin-cta__role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.linkedin-cta__headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.linkedin-cta__sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: var(--sp-4);
}

/* Premium CTA button */
.linkedin-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 14px 32px;
  background: linear-gradient(135deg, #d4622a, #c4551f);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 100px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.4s ease;
  box-shadow: 0 4px 16px rgba(212,98,42,0.25),
              0 1px 3px rgba(0,0,0,0.08);
}

.linkedin-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,98,42,0.35),
              0 2px 8px rgba(0,0,0,0.1);
}

.linkedin-cta__btn-text {
  position: relative;
  z-index: 1;
}

.linkedin-cta__btn-arrow {
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
  font-size: 1.1em;
}

.linkedin-cta__btn:hover .linkedin-cta__btn-arrow {
  transform: translateX(4px);
}

/* Shimmer sweep effect */
.linkedin-cta__btn-shimmer {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 50%,
    transparent 100%
  );
  transition: none;
}

.linkedin-cta__btn:hover .linkedin-cta__btn-shimmer {
  animation: shimmerSweep 0.8s ease forwards;
}

@keyframes shimmerSweep {
  from { left: -100%; }
  to { left: 100%; }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .articles__grid {
    grid-template-columns: 1fr;
  }
  .perspectives-feed__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .linkedin-cta__card {
    grid-template-columns: 1fr;
    padding: var(--sp-6);
    gap: var(--sp-5);
    text-align: center;
  }
  .linkedin-cta__photo-col {
    flex-direction: row;
    justify-content: center;
    gap: var(--sp-4);
  }
  .linkedin-cta__content {
    align-items: center;
  }
  .linkedin-cta__sub {
    max-width: 100%;
  }
  .linkedin-cta__btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .perspectives-feed__grid {
    grid-template-columns: 1fr;
  }
}
