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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #081b29;
    --main-color: #077966;
    --text-color: #333;
    --second-text-color: #555;
    --white-color: #ffffff;
    --cover-color: linear-gradient(45deg, #3c0272, #0ebdbd);
    --pages-color: linear-gradient(90deg, #d4f3f5, #ddd);
    --border: .125rem solid #00a9af;
    --box-shadow: 0 0 .6rem rgba(0, 0, 0, .2);
    --transition: all 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --second-text-color: #b0b0b0;
    --pages-color: linear-gradient(90deg, #1a1a1a, #2d2d2d);
    --cover-color: linear-gradient(45deg, #6b46c1, #06b6d4);
    --border: .125rem solid #06b6d4;
    --box-shadow: 0 0 .6rem rgba(0, 0, 0, .5);
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url(b5.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    overflow: hidden;
    transition: var(--transition);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle i {
    font-size: 1.5rem;
    color: var(--white-color);
    transition: var(--transition);
}

.wrapper {
    position: relative;
    width: 66rem;
    height: 45rem;
    padding: 2rem;
    perspective: 250rem;
    animation: show-animate 2s forwards;
}

@keyframes show-animate {
    0%, 30% {
        opacity: 0;
        transform: rotate(-20deg);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg);
    }
}

.bi {
    color: var(--main-color);
    font-style: italic;
    font-weight: bold;
}

.cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--cover-color);
    box-shadow: var(--box-shadow);
    border-top-left-radius: .6rem;
    border-bottom-left-radius: .6rem;
    transform-origin: right;
    transition: var(--transition);
}

.cover.cover-left {
    z-index: -1;
}

.cover.cover-right {
    z-index: 100;
    transition: transform 1s cubic-bezier(.645, .045, .355, 1);
}

.cover.cover-right.turn {
    transform: rotateY(180deg);
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.book .book-page {
    position: absolute;
    padding: 2rem;
    width: 50%;
    height: 100%;
    background: var(--pages-color);
    box-shadow: 0 0 .6rem rgba(0, 0, 0, .1);
    display: flex;
    transition: var(--transition);
}

.profile-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.profile-image {
    position: relative;
    margin-bottom: 1rem;
}

.profile-page img {
    height: 200px !important;
    width: 200px !important;
    border-radius: 50%;
    border: .25rem solid var(--main-color);
    margin-bottom: .8rem;
    transition: var(--transition);
    object-fit: cover;
}

.profile-page img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-page h1 {
    font-size: 2.7rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--main-color), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-page h3 {
    font-size: 1.5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.profile-page .social-media {
    margin: .6rem 0 .8rem;
}

.profile-page .social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: var(--border);
    border-radius: 50%;
    font-size: 1.3rem;
    color: var(--main-color);
    margin: 0.2rem;
    transition: var(--transition);
}

.profile-page .social-media a:hover {
    background: var(--main-color);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-page p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.profile-page .btn-box {
    margin-top: 1.2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 9.5rem;
    height: 3rem;
    background: var(--main-color);
    border: var(--border);
    border-radius: .3rem;
    font-size: 1rem;
    color: var(--white-color);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--main-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-box .btn:nth-child(2) {
    background: transparent;
    color: var(--main-color);
}

.btn-box .btn:nth-child(2):hover {
    background-color: var(--main-color);
    color: var(--white-color);
}

.book-page.page-right {
    position: absolute;
    right: 0;
    transform-style: preserve-3d;
    transform-origin: left;
    transition: transform 1s cubic-bezier(.645, .045, .355, 1);
}

.book-page.page-right.turn {
    transform: rotateY(-180deg);
}

.book-page .page-front,
.book-page .page-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--pages-color);
    padding: 1.5rem 2rem;
    overflow-y: auto;
}

.book-page .page-front {
    transform: rotateY(0deg) translateZ(1px);
}

.book-page .page-back {
    transform: rotateY(180deg) translateZ(1px);
}

.title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--main-color);
    position: relative;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--main-color);
    border-radius: 2px;
}

.workeduc-box {
    border-left: var(--border);
    position: relative;
}

.workeduc-content p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.workeduc-box .workeduc-content {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 1.2rem;
    transition: var(--transition);
}

.workeduc-box .workeduc-content:hover {
    transform: translateX(5px);
}

.workeduc-box .workeduc-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.65rem;
    width: 1.2rem;
    height: 1.2rem;
    background: var(--main-color);
    border-radius: 50%;
    transition: var(--transition);
}

.workeduc-box .workeduc-content:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--main-color);
}

.workeduc-content .year {
    color: var(--main-color);
    font-weight: 600;
}

.workeduc-content .year i {
    margin-right: .4rem;
}

.workeduc-content h3 {
    margin: 0.5rem 0;
    color: var(--text-color);
}

/* Skills Summary */
.skills-summary {
    margin-bottom: 1.5rem;
}

.progress-item {
    margin-bottom: 1rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--main-color), #06b6d4);
    border-radius: 4px;
    width: 0;
    transition: width 2s ease-in-out;
}

/* Services Box */
.services-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.services-content {
    border: var(--border);
    border-radius: .5rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.services-content:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-5px);
}

