@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

@font-face {
    font-family: 'OpenDyslexic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/opendyslexic@5.2.5/files/opendyslexic-latin-400-normal.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/npm/@fontsource/opendyslexic@5.2.5/files/opendyslexic-latin-400-normal.woff') format('woff');
}
@font-face {
    font-family: 'OpenDyslexic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/npm/@fontsource/opendyslexic@5.2.5/files/opendyslexic-latin-700-normal.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/npm/@fontsource/opendyslexic@5.2.5/files/opendyslexic-latin-700-normal.woff') format('woff');
}

:root {
    --bg-main: #F2F2FC;
    --bg-alt: #FDF9FF;
    --bg-border: #E8DFEC;
    --text-main: #302E4D;
    --text-secondary: #504E70;
    --accent: #7C3AED;
}

* { margin: 0; padding: 0; text-decoration: none; box-sizing: border-box; }
::before, ::after { box-sizing: border-box; }
ul { list-style: none; }

/* Visible keyboard focus on every interactive element (mouse clicks stay outline-free) */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
body { line-height: 1.5; font-size: 16px; font-family: 'Poppins', sans-serif; background: var(--bg-main); }

/* Dyslexic-friendly mode, toggled by the "D" button */
body.dyslexic-font *:not(i) { font-family: 'OpenDyslexic', sans-serif !important; }
body.dyslexic-font p, body.dyslexic-font li, body.dyslexic-font .timeline-text { line-height: 1.8; }

/* These two elements are always in the dyslexic font */
.aside .logo a, h3.hello span.name { font-family: 'OpenDyslexic', sans-serif; }

.hidden { display: none !important; }
.padd-15 { padding-left: 15px; padding-right: 15px; }
.container { max-width: 1100px; width: 100%; margin: auto; }
.section .container { padding-top: 60px; padding-bottom: 70px; }
.section { background: var(--bg-main); min-height: 100vh; padding: 0 30px; }
.section-title { flex: 0 0 100%; max-width: 100%; margin-bottom: 60px; }
.section-title h2 { font-size: 40px; color: var(--text-main); font-weight: 700; position: relative; }
.section-title h2::before {
    content: '';
    height: 4px;
    width: 50px;
    background-color: var(--accent);
    position: absolute;
    top: 100%;
    left: 0;
}
.section-title h2::after {
    content: '';
    height: 4px;
    width: 25px;
    background-color: var(--accent);
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
}
.row { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; position: relative; }
.btn {
    font-size: 16px;
    font-weight: 500;
    padding: 12px 35px;
    color: white;
    border-radius: 40px;
    display: inline-block;
    border: none;
    white-space: nowrap;
    background: var(--accent);
    transition: all .3s ease;
    cursor: pointer;
}
.btn:hover { transform: scale(1.05); }
.shadow-dark { box-shadow: 0 0 20px rgba(48, 46, 77, .15); }

/* ASIDE */

.aside {
    width: 270px;
    background: var(--bg-alt);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10;
    height: 100%;
    padding: 30px;
    border-right: 1px solid var(--bg-border);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all .3s ease;
}
.aside .logo { position: absolute; top: 50px; font-size: 30px; text-transform: capitalize; }
.aside .logo a { color: var(--text-main); font-weight: 700; padding: 15px 20px; font-size: 30px; letter-spacing: 5px; position: relative; }
.aside .logo a::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-bottom: 5px solid var(--accent);
    border-left: 5px solid var(--accent);
    bottom: 0;
    left: 0;
}
.aside .logo a::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-top: 5px solid var(--accent);
    border-right: 5px solid var(--accent);
    top: 0;
    right: 0;
}
.aside .nav { margin-top: 50px; }
.aside .nav li { margin-bottom: 20px; display: block; }
.aside .nav li a { font-size: 16px; font-weight: 600; display: block; color: var(--text-main); padding: 5px 15px; border-bottom: 1px solid var(--bg-border); }
.aside .nav li a.active { color: var(--accent); }
.aside .nav li a i { margin-right: 15px; }
.aside .nav-toggler {
    height: 40px;
    width: 45px;
    border: 1px solid var(--bg-border);
    cursor: pointer;
    position: fixed;
    left: 300px;
    top: 20px;
    border-radius: 5px;
    background: var(--bg-alt);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    z-index: 11;
}
.aside .nav-toggler.open span { background-color: transparent; }
.aside .nav-toggler span { height: 2px; width: 18px; background: var(--accent); display: inline-block; position: relative; }
.aside .nav-toggler span::before {
    content: '';
    height: 2px;
    width: 18px;
    background: var(--accent);
    position: absolute;
    top: -6px;
    left: 0;
}
.aside .nav-toggler.open span::before { transform: rotate(45deg); top: 0; }
.aside .nav-toggler span::after {
    content: '';
    height: 2px;
    width: 18px;
    background: var(--accent);
    position: absolute;
    top: 6px;
    left: 0;
}
.aside .nav-toggler.open span::after { transform: rotate(-45deg); top: 0; }

