
:root{
    --text-color: #1a1c20;
    --link-color: #4a76ee;
    --background-color: #edf6f9;
}

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

html{
    scroll-behavior: smooth;
}

body{
    font-family: 'Poppins';
    background-color: var(--background-color);
    max-width: 1400px;
    margin: 0 auto;
}

/* animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatY {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

a{
    color: var(--link-color);
    text-decoration: none;
}

/* navbar */
nav{
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    height: 5rem;
    align-items: center;
}

nav .left a{
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;
}

nav .right a{
    color: var(--text-color);
    /* font-size: 22px;
    font-weight: 600; */
    margin: 0 10px;
    transition: all 0.3s ease;
    position: relative;
}

nav .right a::after{
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--link-color);
    transition: width 0.3s ease;
}

nav .right a:hover::after{
    width: 100%;
}

nav .right a:hover{
    color: var(--link-color);
    transform: translateY(-2px);
}

nav .right a:last-child{
    color: var(--background-color);
    background-color: var(--text-color);
    padding: 5px 15px;
    border-radius: 5px;
}

nav .right a span{
    margin-left: 5px;
}

/* section1 */
.hero-section{
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    margin: 50px 0;
    align-items: center;
}

.hero-section .text{
    flex: 5;
}
.hero-section .text h2{
    font-size: 45px;
}

.hero-section .text .subtitle{
    font-size: 18px;
    color: #374151;
    margin-top: 6px;
    min-height: 24px;
}

.typing{
    border-right: 2px solid #555;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes caretBlink{
    0%, 49% { border-color: rgba(0,0,0,.6); }
    50%, 100% { border-color: transparent; }
}

.typing{ animation: caretBlink 1s step-end infinite; }

