/* ===== CSS Reset & Variables ===== */
:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --secondary-color: #6c63ff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-dark: #1a202c;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 8px;
    --border-radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* ===== Utility Classes ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn--secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn--full {
    width: 100%;
}

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav__logo:hover {
    color: var(--primary-dark);
}

.nav__menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav__link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary-color);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav__toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding-top: 70px;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__greeting {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.hero__avatar svg {
    width: 80%;
    height: 80%;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===== About Section ===== */
.about {
    background: var(--bg-primary);
}

.about__content {
    max-width: 800px;
    margin: 0 auto;
}

.about__text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
}

.info__item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info__label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== Projects Section ===== */
.projects {
    background: var(--bg-secondary);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-card__image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card__placeholder {
    width: 60px;
    height: 60px;
    color: white;
    opacity: 0.8;
}

.project-card__placeholder svg {
    width: 100%;
    height: 100%;
}

.project-card__content {
    padding: 1.5rem;
}

.project-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-card__description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-card__links {
    display: flex;
    gap: 1rem;
}

.project-card__link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-card__link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== Skills Section ===== */
.skills {
    background: var(--bg-primary);
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skill-category__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.skills__list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item__name {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.skill-item__bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-item__progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--bg-secondary);
}

.contact__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact__icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact__item h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact__item a,
.contact__item p {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.contact__item a:hover {
    color: var(--primary-color);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form__input,
.form__textarea {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__description {
        margin: 0 auto 2rem;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__image {
        order: -1;
    }

    .hero__avatar {
        width: 200px;
        height: 200px;
    }

    .contact__content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }

    .section__title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .nav__menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav__menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav__toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav__toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.5rem;
    }

    .projects__grid {
        grid-template-columns: 1fr;
    }

    .skills__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer__content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