/* MAIN CONTENT */

.main-content { margin-left: 270px; transition: all .3s ease; }

/* Dyslexic mode toggle button */

.dyslexic-toggle {
    position: fixed;
    right: 20px;
    top: 20px;
    height: 45px;
    width: 45px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text-main);
    border: 1px solid var(--bg-border);
    box-shadow: 0 0 10px rgba(48, 46, 77, .1);
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    z-index: 101;
    transition: all .3s ease;
}
.dyslexic-toggle:hover { background: var(--accent); color: #fff; transform: scale(1.05); }
.dyslexic-toggle.active { background: var(--accent); color: #fff; }

/* HOME */

.home { min-height: 100vh; display: flex; align-items: center; color: var(--text-main); position: relative; overflow: hidden; }
.home .container { max-width: none; margin: 0; }
.home .home-info { flex: 0 0 55%; max-width: 900px; }
h3.hello { font-size: 32px; margin: 15px 0; }
h3.hello span.name { font-size: 36px; font-weight: 700; color: var(--accent); }
h3.profession { font-size: 34px; margin: 15px 0; white-space: nowrap; }
.typing { color: var(--accent); }
.home-info p { margin-bottom: 40px; font-size: 21px; color: var(--text-secondary); }
.home-info .btn { font-size: 17px; padding: 12px 40px; }

/* Portrait pinned to the section's bottom-right corner, sized to the
   viewport so it's fully visible without scrolling. */
.home .home-img { position: absolute; right: 0; bottom: 0; text-align: right; }
.home .home-img-frame { position: relative; display: inline-block; overflow: hidden; border-radius: 16px 0 0 0; }
.home .home-img img {
    height: 92vh;
    max-height: 900px;
    width: auto;
    max-width: 48vw;
    margin: 0;
    border-radius: 16px 0 0 0;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

/* Drag-to-paint: hover the photo for a crosshair cursor, drag out boxes that
   fill in with translucent trans-flag colours (blue / pink / white, cycling) */
.home-img-frame { cursor: crosshair; touch-action: none; }
.color-drag-box {
    position: absolute;
    opacity: 0.55;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ABOUT */

.about .about-content { flex: 0 0 100%; max-width: 100%; }
.about .about-content .about-text { flex: 0 0 100%; max-width: 100%; }
.about .about-content .about-text h3 { font-size: 24px; margin-bottom: 15px; font-weight: 700; color: var(--text-main); }
.about .about-content .about-text h3 span { color: var(--accent); }
.about .about-content .about-text p { font-size: 16px; line-height: 25px; color: var(--text-secondary); text-align: justify; }
.about .about-content .personal-info { flex: 0 0 100%; max-width: 100%; margin-top: 40px; }
.about .about-content .personal-info .info-item { flex: 0 0 33.33%; max-width: 33.33%; }
.about .about-content .personal-info .info-item p { font-weight: 600; padding: 10px 0; font-size: 16px; color: var(--text-main); border-bottom: 1px solid var(--bg-border); }
.about .about-content .personal-info .info-item p span { font-weight: 400; color: var(--text-secondary); margin-left: 4px; display: inline-block; }
.about .about-content .personal-info .buttons { margin-top: 30px; }
.about .about-content .personal-info .buttons .btn { margin-top: 10px; }
.about .about-content .education, .about .about-content .experience {
    flex: 0 0 50%;
    max-width: 50%;
    margin-top: 30px;
    align-self: flex-start;
}
.about .about-content .skills {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    margin-top: 30px;
    align-self: flex-start;
}
.about .about-content .skills-panel { background-color: var(--bg-alt); padding: 25px 20px; border: 1px solid var(--bg-border); border-radius: 10px; width: 100%; }
.about .about-content .skills-list { margin-bottom: 25px; }
.about .about-content .skills-list li {
    position: relative;
    padding: 10px 0 10px 26px;
    font-size: 15px;
    line-height: 22px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--bg-border);
}
.about .about-content .skills-list li:last-child { border-bottom: none; }
.about .about-content .skills-list li i { position: absolute; left: 0; top: 12px; color: var(--accent); font-size: 13px; }
.about .about-content .tools-row h4 { font-size: 14px; color: var(--text-main); margin-bottom: 12px; font-weight: 600; }
.about .about-content .tools { display: flex; flex-wrap: wrap; gap: 10px; }
.about .about-content .tool {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-main);
    border: 1px solid var(--bg-border);
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.about .about-content .tool i { color: var(--accent); font-size: 16px; }
.about .about-content .tool img { height: 18px; width: 18px; object-fit: contain; }
.about .about-content h3.title { font-size: 24px; margin-bottom: 30px; font-weight: 700; color: var(--text-main); }
.about .about-content .timeline-box { flex: 0 0 100%; max-width: 100%; }
.about .about-content .timeline { background-color: var(--bg-alt); padding: 45px 25px; border: 1px solid var(--bg-border); border-radius: 10px; width: 100%; position: relative; }
.about .about-content .timeline .timeline-item { position: relative; padding-left: 37px; padding-bottom: 35px; }
.about .about-content .timeline .timeline-item:last-child { padding-bottom: 0; }
.about .about-content .timeline .timeline-item::before { content: ''; width: 1px; position: absolute; height: 100%; left: 7px; top: 0; background-color: var(--accent); }
.about .about-content .timeline .circle-dot { position: absolute; left: 0; top: 0; height: 15px; width: 15px; border-radius: 50%; background-color: var(--accent); }
.about .about-content .timeline .timeline-date { font-weight: 400; font-size: 14px; margin-bottom: 12px; color: var(--text-secondary); }
.about .about-content .timeline .timeline-date .fa { margin-right: 5px; }
.about .about-content .timeline .timeline-title { font-weight: 700; font-size: 18px; margin-bottom: 15px; text-transform: capitalize; color: var(--text-main); }
.about .about-content .timeline .timeline-text { line-height: 25px; font-size: 16px; text-align: justify; color: var(--text-secondary); }

/* PORTFOLIO */

.portfolio .container { padding-bottom: 40px; }
.portfolio .portfolio-heading { flex: 0 0 100%; max-width: 100%; margin-bottom: 40px; margin-top: 20px; }
.portfolio .portfolio-heading h2 { color: var(--text-main); font-weight: 500; }
.portfolio-filters { flex: 0 0 100%; max-width: 100%; margin-bottom: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 35px; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filter-group h4 { font-size: 14px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn {
    background: var(--bg-alt);
    border: 1px solid var(--bg-border);
    color: var(--text-main);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s ease;
    font-family: 'Poppins', sans-serif;
}
.filter-btn i { margin-right: 6px; }
.filter-btn-logo { height: 14px; width: 14px; object-fit: contain; margin-right: 6px; vertical-align: -2px; }
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.portfolio .portfolio-item { flex: 0 0 33.33%; max-width: 33.33%; margin-bottom: 30px; }
.portfolio .portfolio-item-inner {
    border: 1px solid var(--bg-border);
    background: var(--bg-alt);
    border-radius: 10px;
    overflow: hidden;
    padding: 30px 20px;
    text-align: center;
    height: 100%;
    transition: all .3s ease;
    position: relative;
}
.portfolio .portfolio-item-inner:hover { box-shadow: 0 0 20px rgba(48, 46, 77, .15); transform: translateY(-4px); }
.portfolio .portfolio-icon { font-size: 36px; color: var(--accent); margin-bottom: 15px; }
.portfolio .portfolio-title { font-size: 17px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.portfolio .portfolio-meta { font-size: 14px; color: var(--text-secondary); }
.portfolio .portfolio-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}
.portfolio .badge-engine-logo { height: 13px; width: 13px; object-fit: contain; flex-shrink: 0; filter: brightness(0) invert(1); }
.portfolio .pinned-projects { margin-bottom: 20px; }

/* Video cards (real hover-preview + click-to-watch) */

.portfolio .portfolio-item-inner.video-card { padding: 0; text-align: left; cursor: pointer; }
.video-thumb-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-thumb-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 10, 35, 0.25);
    opacity: 0;
    transition: opacity .3s ease;
}
.video-card:hover .video-play-overlay { opacity: 1; }
.video-play-overlay i { font-size: 40px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.portfolio .portfolio-info { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding: 16px 18px; }
.video-card .portfolio-title { font-size: 16px; margin-bottom: 0; }
.video-card .portfolio-meta, .video-card .portfolio-views { font-size: 13px; color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; }

/* Game splash card (background image + bottom info bar) */

.portfolio .portfolio-item-inner.game-splash-card {
    width: 100%;
    height: auto;
    padding: 0;
    text-align: left;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
/* SillyCore.store card: a scaled-down live iframe preview, click-through to the real site.
   Pinned version is just the 16:9 preview; the Latest Projects version adds an empty
   spacer matching .portfolio-info's height so it lines up with the video cards next to it. */

.portfolio .portfolio-item-inner.sillycore-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    cursor: pointer;
}
/* Pinned has no spacer row, so let it size to its own content instead of
   stretching to match its taller pinned siblings and leaving a gap below. */
.pinned-projects .sillycore-card { height: auto; }
.sillycore-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.sillycore-thumb iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 400%;
    height: 400%;
    border: none;
    pointer-events: none;
    transform: scale(0.25);
    transform-origin: top left;
}
.sillycore-card .portfolio-info { min-height: 52px; }

/* Video modal (lightbox) */

.video-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 35, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 40px 20px;
}
.video-modal-box { position: relative; width: 100%; max-width: 900px; }
.video-modal-box video-player { display: block; width: 100%; }
.video-modal-box video-minimal-skin { display: grid; width: 100%; aspect-ratio: 16 / 9; max-height: 75vh; border-radius: 10px; overflow: hidden; }
.video-modal-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    margin-top: 14px;
}

/* CONTACT */

.contact-title { color: var(--accent); text-align: center; font-size: 25px; margin-bottom: 20px; }
.contact-subtitle { color: var(--text-main); text-align: center; font-size: 15px; margin-bottom: 60px; }
.contact .contact-info-item { flex: 0 0 50%; max-width: 50%; text-align: center; margin-bottom: 60px; }
.contact .contact-info-item .icon { display: inline-block; }
.contact .contact-info-item .icon .fa { font-size: 25px; color: var(--accent); }
.contact .contact-info-item h4 { font-size: 18px; font-weight: 700; color: var(--text-main); text-transform: capitalize; margin: 15px 0 5px; }
.contact .contact-info-item p { font-size: 16px; line-height: 25px; color: var(--text-secondary); font-weight: 400; }
.contact .contact-info-item a { color: var(--text-secondary); }
.contact .contact-info-item a:hover { color: var(--accent); }

/* FOOTER / CREDIT */

.site-credit {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    padding: 15px 20px;
    background: var(--bg-main);
    border-top: 1px solid var(--bg-border);
    margin-left: 270px;
}
.site-credit a { color: var(--text-secondary); text-decoration: underline; }
.site-credit a:hover { color: var(--accent); }

@media (max-width: 1199px) {

    .aside { left: -270px; }
    .aside.open { left: 0; }
    .aside .nav-toggler { display: flex; left: 30px; }
    .aside .nav-toggler.open { left: 300px; }
    .main-content { margin-left: 0; }
    .site-credit { margin-left: 0; }
    .section .container { padding-top: 70px; }

    .about .about-content .personal-info .info-item p span { display: block; margin-left: 0; }
}

@media (max-width: 991px) {

    .home .home-info { flex: 0 0 100%; max-width: 100%; }
    .home .home-img { display: none; }

    .about .about-content .personal-info .info-item, .about .about-content .experience, .about .about-content .education, .about .about-content .skills { flex: 0 0 100%; max-width: 100%; }

    .portfolio .portfolio-item { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 767px) {

    .portfolio .portfolio-item { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 460px) {

    .contact .contact-info-item { flex: 0 0 100%; max-width: 100%; }
}
