:root {
  --portfolio-bg: #ffffff;
  --portfolio-bg-alt: #fafafa;
  --portfolio-card: #f5f5f5;
  --portfolio-text: #1a1a1a;
  --portfolio-muted: #666666;
  --portfolio-border: #eaeaea;
  --portfolio-accent: #c21825;
  --portfolio-accent-dark: #8e111b;
  --ramble-red: #d21926;
  --ramble-red-soft: #f04454;
  --ramble-red-glow: rgba(210, 25, 38, 0.36);
}

.portfolio-container {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

body {
  background:
    radial-gradient(circle at 4% 0%, rgba(210, 25, 38, 0.07), rgba(210, 25, 38, 0) 28%),
    radial-gradient(circle at 96% 14%, rgba(210, 25, 38, 0.08), rgba(210, 25, 38, 0) 32%),
    linear-gradient(180deg, #fff7f8 0%, #ffffff 24%, #fff8f9 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: #ffffff;
  border-bottom: 1px solid var(--portfolio-border);
}

.site-header .nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header .brand {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--portfolio-text);
  white-space: nowrap;
}

.site-header .site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header .site-nav a {
  text-decoration: none;
  color: var(--portfolio-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
}

.site-header .site-nav a:hover {
  color: var(--portfolio-text);
}

.site-header .site-nav a.current {
  color: var(--portfolio-text);
  font-weight: 600;
}

.site-header .site-nav a.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 100%;
  height: 2px;
  background: var(--portfolio-accent);
  border-radius: 2px;
}

.site-header .nav-toggle {
  display: none;
  border: 1px solid var(--portfolio-border);
  background: #ffffff;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.site-header .menu-icon {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: #1a1a1a;
  position: relative;
}

.site-header .menu-icon::before,
.site-header .menu-icon::after {
  content: "";
  width: 18px;
  height: 2px;
  position: absolute;
  left: 0;
  background: #1a1a1a;
}

.site-header .menu-icon::before {
  top: -6px;
}

.site-header .menu-icon::after {
  top: 6px;
}

.ramble-nav-anchor {
  position: fixed;
  width: 230px;
  top: calc(var(--header-height, 72px) + 16px);
  right: max(16px, calc((100vw - 1200px) / 2 - 246px));
  z-index: 1000;
}

.ramble-section-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid #f0c5ca;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.09),
    0 0 0 1px rgba(210, 25, 38, 0.08) inset;
}

.ramble-section-nav a {
  text-decoration: none;
  color: var(--portfolio-muted);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.93rem;
  line-height: 1.25;
}

.ramble-section-nav a.is-active {
  background: #fff0f2;
  color: #ac121d;
  font-weight: 600;
}

.ramble-section-nav a:hover {
  color: var(--portfolio-text);
  background: #fff4f5;
}

.portfolio-intro-section {
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 25, 38, 0.11), rgba(210, 25, 38, 0) 38%),
    radial-gradient(circle at 0% 100%, rgba(210, 25, 38, 0.07), rgba(210, 25, 38, 0) 30%),
    var(--portfolio-bg);
  color: var(--portfolio-text);
  border-bottom: 1px solid var(--portfolio-border);
  padding: 68px 0;
}

.portfolio-intro-card {
  max-width: 780px;
}

.portfolio-intro-card h1 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.1;
  font-weight: 700;
}

.portfolio-intro-card .subtitle {
  margin: 10px 0 18px;
  color: var(--portfolio-muted);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.45rem);
  font-weight: 600;
}

.portfolio-intro-card h1,
.portfolio-intro-card .subtitle,
#strategy-overview .portfolio-case-card > h2,
#strategy-overview .longform-prose > h3,
#social-copy .portfolio-case-card > h2,
#social-copy .social-block > h3 {
  color: #8e0f1a;
  text-shadow: 0 0 14px rgba(210, 25, 38, 0.2);
}

.portfolio-intro-card .subtitle {
  font-weight: 700;
}

.portfolio-intro-card p {
  margin: 0 0 16px;
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--portfolio-text);
}

