/* ===================================
   Reusable Components
   =================================== */

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Titles */
h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    font-weight: 700;
    letter-spacing: -1px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Buttons */
.btn {
    padding: 0.85rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    left: 0;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* Cards */
.skill-category {
    background: var(--light);
    padding: 2rem;
    border-radius: 20px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 80px;
    display: flex;
    flex-direction: column;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* Expanded/Hero state */
.skill-category.expanded {
    background: var(--gradient);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.3);
    border-color: transparent;
    z-index: 10;
    position: relative;
}

.skill-category.expanded::before {
    transform: scaleX(1);
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.skill-category.expanded::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.skill-category.expanded h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skill-category h3::after {
    content: '▶';
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.skill-category.expanded h3::after {
    content: '▼';
    transform: rotate(0deg);
    color: white;
}

.skill-category h4 {
    color: var(--dark);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.skill-category h4:first-of-type {
    margin-top: 0;
}

.skill-category.expanded h4 {
    opacity: 1;
    transform: translateY(0);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.skill-category-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    padding: 0 5px 15px 5px;
}

.skill-category.expanded .skill-category-content {
    max-height: 1000px;
    opacity: 1;
    overflow: visible;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Skill Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    margin: 0.5rem 0;
    padding: 5px;
}

.skill-category.expanded .skill-tags {
    opacity: 1;
    transform: translateY(0);
}

.skill-tag {
    background: white;
    color: var(--text);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 500;
    transform: scale(0.9);
    opacity: 0;
}

.skill-category.expanded .skill-tag {
    transform: scale(1);
    opacity: 1;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.skill-category.expanded .skill-tag:hover {
    background: white;
    color: var(--primary);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.skill-tag:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
    opacity: 0;
    animation: fadeInLeft 0.8s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -42px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
    z-index: 1;
}

/* Experience Cards */
.experience-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.experience-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateX(10px);
    border-left-color: var(--primary);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-title {
    font-size: 1.4rem;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.experience-company {
    color: var(--primary);
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.experience-company-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.4;
}

.experience-date {
    color: white;
    font-weight: 500;
    background: var(--gradient);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.experience-description {
    list-style: none;
    padding-left: 0;
}

.experience-description li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--text);
    line-height: 1.6;
}

.experience-description li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}