.services-content i {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.services-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.services-content p {
    margin: .1rem 0 .2rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Skills Box */
.skills-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skills-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: var(--border);
    transition: var(--transition);
}

.skills-content:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.skills-content h3 {
    font-size: 1.3rem;
    line-height: 1;
    margin-bottom: .6rem;
    color: var(--main-color);
}

.skills-content .content {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
}

.skills-content .content span {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 6rem;
    height: 5rem;
    border: var(--border);
    border-radius: .3rem;
    font-weight: 600;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.skills-content .content span:hover {
    box-shadow: var(--box-shadow);
    background: linear-gradient(45deg, var(--main-color), #06b6d4);
    color: white;
    transform: scale(1.05);
}

.skills-content .content span i {
    font-size: 2rem;
    color: var(--main-color);
    margin-bottom: 0.5rem;
}

.skills-content .content span:hover i {
    color: white;
}

/* Portfolio Box */
.portfolio-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: var(--border);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.portfolio-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-box .img-box {
    display: flex;
    width: 100%;
    height: 12rem;
    border: var(--border);
    border-radius: .5rem;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.portfolio-box .img-box img {
    width: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-box .img-box:hover img {
    transform: scale(1.1);
}

.portfolio-box .info-box {
    margin: 1rem 0 1.5rem;
}

.portfolio-box .info-box .info-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-box .info-box .info-title h3 {
    font-size: 1.3rem;
    color: var(--text-color);
}

.portfolio-box .info-box .info-title a {
    display: flex;
    align-items: center;
    color: var(--main-color);
    transition: var(--transition);
}

.portfolio-box .info-box .info-title a:hover {
    color: #06b6d4;
    transform: translateX(3px);
}

.portfolio-box .info-box .info-title a i {
    margin-left: .3rem;
}

.portfolio-box .info-box p:nth-of-type(1) {
    font-weight: 600;
    color: var(--main-color);
}

.portfolio-box .btn-box {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.portfolio-box .btn-box .btn {
    margin: 0;
}

/* Contact Box */
.contact-box {
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    border: var(--border);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(5px);
    box-shadow: var(--box-shadow);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--main-color);
    width: 30px;
    text-align: center;
}

.contact-item h4 {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 0.8rem;
    color: var(--second-text-color);
}

/* Achievements Box */
.achievements-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.achievement-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.achievement-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.achievement-item i {
    font-size: 2rem;
    color: var(--main-color);
    margin-bottom: 0.5rem;
}

.achievement-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.achievement-item p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--second-text-color);
}

.page-number {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: var(--main-color);
}

.nextprev-btn {
    position: absolute;
    width: 2rem;
    bottom: .9rem;
    height: 2rem;
    right: 1.5rem;
    cursor: pointer;
    font-size: 2rem;
    color: var(--second-text-color);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    border-radius: 50%;
}

.nextprev-btn:hover {
    color: var(--main-color);
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.nextprev-btn.back {
    left: 1.5rem;
}

.back-profile {
    position: absolute;
    bottom: 1.2rem;
    right: 2rem;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: var(--border);
    border-radius: .3rem;
    font-size: 1.1rem;
    color: var(--main-color);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
}

.back-profile:hover {
    background-color: var(--main-color);
    color: var(--white-color);
    transform: scale(1.1);
}

.back-profile p {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(.5);
    font-size: 1rem;
    color: var(--main-color);
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.back-profile:hover p {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    top: -1.8rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .wrapper {
        width: 90%;
        height: auto;
        min-height: 45rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        padding: 1rem;
    }
    
    .wrapper {
        width: 100%;
        height: auto;
        padding: 1rem;
        perspective: none;
    }
    
    .book {
        flex-direction: column;
    }
    
    .book .book-page {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100vh;
        margin-bottom: 2rem;
        transform: none !important;
    }
    
    .book-page.page-right {
        position: relative;
        right: auto;
        transform: none !important;
    }
    
    .book-page .page-front,
    .book-page .page-back {
        position: relative;
        transform: none !important;
        height: auto;
        min-height: 100vh;
    }
    
    .cover {
        display: none;
    }
    
    .profile-page {
        padding: 2rem 0;
    }
    
    .profile-page h1 {
        font-size: 2.2rem;
    }
    
    .profile-page h3 {
        font-size: 1.2rem;
    }
    
    .profile-page img {
        height: 150px !important;
        width: 150px !important;
    }
    
    .btn-box {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .services-box,
    .skills-box {
        grid-template-columns: 1fr;
    }
    
    .achievements-box {
        grid-template-columns: 1fr;
    }
    
    .nextprev-btn,
    .back-profile {
        display: none;
    }
    
    .page-number {
        display: none;
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding: 0.5rem;
    }
    
    .book .book-page {
        padding: 1rem;
    }
    
    .profile-page h1 {
        font-size: 1.8rem;
    }
    
    .profile-page h3 {
        font-size: 1rem;
    }
    
    .profile-page img {
        height: 120px !important;
        width: 120px !important;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .workeduc-content h3 {
        font-size: 1rem;
    }
    
    .workeduc-content p {
        font-size: 0.8rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}