:root {
    --bg-page: #222;
    --bg-card: #fdfdfd;
    --accent: #3498db;
    --accent-secondary: #2980b9;
    --accent-gradient: linear-gradient(135deg, #3498db, #2980b9);
    --text-dark: #333;
    --text-light: #777;
    --sidebar-width: 80px;
    --profile-width: 380px;
    --transition: all 0.6s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-page);
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    perspective: 1200px;
}

.page-wrapper {
    display: flex;
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    position: relative;
    transform-style: preserve-3d;
}

/* Vertical Icons Menu */
.header {
    width: var(--sidebar-width);
    background-color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 30px 0 0 30px;
    z-index: 10;
}

.main-menu { list-style: none; text-align: center; }

.main-menu li {
    padding: 20px 0;
    cursor: pointer;
    color: #999;
    font-size: 20px;
    position: relative;
    transition: all 0.3s;
}

.main-menu li:hover, .main-menu li.active { color: var(--bg-card); }

.main-menu li span {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 5px 15px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    border-radius: 0 5px 5px 0;
}

.main-menu li:hover span { opacity: 1; visibility: visible; }

/* Main Card */
.content-card {
    flex: 1;
    background-color: var(--bg-card);
    display: flex;
    border-radius: 0 30px 30px 0;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    position: relative;
    transform-style: preserve-3d;
}

/* Profile Panel */
.profile-panel {
    width: var(--profile-width);
    background-color: var(--bg-card);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #eee;
    z-index: 5;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 25px;
    border: 8px solid #fdfdfd;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.profile-photo:hover {
    transform: scale(1.05) rotateY(15deg) rotateX(5deg);
    box-shadow: -15px 20px 40px rgba(0,0,0,0.15);
    border-color: var(--accent);
}

.profile-photo img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: all 0.5s;
}

.profile-photo:hover img {
    transform: scale(1.1);
}

.profile-name { font-size: 28px; font-weight: 700; margin-bottom: 5px; color: var(--text-dark); }
.profile-title { font-size: 15px; color: var(--text-light); margin-bottom: 25px; }

