/* Banner metni için daktilo efekti */
.typewriter-container {
    display: inline-block;
}

.typewriter-container span {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .05em;
    width: 0; /* Animasyon başlangıcında genişlik 0 */
    border-right: .15em solid transparent; /* İmleç için yer tutucu */
}

/* Animate sınıfı eklendiğinde animasyonu başlat */
.typewriter-container span.animate {
    /* 6s / 0.75s = 8. Yanıp sönme 8 kez tekrar edecek ve duracak. */
    animation: typing 6s steps(69, end) forwards,
               blink-caret .75s step-end 8;
}

/* Yazma animasyonu */
@keyframes typing {
    from { 
        width: 0;
    }
    to { 
        width: 100%;
    }
}

/* İmleç yanıp sönme animasyonu */
@keyframes blink-caret {
    from, to { 
        border-color: transparent;
    }
    50% { 
        border-color: #25ca7f; 
    }
}

/* Ana sayfa Bursaspor arması */
.pt-home .bursaspor-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 154px;
    height: 154px;
    margin: 0 auto 26px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(8, 28, 20, .55);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .35),
                inset 0 0 25px rgba(37, 202, 127, .12);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    animation: emblem-enter .8s ease-out both;
}

.pt-home .bursaspor-emblem img {
    display: block;
    width: auto;
    height: 124px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, .35));
}

@keyframes emblem-enter {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 575px) {
    .pt-home .bursaspor-emblem {
        width: 118px;
        height: 118px;
        margin-bottom: 20px;
        padding: 11px;
    }

    .pt-home .bursaspor-emblem img {
        height: 94px;
    }
}

/* Mobil görünüm iyileştirmeleri */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/* Sol menü logo grubu */
.header-main .logo {
    padding-top: 20px;
}

.header-main .logo a {
    display: block;
}

.header-main .logo .menu-logo-mark {
    display: block;
    width: calc(100% - 8px);
    max-width: 137px;
    aspect-ratio: 137 / 135;
    margin: 0 auto;
    object-fit: contain;
}

.header-main .logo .bursaspor-menu-logo {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.header-main .logo .bursaspor-menu-logo .menu-logo-mark {
    transform: scale(.86);
}

/* Sol menü müzik kartı */
.music-player {
    width: 100%;
}

.music-bg {
    position: relative;
    left: auto;
    bottom: auto;
    display: grid;
    grid-template-columns: 38px 1fr;
    grid-template-areas:
        "control bars"
        "copy copy";
    align-items: center;
    gap: 8px;
    width: calc(100% - 20px);
    min-height: 104px;
    margin: 18px 10px 12px;
    padding: 13px 10px 11px;
    color: #fff;
    border: 1px solid rgba(37, 202, 127, .28);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(37, 202, 127, .16), rgba(7, 7, 8, .86));
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .06);
    text-align: left;
    visibility: visible;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.music-bg:before {
    content: '';
    position: absolute;
    width: 64px;
    height: 64px;
    top: -32px;
    right: -28px;
    border-radius: 50%;
    background: rgba(37, 202, 127, .13);
    pointer-events: none;
}

.music-bg:hover,
.music-bg:focus-visible {
    color: #fff;
    border-color: rgba(37, 202, 127, .72);
    background: linear-gradient(145deg, rgba(37, 202, 127, .24), rgba(7, 7, 8, .9));
    box-shadow: 0 14px 34px rgba(0, 0, 0, .34), 0 0 0 3px rgba(37, 202, 127, .08);
    outline: none;
    transform: translateY(-2px);
}

.music-control {
    grid-area: control;
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25ca7f;
    box-shadow: 0 7px 16px rgba(37, 202, 127, .24);
    font-size: 13px;
}

.music-control .play-icon {
    margin-left: 2px;
}

.music-control .pause-icon,
.status-pause {
    display: none;
}

.audio-on .music-control .play-icon,
.audio-on .status-play {
    display: none;
}

.audio-on .music-control .pause-icon,
.audio-on .status-pause {
    display: inline-block;
}

.music-bg .lines {
    grid-area: bars;
    width: 100%;
    height: 30px;
    margin: 0;
    gap: 3px;
    align-items: center;
}

.music-bg .lines span {
    flex: 1;
    width: auto;
    max-width: 5px;
    height: 4px;
    margin: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .48);
}

.audio-on .music-bg .lines span {
    background: #25ca7f;
}

.music-copy {
    grid-area: copy;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding-top: 3px;
}

.music-copy strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    text-overflow: ellipsis;
}

