#home {
    position: relative;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

#home::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 215, 0, 0.3);
}

.section {
    position: relative;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding: 120px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 215, 0, 0.3);
}

#about {
    padding-top: 140px;
}

.section-content {
    width: min(1120px, 100%);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.section-content > h2,
.about-text h2 {
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1;
    margin: 0 0 2.5rem;
    text-align: center;
}

.section-content > h2::after,
.about-text h2::after {
    content: '';
    display: block;
    width: 72px;
    height: 3px;
    margin: 1rem auto 0;
    border-radius: 999px;
    background: #FFD700;
}

.about-container {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
}

.about-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 360px;
    margin-top: 1.25rem;
    margin-bottom: 2rem;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 68%;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.24);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 30px 90px rgba(255, 215, 0, 0.12);
}

.about-text {
    flex: 1;
    text-align: left;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 2rem;
}

.about-text h2::after {
    margin-left: 0;
}

.about-text p {
    color: rgba(255, 255, 255, 0.74);
    font-size: 1.02rem;
    line-height: 1.8;
    margin: 0 0 1rem;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skills-section,
.education-section,
.certificates-section {
    min-height: auto;
}

/* Skip layout/paint for off-screen sections until they enter the viewport */
#skills,
#education,
#projects,
#certificates {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px; /* estimated height fallback for scrollbar accuracy */
}

.education-grid,
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.education-card,
.skill-card {
    min-height: 190px;
    padding: 1.35rem;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.045);
    border: 1px solid rgba(255, 215, 0, 0.14);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    content-visibility: auto;
    contain-intrinsic-size: 240px 190px;
}

.education-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.education-logo {
    width: 76px;
    height: auto;
    flex: 0 0 auto;
    padding: 0.45rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.education-card:hover,
.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.36);
    box-shadow: 0 30px 90px rgba(255, 215, 0, 0.1);
}

.education-card h3,
.skill-card h3 {
    margin: 0 0 1rem;
    color: #FFD700;
    font-size: 1.1rem;
    line-height: 1.25;
}

.education-card__header h3 {
    margin: 0;
}

.education-card p {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

.education-meta {
    color: #FFD700;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.skill-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.22);
    font-size: 0.8rem;
    font-weight: 700;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.certificate-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.045);
    border: 1px solid rgba(255, 215, 0, 0.14);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    content-visibility: auto;
    contain-intrinsic-size: 300px 400px;
}

.certificate-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.36);
    box-shadow: 0 30px 90px rgba(255, 215, 0, 0.1);
}

.certificate-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    padding: 0.75rem;
    background: #050505;
    border-bottom: 1px solid rgba(255, 215, 0, 0.16);
}

.certificate-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.certificate-content {
    padding: 1.25rem;
}

.certificate-label {
    margin: 0 0 0.6rem;
    color: #FFD700;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.certificate-card h3 {
    margin: 0 0 0.85rem;
    color: #ffd700;
    font-size: 1.2rem;
    line-height: 1.25;
}

.certificate-card p:last-child {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}
