:root{
    --bg-page: #101214;
    --bg-header: #212428;
    --bg-main: #1e2020;
    --bg-footer: #212428;
    --text: #ffffff;
    --text-soft: #8a8b8c;
    --accent: #4b85d0;
    --accent-2: #54d04b;
    --panel: rgba(255,255,255,.04);
    --border: rgba(75,133,208,.35);
    --shadow: 0 4px 6px rgba(0,0,0,.10);
    --max-width: 1320px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    min-width:320px;
    min-height:100vh;
    font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
    background:#0f1113;
    color:#e8eef7;
}

a{color:inherit}
img{display:block;max-width:100%}
.page-shell{min-height:100vh;display:flex;flex-direction:column}

/* ========== HEADER ========== */
.header-container{
    background:var(--bg-header);
    box-shadow:var(--shadow);
    color:var(--text);
    padding:10px 25px;
    min-height:70px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
    position:sticky;
    top:0;
    z-index:50;
}

.site-identity{
    line-height:1.1;
    font-size:14px;
    color:#fff;
}
.site-identity p{margin:0}
.profile-name a{
    font-size:clamp(18px,2vw,24px);
    text-transform:uppercase;
    text-decoration:none;
    color:var(--accent);
    font-weight:700;
    letter-spacing:.02em;
}
.profile-name a:hover{
    transform:skew(-10deg);
    transition:transform .25s ease,color .25s ease;
    color:var(--accent-2);
}
.site-identity > p:last-child{opacity:.85;margin-top:2px}

.header-nav-wrap{overflow:auto hidden}
.nav-links{
    list-style:none;
    display:flex;
    gap:6px;
    margin:0;
    padding:0;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.nav-links li{display:inline-block;text-transform:uppercase}
.nav-links a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    text-decoration:none;
    font-size:15px;
    padding:11px 18px;
    border:1px solid transparent;
    border-radius:8px;
    transition:color .25s ease, border-color .25s ease, background-color .25s ease, transform .25s ease;
    cursor:pointer;
}
.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active{
    color:var(--accent);
    font-weight:700;
    border-color:var(--accent);
    background:rgba(75,133,208,.08);
    transform:translateY(-1px);
    outline:none;
}

