/* Responsive typography overrides for longer enterprise copy */
:root {
    --fluid-body: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    --fluid-subtitle: clamp(0.98rem, 0.9rem + 0.35vw, 1.15rem);
    --fluid-title: clamp(1.8rem, 1.2rem + 2.2vw, 3.2rem);
    --fluid-card-title: clamp(1.05rem, 0.95rem + 0.6vw, 1.5rem);
}

body,
.text-regular,
p {
    font-size: var(--fluid-body);
}

.section-title .title,
.hero-section h1,
.about-section h2,
.resume-section h2,
.portfolio-section h2,
.blog-section h2,
.testimonial-section h2,
.contact-section h2 {
    font-size: var(--fluid-title) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

.section-title .subtitle,
.hero-section p,
.about-section .subtitle,
.resume-section .subtitle,
.portfolio-section .subtitle,
.blog-section .subtitle,
.testimonial-section .subtitle,
.contact-section .subtitle {
    font-size: var(--fluid-subtitle) !important;
    line-height: 1.75 !important;
    overflow-wrap: anywhere;
}

.card-item h4,
.post-title a,
.article-title,
.experience h4,
.experience h6,
.user-meta-info li span:last-child,
.counters .text-sm {
    overflow-wrap: anywhere;
}

.card-item h4,
.post-title a,
.experience h4 {
    font-size: var(--fluid-card-title) !important;
    line-height: 1.35 !important;
}

/* Prevent role text clipping in the animated headline in sidebar */
.designation,
.designation .cd-words-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    min-height: 2.4em;
}

.designation .cd-words-wrapper b {
    white-space: normal !important;
    text-wrap: balance;
    line-height: 1.35;
}

.minfo__sidebar .designation .cd-words-wrapper {
    overflow: visible !important;
}

.minfo__sidebar .designation .cd-words-wrapper::after {
    display: none !important;
}

.minfo__sidebar .skills_circle {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 0.8rem;
    justify-items: center;
}

.minfo__sidebar .skills_circle > div {
    width: 100%;
}

.minfo__sidebar .skills_circle p {
    font-size: 0.92rem !important;
    line-height: 1.3;
    text-align: center;
}

.minfo__sidebar .skills_circle .circle {
    margin-left: auto;
    margin-right: auto;
}

/* Let long insight titles expand on small screens instead of hard clipping */
@media (max-width: 991.98px) {
    .post-title a.line-clamp-2 {
        -webkit-line-clamp: unset;
        line-clamp: unset;
        display: block;
        overflow: visible;
    }
}

@media (max-width: 767.98px) {
    .hero-section .buttons a,
    .more-blogs a,
    .read-details a,
    .contact-section button {
        font-size: clamp(0.85rem, 0.8rem + 0.4vw, 0.98rem) !important;
    }

    .about-section .section-content .inline-flex a,
    .section-name {
        font-size: clamp(0.72rem, 0.68rem + 0.35vw, 0.85rem) !important;
    }

    .portfolio_wrapper .info,
    .portfolio_wrapper .info span {
        font-size: clamp(1.2rem, 1rem + 1.2vw, 1.8rem) !important;
        line-height: 1.2 !important;
    }
}