.portfolio-transition {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 8px 0;
  text-align: center;
  background: linear-gradient(180deg, #101935 0%, #0b1020 100%);
  border-top: 1px solid rgba(244, 63, 94, 0.2);
  border-bottom: 1px solid rgba(244, 63, 94, 0.34);
}

.portfolio-outro-transition {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 8px 0;
  text-align: center;
  background: linear-gradient(180deg, #101935 0%, #0b1020 100%);
  border-top: 1px solid rgba(244, 63, 94, 0.2);
  border-bottom: 1px solid rgba(244, 63, 94, 0.34);
}

.portfolio-transition p {
  margin: 0;
  color: #d8e4ff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.portfolio-outro-transition p {
  margin: 0;
  color: #d8e4ff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.portfolio-case-section {
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 25, 38, 0.09), rgba(210, 25, 38, 0) 34%),
    radial-gradient(circle at 0% 100%, rgba(210, 25, 38, 0.06), rgba(210, 25, 38, 0) 34%),
    var(--portfolio-bg);
  color: var(--portfolio-text);
  border-top: 1px solid var(--portfolio-border);
  padding: 72px 0;
}

.portfolio-case-card {
  border: 1px solid #ecd4d8;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 25, 38, 0.08), rgba(210, 25, 38, 0) 34%),
    #ffffff;
  padding: 32px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.portfolio-case-card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 1.3rem + 1.1vw, 2.25rem);
  line-height: 1.2;
}

.longform-prose {
  margin-top: 20px;
  max-width: 780px;
}

.longform-prose h3 {
  margin: 24px 0 10px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.longform-prose p {
  margin: 0 0 14px;
  color: #2b2b2b;
}

.longform-prose strong {
  color: #8e0f1a;
  text-shadow: 0 0 14px rgba(210, 25, 38, 0.2);
}

.longform-prose ol {
  margin: 0;
  padding-left: 22px;
}

.longform-prose li {
  margin-bottom: 14px;
}

.social-intro {
  max-width: 780px;
  margin-top: 18px;
}

.social-intro p {
  margin: 0 0 14px;
}

.social-block {
  margin-top: 26px;
  border: 1px solid #ecd4d8;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 25, 38, 0.07), rgba(210, 25, 38, 0) 30%),
    #ffffff;
  padding: 24px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.social-block h3 {
  margin: 0 0 14px;
  font-size: 1.28rem;
}

.linkedin-frame {
  border: 1px solid #d9dde3;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  max-width: 760px;
  margin-inline: auto;
}

.linkedin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #e7eaf0;
}

.profile-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #dadde3;
  background-image: url("./ramble-assets/ramble-profile-picture.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.profile-text h4 {
  margin: 0;
  font-size: 1rem;
}

.profile-text p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #5a6473;
}

.follow-btn {
  border: 1px solid #0a66c2;
  border-radius: 999px;
  background: #ffffff;
  color: #0a66c2;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.88rem;
}

.linkedin-body {
  padding: 18px 16px;
  max-height: 560px;
  overflow: auto;
}

.linkedin-body p {
  margin: 0 0 14px;
  line-height: 1.62;
}

.linkedin-meta {
  border-top: 1px solid #e7eaf0;
  padding: 12px 16px;
}

.reaction-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.reaction-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e3e7ef;
}

.action-row {
  display: flex;
  gap: 18px;
  color: #5c6676;
  font-size: 0.92rem;
  font-weight: 600;
}

.thread-wrap {
  position: relative;
  padding-left: 16px;
}

.thread-wrap::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 10px;
  bottom: 14px;
  width: 2px;
  background: #d8dce4;
}

.tweet-card {
  position: relative;
  margin-bottom: 14px;
  border: 1px solid #dbe0e7;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.tweet-card:last-child {
  margin-bottom: 0;
}

.tweet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tweet-head .avatar-placeholder {
  width: 34px;
  height: 34px;
}

.tweet-identity {
  line-height: 1.3;
}

.tweet-identity strong {
  font-size: 0.95rem;
}

.tweet-identity span {
  font-size: 0.86rem;
  color: #5f6979;
}

.tweet-body {
  margin: 0;
  color: #1c222d;
  line-height: 1.56;
}

.tweet-metrics {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  color: #6b7381;
  font-size: 0.82rem;
}

