/* General Body Styles */
:root {
    --bg-color: #F5F9FE;
    --surface-color: #FFFFFF;
    --primary-color: #2563EB;
    --primary-light: #E0EEFF;
    --text-color: #2E3A59;
    --muted-color: #6B7280;
    --muted-bg-color: #E5E7EB;
    --accent-color: #EC4899;
    --success-color: #10B981;
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 5rem 3rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
}

header::after {
    content: "";
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

header .special-text {
    color: var(--primary-color);
    position: relative;
}

header p {
    font-size: 1.25rem;
    color: var(--muted-color);
    max-width: 600px;
    margin: 1rem auto;
}

header a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

header a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

header a:hover {
    color: var(--accent-color);
}

header a:hover::after {
    width: 100%;
}

/* Main Content Sections */
main > section {
    margin-bottom: 5rem;
}

/* Cards */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--surface-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-image-slice: 1;
    margin-top: 0.25rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card h3 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.card h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.entry h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.entry .year {
    font-size: 0.9rem;
    color: var(--muted-color);
    font-weight: 500;
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background-color: var(--primary-light);
    border-radius: 20px;
    margin-top: 0.25rem;
}

.entry:not(:last-child) {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--muted-bg-color);
}

/* Projects Section */
#projects h2, #skills h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

#projects h2::after, #skills h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.project-card {
    background-color: var(--surface-color);
    border: none;
    position: relative;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-content {
    position: relative;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.project-header h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.project-header h3 a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.project-header h3 a:hover {
    color: var(--primary-color);
}

.project-header h3 a:hover::after {
    width: 100%;
}

.project-year {
    background: linear-gradient(90deg, var(--primary-light), #EDE9FE);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.project-content p {
    color: var(--muted-color);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-content p strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Skills Section */
.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0 0 2rem;
}

.skill-badge {
    background: var(--surface-color);
    border: 1px solid var(--muted-bg-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.skill-badge[data-weight="5"] { font-size: 1.25rem; padding: 0.8rem 1.5rem; animation-delay: 0.1s; }
.skill-badge[data-weight="4"] { font-size: 1.1rem; padding: 0.7rem 1.3rem; animation-delay: 0.2s; }
.skill-badge[data-weight="3"] { font-size: 1rem; padding: 0.6rem 1.2rem; animation-delay: 0.3s; }
.skill-badge[data-weight="2"] { font-size: 0.9rem; padding: 0.5rem 1rem; animation-delay: 0.4s; color: var(--muted-color); }

.skill-badge i {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.skill-badge:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.skill-badge:hover i {
    color: #fff;
}

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

/* Footer */
footer {
    text-align: center;
    margin-top: 5rem;
    padding: 3rem 0;
    border-top: 1px solid var(--muted-bg-color);
    color: var(--muted-color);
    font-size: 1rem;
}

/* Scroll-triggered animation */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 2.5rem;
    background-color: var(--primary-color);
    animation: blink 0.7s infinite;
    margin-left: 5px;
    border-radius: 2px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .card-container {
        grid-template-columns: 1fr;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-year {
        margin-top: 0.75rem;
    }
}