.music-copy small {
    color: rgba(255, 255, 255, .58);
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.audio-on .music-copy small {
    color: #25ca7f;
}

@media screen and (min-height: 710px) {
    .music-bg {
        position: absolute;
        left: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
        margin: 0;
    }
}

@media screen and (max-width: 768px) {
    .music-bg {
        grid-template-columns: 34px 1fr;
        min-height: 96px;
        padding: 11px 8px 9px;
        border-radius: 14px;
    }

    .music-control {
        width: 34px;
        height: 34px;
    }
}

@media screen and (max-width: 768px) {
    .header-mobile {
        height: calc(56px + env(safe-area-inset-top));
        padding-top: env(safe-area-inset-top);
        background: rgba(7, 7, 8, .94);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .header-mobile h2 {
        top: env(safe-area-inset-top);
        max-width: calc(100% - 120px);
        overflow: hidden;
        font-size: clamp(18px, 5vw, 22px);
        line-height: 56px;
        text-overflow: ellipsis;
    }

    .header-mobile .header-toggle {
        position: relative;
        z-index: 2;
        width: 56px;
        min-height: 56px;
        line-height: 56px;
    }

    .header-main {
        width: min(92px, 28vw);
        height: 100vh;
        height: 100dvh;
        box-shadow: 12px 0 32px rgba(0, 0, 0, .45);
    }

    .pt-home {
        height: 100vh;
        height: 100dvh;
        min-height: 100svh;
        background-position: 58% center;
    }

    .pt-home .banner {
        left: 24px !important;
        width: calc(100% - 48px);
        top: calc(50% + 18px);
    }

    .pt-home .banner p {
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
        padding: 0;
        font-size: clamp(16px, 4.4vw, 20px);
        line-height: 1.55;
    }

    .typewriter-container,
    .typewriter-container span {
        display: block;
        width: 100% !important;
        max-width: 100%;
    }

    .typewriter-container span,
    .typewriter-container span.animate {
        overflow: visible;
        white-space: normal;
        border-right: 0;
        animation: mobile-copy-enter .7s .2s ease-out both;
    }

    .page section.container {
        width: 100%;
        padding-right: 24px;
        padding-left: 24px;
    }

    .page .mob-mt {
        margin-top: 92px !important;
    }

    .page .mt-100 {
        margin-top: 60px !important;
    }

    .page .box-1,
    .page .box-2 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .pt-about .info p {
        font-size: 15px;
        line-height: 1.7;
    }

    .pt-about .info-icon {
        min-height: 76px;
        padding-top: 26px;
    }

    .pt-resume .experience .item {
        padding-left: 30px;
    }

    .pt-resume .experience .main h4 {
        line-height: 1.35;
    }

    .pt-resume .experience .main h4:before {
        left: -36px;
    }

    .pt-resume .skill-item {
        padding-right: 0;
        padding-left: 0;
    }

    .pt-portfolio .portfolio-filter ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 8px;
    }

    .pt-portfolio .portfolio-filter ul:before,
    .pt-portfolio .portfolio-filter ul:after {
        display: none;
    }

    .pt-portfolio .portfolio-filter ul li {
        flex: 1 1 auto;
        min-width: 82px;
        padding: 10px 12px;
    }

    .pt-portfolio .portfolio-items .item,
    .pt-blog .blog-item {
        margin-bottom: 24px;
    }

    .contact-form input,
    .contact-form textarea {
        max-width: 100%;
    }
}

@keyframes mobile-copy-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 575px) {
    .header-mobile h2 {
        font-size: 18px;
        letter-spacing: .02em;
    }

    .pt-home .banner {
        left: 16px !important;
        width: calc(100% - 32px);
    }

    .pt-home .bursaspor-emblem {
        width: 108px;
        height: 108px;
        margin-bottom: 18px;
        padding: 10px;
    }

    .pt-home .bursaspor-emblem img {
        height: 86px;
    }

    .pt-home .social {
        width: auto;
        height: 40px;
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    .pt-home .social ul {
        display: flex;
        margin: 0;
    }

    .pt-home .lang {
        bottom: max(20px, calc(env(safe-area-inset-bottom) + 10px));
    }

    .page section.container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .page .mob-mt {
        margin-top: 84px !important;
    }

    .page .mt-100 {
        margin-top: 48px !important;
    }

    .page .header-page h2 {
        font-size: 28px;
    }

    .page .box-1,
    .page .box-2,
    .page .box {
        padding: 18px;
    }

    .pt-about .info .photo img {
        width: min(160px, 65%);
    }

    .pt-about .info-icon {
        min-height: 70px;
        padding-top: 20px;
    }

    .pt-resume .skills {
        padding: 20px 16px;
    }

    .pt-contact .contact-info {
        margin-top: 60px;
    }
}

@media screen and (max-width: 768px) and (max-height: 650px) {
    .pt-home .banner {
        top: calc(50% + 22px);
    }

    .pt-home .bursaspor-emblem {
        width: 86px;
        height: 86px;
        margin-bottom: 12px;
        padding: 8px;
    }

    .pt-home .bursaspor-emblem img {
        height: 68px;
    }

    .pt-home .banner p {
        font-size: 15px;
        line-height: 1.4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pt-home .bursaspor-emblem,
    .typewriter-container span.animate {
        animation: none;
    }
}