.meta-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.meta-col-label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #4f5663;
}

.meta-ad-frame {
  border: 1px solid #dce0e6;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.meta-ad-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.meta-ad-title {
  line-height: 1.25;
}

.meta-ad-title strong {
  display: block;
  font-size: 0.95rem;
}

.meta-ad-title span {
  font-size: 0.8rem;
  color: #5e6674;
}

.meta-ad-body {
  padding: 0 12px 12px;
}

.meta-ad-body p {
  margin: 0 0 12px;
  line-height: 1.52;
  font-size: 0.95rem;
}

.meta-shared-body {
  border-top: 1px solid #ebedf1;
  border-bottom: 1px solid #ebedf1;
  padding: 12px;
  background: #fafbfc;
}

.meta-shared-body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.meta-creative {
  aspect-ratio: 1 / 1;
  background: #f3f6fb;
  display: block;
  border-top: 1px solid #e3e7ed;
  border-bottom: 1px solid #e3e7ed;
  overflow: hidden;
}

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

.meta-ad-footer {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-ad-copy {
  line-height: 1.3;
}

.meta-ad-copy strong {
  display: block;
  font-size: 0.92rem;
}

.meta-ad-copy span {
  font-size: 0.82rem;
  color: #616c7d;
}

.meta-cta {
  border: 1px solid #d6dbe3;
  background: #eef2f8;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #263244;
}

.bottom-nav {
  margin-top: 28px;
  border: 1px solid #ecd4d8;
  border-radius: 12px;
  padding: 24px;
  background:
    radial-gradient(circle at 96% 8%, rgba(210, 25, 38, 0.12), rgba(210, 25, 38, 0) 36%),
    linear-gradient(180deg, #fff9fa 0%, #fff4f6 100%);
}

.project-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.project-links a,
.jump-links a {
  text-decoration: none;
  color: #b31825;
  font-weight: 600;
}

.project-links a:hover,
.jump-links a:hover {
  color: #8e111b;
}

.project-links .spacer {
  flex: 1;
}

.jump-links {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--portfolio-muted);
}

.jump-links a {
  margin-right: 12px;
}

.site-footer {
  border-top: 1px solid var(--portfolio-border);
  background:
    radial-gradient(circle at 0% 0%, rgba(210, 25, 38, 0.08), rgba(210, 25, 38, 0) 26%),
    #ffffff;
  padding: 30px 0 38px;
}

.footer-inner {
  text-align: center;
  color: #7a7a7a;
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 6px 0;
}

.footer-inner a {
  color: #666666;
  text-decoration: none;
}

.footer-inner a:hover {
  color: #1a1a1a;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666666;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-icon:hover {
  color: #1a1a1a;
  transform: translateY(-1px);
}

.footer-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 1200px) {
  .ramble-nav-anchor {
    right: 12px;
  }
}

@media (max-width: 1023px) {
  .ramble-nav-anchor {
    position: sticky;
    top: var(--header-height, 72px);
    width: 100%;
    left: 0;
    right: auto;
    padding: 8px 20px 10px;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--portfolio-border);
  }

  .ramble-section-nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    flex-direction: row;
    border-radius: 10px;
    padding: 10px;
    box-shadow: none;
  }

  .ramble-section-nav a {
    flex: 0 0 auto;
    border: 1px solid transparent;
  }

  .ramble-section-nav a.is-active {
    border-color: #bfdbfe;
  }

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

@media (max-width: 900px) {
  .site-header .nav-toggle {
    display: inline-flex;
  }

  .site-header .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--portfolio-border);
    border-bottom: 1px solid var(--portfolio-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 24px 16px;
  }

  .site-header .site-nav.is-open {
    display: flex;
  }

  .site-header .site-nav a {
    width: 100%;
    padding: 9px 0;
  }

  .site-header .site-nav a.current::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .portfolio-container {
    width: calc(100% - 40px);
  }

  .portfolio-intro-section,
  .portfolio-case-section {
    padding: 60px 0;
  }

  .portfolio-case-card,
  .social-block,
  .bottom-nav {
    padding: 20px;
  }

  .portfolio-transition {
    padding: 14px 0;
  }
}