.info-list-left {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
    width: 100%;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.info-list-left li {
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.info-list-left li span {
    font-weight: 700;
    color: var(--accent);
}

.profile-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
}

.profile-link:hover {
    color: var(--accent);
}

.social-links { display: flex; gap: 12px; margin-bottom: 30px; justify-content: center; }
.social-links a { font-size: 16px; color: #bbb; transition: all 0.3s; }
.social-links a:hover { color: var(--accent); }

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

/* Content Panel */
.content-panel {
    flex: 1;
    position: relative;
    background-color: white;
    perspective: 1200px;
    overflow: hidden;
}

.content-section {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 50px;
    background-color: white;
    overflow-y: auto;
    display: none;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.content-section.active {
    display: block;
    z-index: 1;
}

/* 3D Animations (Cube Left) */
.pt-page-rotateCubeLeftOut { transform-origin: 100% 50%; animation: rotateCubeLeftOut .6s both ease-in; }
.pt-page-rotateCubeLeftIn { transform-origin: 0% 50%; animation: rotateCubeLeftIn .6s both ease-out; }

@keyframes rotateCubeLeftOut {
	50% { animation-timing-function: ease-out; transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
	100% { opacity: 0; transform: translateX(-100%) rotateY(-90deg); }
}
@keyframes rotateCubeLeftIn {
	0% { opacity: 0; transform: translateX(100%) rotateY(90deg); }
	50% { animation-timing-function: ease-out; transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
	100% { opacity: 1; transform: translateX(0) rotateY(0deg); }
}

/* 3D Animations (Cube Right) */
.pt-page-rotateCubeRightOut { transform-origin: 0% 50%; animation: rotateCubeRightOut .6s both ease-in; }
.pt-page-rotateCubeRightIn { transform-origin: 100% 50%; animation: rotateCubeRightIn .6s both ease-out; }

@keyframes rotateCubeRightOut {
	50% { animation-timing-function: ease-out; transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
	100% { opacity: 0; transform: translateX(100%) rotateY(90deg); }
}
@keyframes rotateCubeRightIn {
	0% { opacity: 0; transform: translateX(-100%) rotateY(-90deg); }
	50% { animation-timing-function: ease-out; transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
	100% { opacity: 1; transform: translateX(0) rotateY(0deg); }
}

/* 3D Animations (Cube Top) */
.pt-page-rotateCubeTopOut { transform-origin: 50% 100%; animation: rotateCubeTopOut .6s both ease-in; }
.pt-page-rotateCubeTopIn { transform-origin: 50% 0%; animation: rotateCubeTopIn .6s both ease-out; }

@keyframes rotateCubeTopOut {
	50% { animation-timing-function: ease-out; transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
	100% { opacity: 0; transform: translateY(-100%) rotateX(90deg); }
}
@keyframes rotateCubeTopIn {
	0% { opacity: 0; transform: translateY(100%) rotateX(-90deg); }
	50% { animation-timing-function: ease-out; transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
}

/* 3D Animations (Cube Bottom) */
.pt-page-rotateCubeBottomOut { transform-origin: 50% 0%; animation: rotateCubeBottomOut .6s both ease-in; }
.pt-page-rotateCubeBottomIn { transform-origin: 50% 100%; animation: rotateCubeBottomIn .6s both ease-out; }

@keyframes rotateCubeBottomOut {
	50% { animation-timing-function: ease-out; transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
	100% { opacity: 0; transform: translateY(100%) rotateX(-90deg); }
}
@keyframes rotateCubeBottomIn {
	0% { opacity: 0; transform: translateY(-100%) rotateX(90deg); }
	50% { animation-timing-function: ease-out; transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
}

/* UI Elements */
.section-title h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 35px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.section-title h2 span { color: var(--accent); }

.info-list { list-style: none; }
.info-list li { margin-bottom: 12px; font-size: 14px; }
.info-list li span { font-weight: 700; color: var(--accent); width: 100px; display: inline-block; }

.timeline-item { padding-left: 25px; border-left: 2px solid #f0f0f0; margin-bottom: 25px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -7px; top: 0; width: 12px; height: 12px; background: white; border: 2px solid var(--accent); border-radius: 50%; }

.skill-item { margin-bottom: 15px; }
.skill-bar { height: 4px; background: #f0f0f0; margin-top: 8px; border-radius: 2px; }
.skill-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 1s ease-in-out; }

/* Responsive */
@media (max-width: 991px) {
    body { overflow-y: auto; align-items: flex-start; }
    .page-wrapper { flex-direction: column; height: auto; width: 100%; margin: 20px 0; }
    .header { width: 100%; height: 60px; border-radius: 0; flex-direction: row; position: sticky; top: 0; }
    .main-menu { display: flex; width: 100%; justify-content: space-around; }
    .main-menu li { padding: 15px 0; }
    .content-card { flex-direction: column; border-radius: 0; }
    .profile-panel { width: 100%; border-right: none; border-bottom: 1px solid #eee; padding: 30px 20px; }
    .content-panel { height: 500px; }
    .content-section { padding: 30px 20px; }
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
}

.typewriter-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--accent);
}

#typewriter {
    color: var(--text-dark);
    font-weight: 700;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--accent);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.bio-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.bio-chunk {
    padding: 15px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    gap: 25px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.bio-chunk:hover {
    background: transparent;
    transform: translateX(10px);
    box-shadow: none;
    border: none;
}

.bio-icon {
    font-size: 22px;
    color: var(--accent);
    background: rgba(52, 152, 219, 0.08);
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bio-chunk:hover .bio-icon {
    background: var(--accent-gradient);
    color: #fff;
    transform: scale(1.1);
}

.bio-chunk p {
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
    text-align: justify;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.card-modern {
    padding: 30px 20px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.15);
    border-color: var(--accent);
}

.card-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
    transition: all 0.4s;
}

.card-modern:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-modern h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.portfolio-item-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.portfolio-grid.active .portfolio-item-wrap {
    opacity: 1;
    transform: translateY(0);
}

/* Staggering effects */
.portfolio-grid.active .portfolio-item-wrap:nth-child(1) { transition-delay: 0.1s; }
.portfolio-grid.active .portfolio-item-wrap:nth-child(2) { transition-delay: 0.2s; }
.portfolio-grid.active .portfolio-item-wrap:nth-child(3) { transition-delay: 0.3s; }
.portfolio-grid.active .portfolio-item-wrap:nth-child(4) { transition-delay: 0.4s; }
.portfolio-grid.active .portfolio-item-wrap:nth-child(5) { transition-delay: 0.5s; }
.portfolio-grid.active .portfolio-item-wrap:nth-child(6) { transition-delay: 0.6s; }

.portfolio-item {
    position: relative;
    margin: 0;
    line-height: 0;
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.portfolio-item figcaption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    padding: 20px;
    text-align: center;
    color: white;
    line-height: 1.5; /* Reset inherited line-height */
}

.portfolio-item:hover figcaption {
    opacity: 0.95;
}

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

.portfolio-item .title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px; /* Add spacing */
    color: white;
    line-height: 1.2;
}

.portfolio-item .category {
    font-size: 13px;
    opacity: 0.8;
}

.portfolio-item a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.contact-info {
    text-align: center;
    padding: 50px 0;
}

.contact-info p {
    margin-bottom: 30px;
    font-size: 16px;
    color: var(--text-light);
}

.card-modern p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}