.hero-section .text .links{
    margin-top: 25px;
}
.hero-section .text .links a{
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid var(--link-color);
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: .2s;
}
.hero-section .text .links a:hover{
    color: var(--text-color);
    border: 2px solid var(--text-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.hero-section .text .links a:active{
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.hero-section .text .links .download-resume{
    background: var(--link-color);
    color: white;
    border: 2px solid var(--link-color);
    font-weight: 500;
    transition: all .3s ease;
}

.hero-section .text .links .download-resume:hover{
    background: #3a5fd8;
    border-color: #3a5fd8;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(74, 118, 238, 0.4);
}

.hero-section .text .links .download-resume:active{
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.hero-section .headshot{
    flex: 2;
    display: flex;
    justify-content: right;
}
.hero-section .headshot img{
    border-radius: 50%;
    width: 350px;
    height: 350px;
    animation: fadeUp .10s ease both,fadeDown .10s ease both, floatY 1s ease-in-out infinite ,floatX 1s ease-in-out infinite;
    transition: all 0.3s ease;
}

.hero-section .headshot img:hover{
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* skills */
.skills-section{
    padding: 0 50px;
    margin-bottom: 100px;
}

.skills-section h2{
    text-align: center;
    font-size: 35px;
}
.skills-section .text{
    text-align: center;
    margin-bottom: 20px;
}
.skills-section{ 
    overflow: hidden; 
}
.skills-section .cells{
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    will-change: transform;
    animation: marquee 8s linear infinite;
}

@keyframes marquee{
    from{ transform: translateX(0); }
    to{ transform: translateX(-50%); }
}

@media (hover: hover){
    .skills-section:hover .cells{ animation-play-state: paused; }
}

/* Ensure marquee animation is active on larger devices */
@media (min-width: 851px) {
    .skills-section .cells {
        animation: marquee 8s linear infinite !important;
    }
}

/* Tablet specific - static display */
@media (min-width: 741px) and (max-width: 850px) {
    .skills-section {
        overflow: visible !important;
    }
    .skills-section .cells {
        animation: none !important;
        flex-wrap: wrap !important;
        justify-content: center;
        gap: 16px;
        max-width: 100%;
        transform: none !important;
        will-change: auto !important;
        overflow: visible !important;
    }
    
    .skills-section .cells .cell {
        min-width: 160px;
        padding: 10px 18px;
        animation: fadeInUp 0.6s ease both;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        display: flex !important;
    }
    
    .skills-section .cells .cell:nth-child(1) { animation-delay: 0.1s; }
    .skills-section .cells .cell:nth-child(2) { animation-delay: 0.2s; }
    .skills-section .cells .cell:nth-child(3) { animation-delay: 0.3s; }
    .skills-section .cells .cell:nth-child(4) { animation-delay: 0.4s; }
    .skills-section .cells .cell:nth-child(5) { animation-delay: 0.5s; }
    .skills-section .cells .cell:nth-child(6) { animation-delay: 0.6s; }
    .skills-section .cells .cell:nth-child(7) { animation-delay: 0.7s; }
    .skills-section .cells .cell:nth-child(8) { animation-delay: 0.8s; }
    .skills-section .cells .cell:nth-child(9) { animation-delay: 0.9s; }
    
    /* Hide duplicate skills on tablet (skills 10-18 are duplicates) */
    .skills-section .cells .cell:nth-child(n+10) {
        display: none !important;
    }
    
    /* Ensure tablet skills are visible after animation */
    .skills-section .cells .cell:nth-child(-n+9) {
        opacity: 1 !important;
        transform: translateY(0) !important;
        visibility: visible !important;
        display: flex !important;
    }
    
    /* Tablet skills hover effects */
    .skills-section .cells .cell:hover {
        transform: translateY(-8px) scale(1.08);
        box-shadow: 0 20px 40px rgba(74, 118, 238, 0.25);
        background: linear-gradient(135deg, #fff, #f8fafc);
    }
    
    .skills-section .cells .cell:active {
        transform: translateY(-4px) scale(1.02);
        transition: all 0.1s ease;
    }
    
    /* Tablet skills icon animation */
    .skills-section .cells .cell:hover img {
        transform: scale(1.2) rotate(5deg);
        transition: transform 0.3s ease;
    }
    
    /* Tablet skills text animation */
    .skills-section .cells .cell:hover span {
        color: var(--link-color);
        transform: translateX(3px);
        transition: all 0.3s ease;
    }
}

.skills-section .cells .cell{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    padding: 10px 20px;
    border: 1.5px solid #d3d3d3;
    outline: none;
    border-radius: 5px;
    margin: 10px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.skills-section .cells .cell img{
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 2px;
}
.skills-section .cells .cell span{
    font-size: 18px;
}
.skills-section .cells .cell:hover{
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 15px 30px rgba(74, 118, 238, 0.2);
    /* border-color: var(--link-color); - removed */
    background: linear-gradient(135deg, #fff, #f8fafc);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skills-section .cells .cell:active{
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s ease;
}

/* Enhanced base skills animations */
.skills-section .cells .cell {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: gentleFloat 4s ease-in-out infinite;
}

/* Staggered floating animation for base skills */
.skills-section .cells .cell:nth-child(1) { animation-delay: 0s; }
.skills-section .cells .cell:nth-child(2) { animation-delay: 0.5s; }
.skills-section .cells .cell:nth-child(3) { animation-delay: 1s; }
.skills-section .cells .cell:nth-child(4) { animation-delay: 1.5s; }
.skills-section .cells .cell:nth-child(5) { animation-delay: 2s; }
.skills-section .cells .cell:nth-child(6) { animation-delay: 2.5s; }
.skills-section .cells .cell:nth-child(7) { animation-delay: 3s; }
.skills-section .cells .cell:nth-child(8) { animation-delay: 3.5s; }
.skills-section .cells .cell:nth-child(9) { animation-delay: 4s; }
.skills-section .cells .cell:nth-child(10) { animation-delay: 4.5s; }
.skills-section .cells .cell:nth-child(11) { animation-delay: 5s; }
.skills-section .cells .cell:nth-child(12) { animation-delay: 5.5s; }
.skills-section .cells .cell:nth-child(13) { animation-delay: 6s; }
.skills-section .cells .cell:nth-child(14) { animation-delay: 6.5s; }
.skills-section .cells .cell:nth-child(15) { animation-delay: 7s; }
.skills-section .cells .cell:nth-child(16) { animation-delay: 7.5s; }
.skills-section .cells .cell:nth-child(17) { animation-delay: 8s; }
.skills-section .cells .cell:nth-child(18) { animation-delay: 8.5s; }

/* Base skills icon hover animation */
.skills-section .cells .cell:hover img {
    transform: scale(1.15) rotate(3deg);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base skills text hover animation */
.skills-section .cells .cell:hover span {
    color: var(--link-color);
    transform: translateX(3px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Enhanced hover animations */
.skills-section .cells .cell:hover {
    animation: gentleShake 0.6s ease-in-out;
}

/* Active state with enhanced feedback */
.skills-section .cells .cell:active {
    animation: gentlePulse 0.3s ease-in-out;
    transform: translateY(-2px) scale(0.98);
}

/* Base skills glow effect */
.skills-section .cells .cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 118, 238, 0.1), transparent);
    transition: left 0.6s ease;
}

.skills-section .cells .cell:hover::before {
    left: 100%;
}

/* Gentle floating animation keyframes */
@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-4px); 
    }
}

/* Pulse animation for subtle breathing effect */
@keyframes gentlePulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.01); 
    }
}

/* Shake animation for interactive feedback */
@keyframes gentleShake {
    0%, 100% { 
        transform: rotate(0deg); 
    }
    25% { 
        transform: rotate(0.5deg); 
    }
    75% { 
        transform: rotate(-0.5deg); 
    }
}

/* projects section */
.projects-section{
    padding: 0 50px;
    margin-bottom: 100px;
}
.projects-section h2{
    text-align: center;
    font-size: 35px;
    margin-bottom: 50px;
}
.projects-section .projects{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.projects-section .project{
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}
.projects-section .project h3{
    margin-bottom: 15px;
    font-size: 22px;
    margin-top: 0;
    color: var(--text-color);
    font-weight: 600;
}
.projects-section .project p{
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 15px;
    flex-grow: 1;
}
.projects-section .project a{
    display: inline-block;
    color: #fff;
    background: var(--link-color);
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    align-self: flex-start;
    margin-top: auto;
}

.projects-section .project a::before{
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.projects-section .project a:hover::before{
    left: 100%;
}

.projects-section .project a:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 118, 238, 0.3);
    outline: none;
}

.projects-section .project a:active{
    transform: translateY(0) scale(0.95);
    transition: all 0.1s ease;
}

.projects-section .project-image{
    margin: -25px -25px 20px -25px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.projects-section .project-image img{
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .3s ease;
}

.projects-section .project:hover .project-image img{
    transform: scale(1.05);
}
.projects-section .project:hover{
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

.projects-section .project:active{
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}

/* Responsive design for projects */
@media (max-width: 768px) {
    .projects-section {
        padding: 0 20px;
    }
    
    .projects-section .projects {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .projects-section .project {
        min-height: auto;
        padding: 20px;
    }
    
    .projects-section .project-image {
        margin: -20px -20px 15px -20px;
    }
    
    .projects-section .project-image img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .projects-section .project {
        padding: 15px;
    }
    
    .projects-section .project-image {
        margin: -15px -15px 12px -15px;
    }
    
    .projects-section .project-image img {
        height: 160px;
    }
}

/* education timeline section */
.education-section{
    padding: 0 50px;
    margin-bottom: 100px;
}
.education-section h2{
    text-align: center;
    font-size: 35px;
    margin-bottom: 40px;
}
.education-section .timeline{
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.education-section .timeline::before{
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--link-color);
    transform: translateX(-50%);
    animation: timelineGrow 1.5s ease-out forwards;
}

@keyframes timelineGrow {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}
.education-section .timeline-item{
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}
.education-section .timeline-item:nth-child(odd) .timeline-content{
    margin-left: auto;
    text-align: right;
    padding-right: 40px;
}
.education-section .timeline-item:nth-child(even) .timeline-content{
    margin-right: auto;
    text-align: left;
    padding-left: 40px;
}
.education-section .timeline-dot{
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: var(--link-color);
    border: 3px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 0 3px var(--link-color);
    transition: all 0.3s ease;
    animation: dotPulse 2s ease-in-out infinite;
}

.education-section .timeline-item:nth-child(1) .timeline-dot { animation-delay: 0.2s; }
.education-section .timeline-item:nth-child(2) .timeline-dot { animation-delay: 0.4s; }
.education-section .timeline-item:nth-child(3) .timeline-dot { animation-delay: 0.6s; }

@keyframes dotPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 3px var(--link-color);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 0 6px rgba(74, 118, 238, 0.3);
    }
}

.education-section .timeline-item:hover .timeline-dot {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 0 8px rgba(74, 118, 238, 0.4);
}
.education-section .timeline-content{
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    width: 45%;
    transition: transform .3s ease, box-shadow .3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: timelineSlideIn 0.6s ease forwards;
}

.education-section .timeline-item:nth-child(1) .timeline-content { animation-delay: 0.1s; }
.education-section .timeline-item:nth-child(2) .timeline-content { animation-delay: 0.3s; }
.education-section .timeline-item:nth-child(3) .timeline-content { animation-delay: 0.5s; }

@keyframes timelineSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.education-section .timeline-content:hover{
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,.15);
    border: 1px solid rgba(74, 118, 238, 0.2);
}

.education-section .timeline-content:active{
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s ease;
}
.education-section .timeline-content h3{
    color: var(--text-color);
    font-size: 20px;
    margin-bottom: 8px;
}
.education-section .timeline-content .institution{
    color: var(--link-color);
    font-weight: 500;
    margin-bottom: 4px;
}
.education-section .timeline-content .year{
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}
.education-section .timeline-content .description{
    color: #374151;
    line-height: 1.6;
    font-size: 14px;
}

/* experience section - modern design */
.experience-section{
    padding: 0 50px;
    margin-bottom: 100px;
}
.experience-section h2{
    text-align: center;
    font-size: 35px;
    margin-bottom: 50px;
    position: relative;
}
.experience-section h2::after{
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--link-color), #667eea);
    border-radius: 2px;
}
.experience-section .experience-container{
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.experience-item{
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    border: 1px solid rgba(74, 118, 238, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.experience-item::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--link-color), #667eea);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}
.experience-item:hover::before{
    transform: scaleY(1);
}
.experience-item:hover{
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,.15);
    border-color: rgba(74, 118, 238, 0.3);
}

.experience-item:active{
    transform: translateY(-5px) scale(0.98);
    transition: all 0.1s ease;
}
.experience-header{
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.experience-icon{
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--link-color), #667eea);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(74, 118, 238, 0.3);
    transition: transform 0.3s ease;
}
.experience-item:hover .experience-icon{
    transform: scale(1.1) rotate(5deg);
}
.experience-info h3{
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}
.experience-info .company{
    color: var(--link-color);
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 4px;
}
.experience-info .duration{
    color: #6b7280;
    font-size: 14px;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}
.experience-content .description{
    color: #374151;
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 20px;
}
.tech-stack{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tech-tag{
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: var(--link-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(74, 118, 238, 0.2);
    transition: all 0.3s ease;
}
.tech-tag:hover{
    background: linear-gradient(135deg, var(--link-color), #667eea);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(74, 118, 238, 0.4);
}

.tech-tag:active{
    transform: translateY(-1px) scale(0.95);
    transition: all 0.1s ease;
}

/* certifications section */
.certifications-section{
    padding: 0 50px;
    margin-bottom: 100px;
}
.certifications-section h2{
    text-align: center;
    font-size: 35px;
    margin-bottom: 50px;
    position: relative;
}
.certifications-section h2::after{
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--link-color), #667eea);
    border-radius: 2px;
}
.certifications-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}
.certification-item{
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    border: 1px solid rgba(74, 118, 238, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.certification-item::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981, #059669);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}
.certification-item:hover::before{
    transform: scaleY(1);
}
.certification-item:hover{
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.certification-item:active{
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}
.certification-icon{
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.certification-icon img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.certification-item:hover .certification-icon{
    transform: scale(1.1) rotate(5deg);
}
.certification-content{
    flex: 1;
}
.certification-content h3{
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}
.certification-content .issuer{
    color: var(--link-color);
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 4px;
}
.certification-content .date{
    color: #6b7280;
    font-size: 13px;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 12px;
}
.certification-content .description{
    color: #374151;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 15px;
}
.certification-badge{
    display: inline-block;
}
.badge-text{
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}
.certification-item:hover .badge-text{
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* hobbies section */
.hobbies-section{
    padding: 0 50px;
    margin-bottom: 100px;
}
.hobbies-section h2{
    text-align: center;
    font-size: 35px;
    margin-bottom: 50px;
    position: relative;
}
.hobbies-section h2::after{
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ec4899, #be185d);
    border-radius: 2px;
}
.hobbies-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}
.hobby-item{
    background: linear-gradient(135deg, #fff 0%, #fce7f3 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    border: 1px solid rgba(236, 72, 153, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.hobby-item::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ec4899, #be185d);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}
.hobby-item:hover::before{
    transform: scaleY(1);
}

.hobby-item:hover{
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
    border-color: rgba(236, 72, 153, 0.3);
}

.hobby-item:active{
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}

.hobby-icon{
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ec4899, #be185d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.hobby-item:hover .hobby-icon{
    transform: scale(1.1) rotate(5deg);
}
.hobby-content{
    flex: 1;
}
.hobby-content h3{
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}
.hobby-content p{
    color: #374151;
    line-height: 1.6;
    font-size: 14px;
}

/* reveal utility */
.reveal{
    opacity: 0;
    transform: translateY(16px);
}
.reveal.in-view{
    animation: fadeUp .7s ease both;
}



/* contact-section  */
.contact-section{
    padding: 0 50px;
    margin-bottom: 100px;
}
.contact-section h2{
    text-align: center;
    font-size: 35px;
    margin-bottom: 50px;
    position: relative;
    animation: fadeInDown 0.8s ease-out forwards;
    /* Fallback for browsers that don't support animations */
    opacity: 1;
    transform: translateY(0);
}
.contact-section h2::after{
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--link-color), #667eea);
    border-radius: 2px;
}

.contact-container{
    display: flex;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}



.contact-form{
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    border: 1px solid rgba(74, 118, 238, 0.1);
    animation: slideInUp 0.8s ease-out 0.2s forwards;
    /* Fallback for browsers that don't support animations */
    opacity: 1;
    transform: translateY(0);
}

.contact-form h3{
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.contact-form p{
    color: #374151;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.form-group{
    margin-bottom: 20px;
}
.form-group input,
.form-group textarea{
    width: 100%;
    font-family: 'Poppins';
    border: 2px solid #e5e7eb;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    outline: none;
    resize: none;
    transition: all 0.3s ease;
    font-size: 16px;
    animation: slideInLeft 0.6s ease-out forwards;
}

.form-group:nth-child(1) input { animation-delay: 0.3s; }
.form-group:nth-child(2) input { animation-delay: 0.4s; }
.form-group:nth-child(3) input { animation-delay: 0.5s; }
.form-group:nth-child(4) textarea { animation-delay: 0.6s; }

.form-group input:focus,
.form-group textarea:focus{
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(74, 118, 238, 0.1);
}

.form-group input:hover,
.form-group textarea:hover{
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-form button{
    width: 100%;
    font-size: 16px;
    font-family: 'Poppins';
    color: #fff;
    background: linear-gradient(135deg, var(--link-color), #667eea);
    border: none;
    height: 55px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    animation: slideInUp 0.6s ease-out 0.7s forwards;
}

.contact-form button:hover{
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 118, 238, 0.3);
}

.contact-form button:disabled{
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form messages */
.form-message{
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    animation: slideIn 0.3s ease;
}

.form-message.success{
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error{
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.form-message i{
    font-size: 18px;
}

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

/* footer */
.footer{
    background: linear-gradient(135deg, #1a1c20 0%, #2d3748 100%);
    color: white;
    padding: 60px 50px 20px;
    margin-top: 50px;
}

.footer-content{
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3,
.footer-section h4{
    color: white;
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section p{
    color: #cbd5e0;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-links{
    display: flex;
    gap: 15px;
}

.social-links a{
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--link-color), #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover{
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 25px rgba(74, 118, 238, 0.5);
    background: linear-gradient(135deg, #667eea, var(--link-color));
}

.social-links a:active{
    transform: translateY(-2px) scale(0.95);
    transition: all 0.1s ease;
}

.footer-section ul{
    list-style: none;
}

.footer-section ul li{
    margin-bottom: 12px;
}

.footer-section ul li a{
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover{
    color: var(--link-color);
}

.footer-section ul li i{
    margin-right: 10px;
    color: var(--link-color);
}

.footer-bottom{
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
}

/* entrance animations for hero text */
.hero-section .text h2, .hero-section .text p, .hero-section .text .links{
    opacity: 0;
    animation: fadeUp .7s ease both;
}
.hero-section .text h2{ animation-delay: .05s; }
.hero-section .text p{ animation-delay: .15s; }
.hero-section .text .links{ animation-delay: .25s; }



/* respect user motion preferences */
@media (prefers-reduced-motion: reduce){
    *{
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* mobile */
@media (max-width:740px){
    .hero-section{
        flex-direction: column-reverse;
    }
    .hero-section .headshot img{
    width: 310px;
    height: 300px;
    }
    .hero-section .text h2{
    font-size: 20px;
    }

    .contact-container{
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info{
        gap: 20px;
    }
    
    .contact-item{
        padding: 20px;
    }
    
    .contact-icon{
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .contact-form{
        padding: 30px 25px;
    }
    
    .footer-content{
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .social-links{
        justify-content: center;
    }

    /* skills section mobile animation - same as tablet */
    .skills-section{ 
        overflow: visible !important; 
    }
    .skills-section .cells{ 
        animation: none !important; 
        flex-wrap: wrap !important; 
        justify-content: center;
        gap: 16px;
        max-width: 100%;
        transform: none !important;
        will-change: auto !important;
        overflow: visible !important;
    }
    
    .skills-section .cells .cell {
        min-width: 160px;
        padding: 10px 18px;
        animation: fadeInUp 0.6s ease both;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        display: flex !important;
    }
    
    .skills-section .cells .cell:nth-child(1) { animation-delay: 0.1s; }
    .skills-section .cells .cell:nth-child(2) { animation-delay: 0.2s; }
    .skills-section .cells .cell:nth-child(3) { animation-delay: 0.3s; }
    .skills-section .cells .cell:nth-child(4) { animation-delay: 0.4s; }
    .skills-section .cells .cell:nth-child(5) { animation-delay: 0.5s; }
    .skills-section .cells .cell:nth-child(6) { animation-delay: 0.6s; }
    .skills-section .cells .cell:nth-child(7) { animation-delay: 0.7s; }
    .skills-section .cells .cell:nth-child(8) { animation-delay: 0.8s; }
    .skills-section .cells .cell:nth-child(9) { animation-delay: 0.9s; }
    
    /* Hide duplicate skills on mobile (skills 10-18 are duplicates) */
    .skills-section .cells .cell:nth-child(n+10) {
        display: none !important;
    }
    
    /* Ensure mobile skills are visible after animation */
    .skills-section .cells .cell:nth-child(-n+9) {
        opacity: 1 !important;
        transform: translateY(0) !important;
        visibility: visible !important;
        display: flex !important;
    }
    
    /* Mobile skills hover effects - same as tablet */
    .skills-section .cells .cell:hover {
        transform: translateY(-8px) scale(1.08);
        box-shadow: 0 20px 40px rgba(74, 118, 238, 0.25);
        background: linear-gradient(135deg, #fff, #f8fafc);
    }
    
    .skills-section .cells .cell:active {
        transform: translateY(-4px) scale(1.02);
        transition: all 0.1s ease;
    }
    
    /* Mobile skills icon animation - same as tablet */
    .skills-section .cells .cell:hover img {
        transform: scale(1.2) rotate(5deg);
        transition: transform 0.3s ease;
    }
    
    /* Mobile skills text animation - same as tablet */
    .skills-section .cells .cell:hover span {
        color: var(--link-color);
        transform: translateX(3px);
        transition: all 0.3s ease;
    }
    
    /* Hide span text on mobile */
    .skills-section .cells .cell span {
        display: none !important;
    }
    
    /* Remove borders on mobile */
    .skills-section .cells .cell {
        border: none !important;
        box-shadow: none !important;
    }
    
    /* Increase skill image size on mobile */
    .skills-section .cells .cell img {
        width: 48px !important;
        height: 48px !important;
    }
    
    /* Mobile skills text animation */
    .skills-section .cells .cell:hover span {
        color: var(--link-color);
        transform: translateX(2px);
        transition: all 0.3s ease;
    }

    /* education timeline mobile */
    .education-section .timeline::before{
        left: 20px;
    }
    .education-section .timeline-item{
        flex-direction: column;
        align-items: flex-start;
    }
    .education-section .timeline-item:nth-child(odd) .timeline-content,
    .education-section .timeline-item:nth-child(even) .timeline-content{
        margin: 0;
        text-align: left;
        padding: 20px 20px 20px 50px;
        width: 100%;
    }
    .education-section .timeline-dot{
        left: 20px;
    }

    /* experience mobile */
    .experience-section .experience-container{
        gap: 20px;
    }
    .experience-item{
        padding: 20px;
    }
    .experience-header{
        gap: 15px;
    }
    .experience-icon{
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .experience-info h3{
        font-size: 20px;
    }
    .tech-stack{
        gap: 6px;
    }
    .tech-tag{
        padding: 4px 10px;
        font-size: 11px;
    }

    /* certifications mobile */
    .certifications-container{
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .certification-item{
        padding: 20px;
        gap: 15px;
    }
    .certification-icon{
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    .certification-content h3{
        font-size: 18px;
    }
    .certification-content .description{
        font-size: 13px;
    }

    /* hobbies mobile */
    .hobbies-container{
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hobby-item{
        padding: 20px;
        gap: 15px;
    }
    .hobby-icon{
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    .hobby-content h3{
        font-size: 18px;
    }
    .hobby-content p{
        font-size: 13px;
    }
}
@media (max-width:850px){
    .hero-section .text h2{
        font-size: 20px;
    }
}
@media (max-width:600px){
    nav{
        padding: 0 18px;
    }
    nav .right a{
        font-size: 22px;
    }
    nav .right a:last-child{
        color:var(--text-color);
        background-color: transparent;
        padding: 0;
    }
    nav .right a span{
        display: none;
    }

    /* section1 */
    .hero-section{
        padding: 0 20px;
    }
    .hero-section .text h2{
        font-size: 25px;
    }
 
    /* skills section - same as tablet */
    .skills-section{ 
        padding: 0 18px; 
        overflow: visible !important; 
    }
    .skills-section .cells{ 
        animation: none !important; 
        gap: 16px; 
        flex-wrap: wrap !important; 
        justify-content: center;
        max-width: 100%;
        transform: none !important;
        will-change: auto !important;
        overflow: visible !important;
    }
    
    .skills-section .cells .cell {
        min-width: 160px;
        padding: 10px 18px;
        animation: fadeInUp 0.6s ease both;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        display: flex !important;
    }
    
    .skills-section .cells .cell:nth-child(1) { animation-delay: 0.1s; }
    .skills-section .cells .cell:nth-child(2) { animation-delay: 0.2s; }
    .skills-section .cells .cell:nth-child(3) { animation-delay: 0.3s; }
    .skills-section .cells .cell:nth-child(4) { animation-delay: 0.4s; }
    .skills-section .cells .cell:nth-child(5) { animation-delay: 0.5s; }
    .skills-section .cells .cell:nth-child(6) { animation-delay: 0.6s; }
    .skills-section .cells .cell:nth-child(7) { animation-delay: 0.7s; }
    .skills-section .cells .cell:nth-child(8) { animation-delay: 0.8s; }
    .skills-section .cells .cell:nth-child(9) { animation-delay: 0.9s; }
    
    /* Hide duplicate skills on small mobile (skills 10-18 are duplicates) */
    .skills-section .cells .cell:nth-child(n+10) {
        display: none !important;
    }
    
    /* Ensure small mobile skills are visible after animation */
    .skills-section .cells .cell:nth-child(-n+9) {
        opacity: 1 !important;
        transform: translateY(0) !important;
        visibility: visible !important;
        display: flex !important;
    }
    
    /* Small mobile skills hover effects - same as tablet */
    .skills-section .cells .cell:hover {
        transform: translateY(-8px) scale(1.08);
        box-shadow: 0 20px 40px rgba(74, 118, 238, 0.25);
        background: linear-gradient(135deg, #fff, #f8fafc);
    }
    
    .skills-section .cells .cell:active {
        transform: translateY(-4px) scale(1.02);
        transition: all 0.1s ease;
    }
    
    /* Small mobile skills icon animation - same as tablet */
    .skills-section .cells .cell:hover img {
        transform: scale(1.2) rotate(5deg);
        transition: transform 0.3s ease;
    }
    
    /* Small mobile skills text animation - same as tablet */
    .skills-section .cells .cell:hover span {
        color: var(--link-color);
        transform: translateX(3px);
        transition: all 0.3s ease;
    }
    
    /* Hide span text on small mobile */
    .skills-section .cells .cell span {
        display: none !important;
    }
    
    /* Remove borders on small mobile */
    .skills-section .cells .cell {
        border: none !important;
        box-shadow: none !important;
    }
    
    /* Increase skill image size on small mobile */
    .skills-section .cells .cell img {
        width: 48px !important;
        height: 48px !important;
    }


    .contact-section{
        padding: 0 20px;
    }
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* The actual timeline (the vertical ruler) */
.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: white;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

/* Container around content */
.container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* The circles on the timeline */
.container::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  right: -17px;
  background-color: white;
  border: 4px solid #FF9F55;
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

/* Place the container to the left */
.left {
  left: 0;
}

/* Place the container to the right */
.right {
  left: 50%;
}

/* Add arrows to the left container (pointing right) */
.left::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid white;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent white;
}

/* Add arrows to the right container (pointing left) */
.right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid white;
  border-width: 10px 10px 10px 0;
  border-color: transparent white transparent transparent;
}

/* Fix the circle for containers on the right side */
.right::after {
  left: -16px;
}

/* The actual content */
.content {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: 6px;
}

/* Media queries - Responsive timeline on screens less than 600px wide */
@media screen and (max-width: 600px) {
/* Place the timelime to the left */
  .timeline::after {
    left: 31px;
  }

/* Full-width containers */
  .container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

/* Hide all arrows on mobile */
  .container::before,
  .left::before,
  .right::before {
    display: none;
  }

/* Make sure all circles are at the same spot */
  .left::after, .right::after {
    left: 15px;
  }

/* Make all right containers behave like the left ones */
  .right {
    left: 0%;
    }
}

/* Contact form animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Interactive animations */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}