/* ============================================
   SECTION SYSTEM - Professional spacing & layout
   ============================================ */
.page-section {
    padding: 5rem 0;
    position: relative;
}

.page-section .container {
    position: relative;
    z-index: 10;
}

/* Reduce padding for better flow */
.page-section + .page-section {
    padding-top: 4rem;
}

.page-section .page-section-heading {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

@media (min-width: 992px) {
    .page-section {
        padding: 6rem 0;
    }

    .page-section + .page-section {
        padding-top: 5rem;
    }

    .page-section .page-section-heading {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

/* ============================================
   DIVIDERS - Modern & visible
   ============================================ */
.divider-custom {
    margin: 1.5rem auto 2.5rem;
    width: 100%;
    max-width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #1a81bc 30%, #1a81bc 70%, transparent);
    border-radius: 2px;
    display: block;
}

.divider-custom.divider-light {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0.8) 70%, transparent);
}

/* ============================================
   HERO / MASTHEAD - Modern & impactful
   ============================================ */
.masthead {
    padding-top: calc(6rem + 74px);
    padding-bottom: 6rem;
    background: linear-gradient(135deg, #1a81bc 0%, #2c3e50 100%);
    position: relative;
}

/* Subtle pattern overlay */
.masthead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.masthead .container {
    position: relative;
    z-index: 1;
}

.masthead .masthead-heading {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.masthead .masthead-subheading {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0.95;
}

@media (min-width: 992px) {
    .masthead {
        padding-top: calc(6rem + 104px);
        padding-bottom: 8rem;
    }

    .masthead .masthead-heading {
        font-size: 3.5rem;
        line-height: 1.1;
    }

    .masthead .masthead-subheading {
        font-size: 1.5rem;
    }
}

.masthead-avatar {
    border-radius: 50%;
    width: 180px;
    height: 180px;
    border: 6px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.masthead-avatar:hover {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .masthead-avatar {
        width: 220px;
        height: 220px;
    }
}

/* ============================================
   CONTENT TEXT - Better readability
   ============================================ */
.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: left;
    color: #495057;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: #2c3e50;
    font-weight: 600;
}

.about-text ul, .about-text ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.about-text li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* White text for dark backgrounds */
.bg-primary .about-text,
.bg-secondary .about-text {
    color: rgba(255,255,255,0.95);
}

.bg-primary .about-text strong,
.bg-secondary .about-text strong {
    color: #fff;
}

/* ============================================
   SKILLS SECTION - Modern card-based layout
   ============================================ */
#skills {
    background: linear-gradient(135deg, #2c3e50 0%, #1a81bc 100%);
    position: relative;
}

#skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

#skills .container {
    position: relative;
    z-index: 1;
}

/* Target all devicon classes */
i[class*="devicon"],
i[class^="devicon"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.95) !important;
    font-size: 3.5rem !important;
    padding: 1.5rem 0.5rem;
    margin: 0;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.15);
    min-height: 130px;
    width: 100%;
}

i[class*="devicon"]:hover,
i[class^="devicon"]:hover {
    color: #ffffff !important;
    transform: translateY(-5px);
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

i[class*="devicon"] span,
i[class^="devicon"] span {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Montserrat', -apple-system, sans-serif;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.95);
}

@media (max-width: 768px) {
    i[class*="devicon"],
    i[class^="devicon"] {
        font-size: 2.5rem !important;
        padding: 1rem 0.5rem;
        min-height: 110px;
    }

    i[class*="devicon"] span,
    i[class^="devicon"] span {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
}

.personal-project {
    height: 100%;
    background-clip: border-box;
    border: 0.125rem solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
    position: relative;
}

.project-description {
    text-align: justify;
    padding-bottom: 0.5rem;
}

.project-technologies {
    position: absolute;
    bottom: 0.5rem;
}

.project-img {
    object-fit: cover;
    height: 17rem;
    border-bottom: 1px solid var(--bs-gray-300);
}

.effect-bubba {
    position: relative;
}

figure.effect-bubba img {
    -webkit-transition: opacity 0.35s;
    transition: opacity 0.35s;
}

figure.effect-bubba:hover img {
    opacity: 0.4;
    filter: blur(1px);
    cursor: pointer;
}

.effect-bubba div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 0;
    background: gray;
    padding: 0.5rem;
    border-radius: 0.25rem;
    color: white;
    transition: visibility 0s, opacity 0.5s linear;
}

.effect-bubba :hover div {
    opacity: 1;
}

/* ============================================
   ACHIEVEMENTS - Premium card design
   ============================================ */
.achievement-item {
    transition: all 0.3s ease;
    border-left: 4px solid #1a81bc;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.achievement-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(26, 129, 188, 0.15) !important;
    border-left-width: 6px;
}

.achievement-icon {
    min-width: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.achievement-icon i {
    background: linear-gradient(135deg, #1a81bc, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievement-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.achievement-description {
    color: #495057;
    line-height: 1.7;
    font-size: 1.05rem;
}

.achievement-description p {
    margin-bottom: 0.75rem;
}

.achievement-description p:last-child {
    margin-bottom: 0;
}

.achievement-description ul {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.achievement-description li {
    margin-bottom: 0.5rem;
}

/* Date badge */
.achievement-item .text-muted {
    font-size: 0.9rem;
    color: #6c757d !important;
    font-weight: 500;
}

/* ============================================
   SECTION BACKGROUNDS - Modern & clean
   ============================================ */
.bg-light {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 50%, #ffffff 100%) !important;
}

.bg-white {
    background: #ffffff !important;
}

section.bg-primary {
    background: linear-gradient(135deg, #1a81bc 0%, #2c3e50 100%);
    position: relative;
}

section.bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

section.bg-primary .container {
    position: relative;
    z-index: 1;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
    .achievement-item {
        padding: 1.25rem !important;
        border-left-width: 3px;
    }

    .achievement-item:hover {
        transform: translateX(4px);
    }

    .achievement-title {
        font-size: 1.2rem;
    }

    .achievement-icon {
        min-width: 45px;
    }

    .achievement-icon i {
        font-size: 1.5rem !important;
    }

    .achievement-description {
        font-size: 1rem;
    }
}