/* Clean About Section Styles - No Duplication */

/* About Section Container */
.about-section-new {
    width: 80%;
    max-width: 1200px;
    margin: 120px auto 80px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* About Content Grid */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

/* About Text Styling */
.about-text h1 {
    font-size: 50pt;
    margin-bottom: 10px;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid rgba(45, 212, 191, 0.7);
    width: 0;
    animation: typing 2.5s steps(14, end) 0.5s forwards,
               blink 0.75s step-end 0.5s infinite;
}

@keyframes typing {
    to { 
        width: 14ch; /* 14 characters in "Karik Freiheit" */
    }
}

@keyframes blink {
    0%, 100% { 
        border-right-color: rgba(45, 212, 191, 0.7);
    }
    50% { 
        border-right-color: transparent;
    }
}

/* Stop blinking after typing completes */
.about-text h1.typing-complete {
    border-right: none;
    animation: none;
    width: auto;
}

.about-text h3 {
    font-size: 16pt;
    margin-bottom: 25px;
}

.about-description {
    color: white;
    font: var(--sm-font);
    font-size: 12pt;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Link Buttons */
.about-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.about-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font: var(--sm-font);
    font-size: 10pt;
    text-decoration: none;
    color: white;
    opacity: 0.7;
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: var(--border-rad-5);
    transition: all 200ms ease-in-out;
}

.about-link-btn:hover {
    opacity: 1;
    border-color: rgba(100, 116, 139, 0.6);
    background-color: rgba(255, 255, 255, 0.05);
}

.about-link-btn svg {
    opacity: 0.8;
}

/* Profile Image */
.about-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 5px;
}

/* Education Section */
.education-section-new {
    width: 100%;
}

.education-section-new h2 {
    font-size: 20pt;
    margin-bottom: 20px;
}

.education-content {
    width: 100%;
    padding: 20px 0;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.education-school {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 12pt;
    color: white;
    font-weight: 600;
    margin-bottom: 5px;
}

.education-degree {
    font: var(--sm-font);
    font-size: 10pt;
    color: white;
    opacity: 0.9;
    margin-bottom: 3px;
}

.education-minor {
    font: var(--sm-font);
    font-size: 9pt;
    color: white;
    opacity: 0.6;
}

.education-meta {
    text-align: right;
}

.education-year,
.education-gpa {
    font: var(--sm-font);
    font-size: 10pt;
    color: white;
    opacity: 0.6;
    margin-bottom: 3px;
}

.education-coursework {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.coursework-label {
    font: var(--sm-font);
    font-size: 10pt;
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
}

.coursework-list {
    font: var(--sm-font);
    font-size: 9pt;
    color: white;
    opacity: 0.7;
    line-height: 1.6;
}

/* Personal Photos - No Borders, No Filters */
.personal-masonry-wrap-simple {
    position: relative;
    width: 100%;
    min-height: 300px;

}

.personal-photos-title {
    font-size: 18pt;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    color: white;
    margin-bottom: 30px;
    margin-top: 40px;
    opacity: 0.9;
    text-align: left;
}

/* Personal Photos Grid - Equal Sized Images */
.personal-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 30px;
}

.personal-photo-card {
    position: relative;
    width: 100%;
    height: 400px; /* Fixed height for all cards */
    overflow: hidden;
    border-radius: 8px;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.personal-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills container while maintaining aspect ratio */
    object-position: center; /* Centers the image within the container */
    display: block;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms ease-in-out;
    z-index: 1000;
    text-decoration: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: rgba(15, 23, 42, 1);
    border-color: rgba(100, 116, 139, 0.6);
    transform: translateY(-3px);
}

.back-to-top svg {
    color: white;
}

/* Smooth fade-in for sections */
.about-section-new,
.education-section-new,
.experience-section,
.projects-section {
    animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll-based animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 700px) {
    .about-section-new {
        width: 90%;
        margin: 80px auto 50px;
        gap: 40px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        max-width: 250px;
    }

    .about-text h1 {
        font-size: 32pt;
        white-space: normal;
        animation: none;
        width: 100%;
    }

    .about-text h1::after {
        display: none;
    }

    .about-text h3 {
        font-size: 14pt;
    }

    .about-description {
        font-size: 11pt;
    }

    .about-links {
        flex-direction: column;
        width: 100%;
    }

    .about-link-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        min-height: 44px;
    }

    .education-section-new h2 {
        font-size: 18pt;
    }

    .education-header {
        flex-direction: column;
        gap: 10px;
    }

    .education-meta {
        text-align: left;
    }

    .education-school {
        font-size: 11pt;
    }

    .education-degree {
        font-size: 9pt;
    }

    .education-minor,
    .education-year,
    .education-gpa {
        font-size: 8pt;
    }

    .coursework-label {
        font-size: 9pt;
    }

    .coursework-list {
        font-size: 8pt;
    }

    .personal-masonry-wrap-simple {
        min-height: 200px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 968px) {
    .personal-photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .personal-photo-card {
        height: 350px; /* Reduced height for tablet */
    }
}

@media (max-width: 600px) {
    .personal-photos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .personal-photo-card {
        height: 300px; /* Reduced height for mobile */
    }

    .personal-photos-title {
        font-size: 16pt;
        margin-top: 30px;
        margin-bottom: 20px;
    }
}