/* ========== INTRO ========== */
.main-slider{
    background:#262626;
    flex:1;
    padding:0 6%;
}
.ascendoor-wrapper{
    width:100%;
    max-width:var(--max-width);
    margin:0 auto;
    padding:0;
}
.banner-content{
    position:relative;
    z-index:1;
    min-height:calc(100vh - 63px - 140px);
    display:flex;
    align-items:center;
    gap:50px;
    padding:0;
}
.pure-portfolio-banner-slider-detail-inside{
    flex:1 1 60%;
    max-width:760px;
}
.slider-head-title{
    margin:10px 0;
    color:#fff;
    font-family:inherit;
    font-size:clamp(40px,6vw,96px);
    line-height:1.1;
    font-weight:900;
}
.hello-txt{display:inline-block}
.pure-portfolio-banner-head-title{
    font-size:clamp(28px,3vw,48px);
    color:#2793dd;
    min-height:1.3em;
    margin:10px 0 18px;
}
.typed-target{
    display:inline-block;
    min-height:1.3em;
    white-space:nowrap;
}
.typed-target::after{
    content:"";
    display:inline-block;
    width:2px;
    height:1em;
    margin-left:8px;
    background:currentColor;
    vertical-align:-2px;
    animation:cursorBlink 1s steps(1,end) infinite;
}
@keyframes cursorBlink{
    50%{opacity:0}
}
.intro-paragraph{
    color:#fff;
    font-size:16px;
    line-height:1.8;
    max-width:760px;
    margin:0 0 22px;
    opacity:.95;
}
.social-icons-part{margin-top:10px}
.teams-social{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
}
.social-link{
    width:46px;
    height:46px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(75,133,208,.55);
    border-radius:12px;
    background:rgba(255,255,255,.02);
    color:#fff;
    transition:transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    text-decoration:none;
}
.social-link svg{
    width:22px;
    height:22px;
    fill:currentColor;
}
.social-link:hover{
    transform:translateY(-3px) scale(1.03);
    background:rgba(75,133,208,.10);
    border-color:var(--accent);
    box-shadow:0 10px 25px rgba(0,0,0,.22);
}
.slider-img{
    flex:0 0 36%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.slider-img img{
    width:100%;
    height:auto;
    object-fit:cover;
}

/* ========== FOOTER ========== */
.footer-container{
    background:var(--bg-footer);
    box-shadow:var(--shadow);
    color:#fff;
    padding:28px 20px 34px;
}
.footer-content{
    max-width:var(--max-width);
    margin:0 auto;
    text-align:center;
}
.footer-links{
    list-style:none;
    display:flex;
    gap:16px 28px;
    justify-content:center;
    flex-wrap:wrap;
    margin:0;
    padding:0;
}
.footer-links a{
    color:var(--text-soft);
    text-decoration:none;
    font-size:14px;
    line-height:1.6;
    padding:8px 12px;
    border-radius:8px;
    border:1px solid transparent;
    transition:color .2s ease, border-color .2s ease, background-color .2s ease;
}
.footer-links a:hover{
    color:var(--accent);
    border-color:var(--accent);
    background:rgba(75,133,208,.08);
}
.footer-description{
    display:block;
    margin-top:18px;
    font-size:13px;
    color:var(--text-soft);
}

/* ========== SECTION ANCHORS ========== */
.section-anchor{
    position:relative;
    top:-80px;
    display:block;
    height:0;
    visibility:hidden;
}

/* ========== SKILLS ========== */
.skills-container{
    background: #0b0c0f;
    padding: 64px 82px;
}
.skills-header{
    margin-bottom:40px;
    text-align:center;
}
.skills-title{
    font-size: clamp(32px, 4vw, 44px);
    margin: 0 0 14px;
    color: #fff;
}
.skills-copy{
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-soft);
    line-height: 1.8;
    font-size:16px;
}
.skills-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.skill-card{
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    padding: 24px;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.skill-card:hover{
    transform: translateY(-4px);
    border-color: rgba(75,133,208,.45);
    box-shadow: 0 20px 45px rgba(0,0,0,.18);
}
.skill-card-top{
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.skill-icon{
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(75,133,208,.12);
    color: var(--accent);
    flex-shrink: 0;
}
.skill-icon svg{
    width: 26px;
    height: 26px;
    fill: currentColor;
}
.skill-name{
    font-size: 16px;
    margin: 0 0 6px;
    color: #fff;
}
.skill-level{
    display: inline-block;
    color: var(--text-soft);
    font-size: 13px;
}
.skill-description{
    color: var(--text-soft);
    line-height: 1.75;
    margin: 0 0 18px;
    font-size:14px;
}
.skill-progress{
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}
.skill-progress-fill{
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ========== PROJECTS / CAROUSEL ========== */
.projects-container{
    padding: 40px 0 18px;
    background: #131518;
    position: relative;
    overflow: hidden;
}
.projects-carousel{
    width:100%;
    overflow:hidden;
}
.section-heading{
    display: flex;
    padding: 0 80px;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    text-align:center;
    align-items:center;
}
.section-heading h2{
    font-size: clamp(32px, 4vw, 44px);
    margin: 0 0 12px;
    color: #fff;
}
.projects-copy{
    max-width: 680px;
    color: var(--text-soft);
    line-height: 1.8;
    margin:0 auto;
}

/* Carousel stage — track + side buttons in one row */
.carousel-stage{
    display:flex;
    align-items:center;
    gap:0;
    position:relative;
}

/* Side arrow buttons */
.carousel-button{
    flex:0 0 auto;
    width:44px;
    height:44px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:50%;
    background:rgba(255,255,255,.07);
    color:#fff;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:background .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    z-index:10;
    position:relative;
}
.carousel-button svg{
    width:20px;
    height:20px;
    display:block;
    flex-shrink:0;
}
.carousel-button:hover{
    background:rgba(75,133,208,.28);
    border-color:var(--accent);
    box-shadow:0 0 18px rgba(75,133,208,.35);
    transform:scale(1.08);
}
.carousel-button:disabled{
    opacity:.3;
    cursor:default;
}

/* Track */
.project-track-wrap{
    flex:1 1 0;
    overflow:hidden;
    padding:58px 0 64px;
    perspective:1600px;
    cursor:grab;
}
.project-track-wrap:active{cursor:grabbing}
.project-track{
    display:flex;
    gap:0px;
    will-change:transform;
    transform-style:preserve-3d;
    touch-action:pan-y;
    user-select:none;
    -webkit-user-select:none;
    align-items:flex-end;
}

/* Project card — larger, tighter, layered */
.project-card{
    flex:0 0 auto;
    width:clamp(230px, 26vw, 360px);
    min-width:190px;
    max-width:360px;
    border-radius:22px;
    overflow:hidden;
    position:relative;
    backface-visibility:hidden;
    transform-origin:center bottom;
    transition:transform .48s cubic-bezier(.22,.9,.22,1), box-shadow .4s ease;
    cursor:grab;
    background:rgba(255,255,255,.06);
    backdrop-filter:blur(14px) saturate(1.6);
    -webkit-backdrop-filter:blur(14px) saturate(1.6);
    border:1px solid rgba(255,255,255,.14);
    box-shadow:0 8px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.1);
    animation:cardGlow 2s ease-in-out infinite alternate;
}
@keyframes cardGlow{
    from{ box-shadow:0 0 28px rgba(75,133,208,.35), 0 8px 32px rgba(0,0,0,.40), inset 0 1px 0 rgba(255,255,255,.1); }
    to  { box-shadow:0 0 55px rgba(75,133,208,.65), 0 8px 40px rgba(0,0,0,.50), inset 0 1px 0 rgba(255,255,255,.15); }
}
/* Pause glow while dragging so it doesn't fight the 3-D transform */
.project-track-wrap:active .project-card{ animation-play-state:paused; }
.project-card:active{cursor:grabbing}

/* Bigger image area */
.project-image{
    width:100%;
    aspect-ratio:4/3;
    overflow:hidden;
    background:rgba(255,255,255,.04);
}
.project-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    pointer-events:none;
    transition:transform .4s ease;
}
.project-card:hover .project-image img{
    transform:scale(1.06);
}

/* Title overlay at bottom */
.project-card-label{
    position:absolute;
    bottom:0;
    left:0;
    right:0;
    padding:20px 16px 14px;
    background:linear-gradient(to top, rgba(0,0,0,.82) 0%, transparent 100%);
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
}
.project-title-label{
    color:#fff;
    font-size:13px;
    font-weight:600;
    display:block;
    line-height:1.3;
    letter-spacing:.01em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* ========== MODAL ========== */
.project-modal-overlay{
    position:fixed;
    inset:0;
    z-index:1000;
    background:rgba(0,0,0,.78);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px;
    opacity:0;
    visibility:hidden;
    transition:opacity .3s ease, visibility .3s ease;
}
.project-modal-overlay.open{
    opacity:1;
    visibility:visible;
}
.project-modal-box{
    background:rgba(30,32,36,.95);
    backdrop-filter:blur(24px) saturate(1.8);
    -webkit-backdrop-filter:blur(24px) saturate(1.8);
    border:1px solid rgba(255,255,255,.14);
    border-radius:30px;
    width:min(96vw, 1400px);
    height:min(94vh, 980px);
    overflow:hidden;
    box-shadow:0 32px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.1);
    position:relative;
    display:grid;
    grid-template-columns: 1.45fr .95fr;
    animation:modalIn .35s cubic-bezier(.22,.9,.22,1) both;
}
@keyframes modalIn{
    from{transform:scale(.94) translateY(16px);opacity:0}
    to{transform:scale(1) translateY(0);opacity:1}
}
.modal-close{
    position:absolute;
    top:16px;
    right:18px;
    width:42px;
    height:42px;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.15);
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:24px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    line-height:1;
    transition:background .2s;
    z-index:10;
}
.modal-close:hover{background:rgba(255,80,80,.3)}
.modal-image-wrap{
    width:100%;
    height:100%;
    overflow:hidden;
    border-radius:30px 0 0 30px;
}
.modal-image-wrap img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.modal-body{
    padding:34px 34px 34px 30px;
    overflow:auto;
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.modal-body h3{
    font-size:clamp(24px,3vw,34px);
    color:#fff;
    margin:0 0 14px;
}
.modal-body p{
    color:var(--text-soft);
    line-height:1.8;
    margin:0 0 22px;
    font-size:16px;
}
.modal-project-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#fff;
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    padding:12px 22px;
    border-radius:14px;
    background:rgba(75,133,208,.22);
    border:1px solid rgba(75,133,208,.4);
    transition:background .2s ease, transform .2s ease;
    width:fit-content;
}
.modal-project-link:hover{
    background:rgba(75,133,208,.4);
    transform:translateY(-1px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 980px){
    .banner-content{
        flex-direction:column;
        min-height:auto;
        padding:42px 0 30px;
    }
    .pure-portfolio-banner-slider-detail-inside,
    .slider-img{
        flex:1 1 auto;
        width:100%;
        max-width:100%;
    }
    .slider-img{
        order:-1;
        max-width:540px;
    }
    .header-container{
        flex-direction:column;
        align-items:flex-start;
    }
    .nav-links{justify-content:flex-start}

    .skills-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* Tablet: still 5 cards, tighter */
    .project-card{
        width:clamp(190px, 28vw, 300px);
        min-width:170px;
        max-width:300px;
    }
}
@media (max-width: 768px){
    .skills-container{
        padding: 48px 24px;
    }
    .projects-container{
        padding: 40px 0 56px;
    }
    .section-heading{
        padding: 0 24px;
    }
    .skills-grid{
        gap: 16px;
    }
    /* Smaller screens: 3 cards visible, side buttons shrink */
    .carousel-button{
        width:36px;
        height:36px;
    }
    .carousel-button svg{
        width:16px;
        height:16px;
    }
    .project-card{
        width:clamp(160px, 68vw, 260px);
        min-width:160px;
        max-width:260px;
    }
    .project-track{ gap:0; }
}
@media (max-width: 640px){
    .header-container,
    .ascendoor-wrapper,
    .footer-container{
        padding-left:16px;
        padding-right:16px;
    }
    .nav-links a{
        padding:9px 12px;
        font-size:13px;
    }
    .slider-head-title{font-size:clamp(34px,13vw,52px)}
    .pure-portfolio-banner-head-title{font-size:clamp(24px,8vw,34px)}
    .intro-paragraph{font-size:15px}
    .social-link{width:42px;height:42px}

    .skills-grid{
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .skills-container{
        padding: 40px 16px;
    }
    .project-modal-box{
        width:calc(100vw - 20px);
        height:calc(100vh - 20px);
        grid-template-columns:1fr;
        border-radius:24px;
    }
    .modal-image-wrap{
        border-radius:24px 24px 0 0;
        height:42vh;
    }
    .modal-body{padding:20px 20px 24px}
}
@media (max-width: 400px){
    .skills-grid{
        grid-template-columns: 1fr;
    }
}