/* ============================================
   CSS Variables & Reset
   ============================================ */

:root {
    /* Color Palette */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #f59e0b;
    
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-max-width: 1200px;
    
    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-primary);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

/* ============================================
   Navigation Bar
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.logo a span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   Home Section
   ============================================ */

.home-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0 60px;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.home-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.home-text {
    animation: fadeInUp 1s ease;
}

.greeting {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.name {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.2;
}

.title {
    font-size: 1.8rem;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 20px;
}

.description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.home-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-base);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

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

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.home-image {
    animation: fadeInRight 1s ease;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 10px solid var(--bg-primary);
    box-shadow: var(--shadow-xl);
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--primary-color);
    font-size: 2rem;
}

/* ============================================
   Section Styles
   ============================================ */

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto 15px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   About Section
   ============================================ */

.about-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.about-info h3,
.about-skills h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-family: var(--font-heading);
}

.info-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: var(--transition-base);
}

.info-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 3px;
}

.info-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-light);
}

.personal-summary {
    margin-bottom: 30px;
}

.personal-summary p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.download-cv-section {
    text-align: center;
}

.skills-category {
    margin-bottom: 35px;
}

.skills-category h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-category h4 i {
    color: var(--primary-color);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 18px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.95rem;
    color: var(--text-dark);
    border: 2px solid transparent;
    transition: var(--transition-base);
}

.skill-tag:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--text-white);
    transform: translateY(-2px);
}

.skill-tag.interest {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    color: var(--text-white);
}

/* ============================================
   Experience Section
   ============================================ */

.experience-section {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.experience-card {
    display: flex;
    gap: 30px;
    padding: 40px;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    transition: var(--transition-base);
}

.experience-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.education-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
}

.card-content {
    flex: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.date {
    padding: 5px 15px;
    background: var(--primary-light);
    color: var(--text-white);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-content h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.location {
    color: var(--text-light);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.coursework {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.coursework strong {
    display: block;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.coursework ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.coursework li {
    color: var(--text-light);
    padding-left: 20px;
    position: relative;
}

.coursework li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.achievements-section {
    margin-top: 50px;
}

.subsection-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-family: var(--font-heading);
    text-align: center;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.achievement-card {
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-base);
}

.achievement-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.achievement-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.achievement-card h4 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.achievement-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   Projects Section
   ============================================ */

.projects-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 35px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.project-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.project-meta h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.project-year {
    font-size: 0.9rem;
    color: var(--text-light);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 5px 12px;
    background: var(--bg-secondary);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.project-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-features {
    margin-bottom: 25px;
}

.project-features li {
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.project-features i {
    color: var(--primary-color);
    margin-top: 3px;
}

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

.project-link {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: var(--transition-base);
}

.project-link:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
}

/* ============================================
   Contact Section
   ============================================ */

.contact-section {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-card {
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-base);
}

.contact-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.contact-card h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.contact-card a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-card a:hover {
    color: var(--primary-dark);
}

.contact-form-wrapper {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.contact-form button {
    align-self: flex-start;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    transition: var(--transition-base);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ============================================
   Scroll to Top Button
   ============================================ */

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    z-index: 999;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

/* ============================================
   Animations
   ============================================ */

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

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 968px) {
    .home-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .home-text {
        text-align: center;
    }
    
    .home-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .image-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-card {
        flex-direction: column;
        text-align: center;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 30px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 15px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .home-buttons {
        flex-direction: column;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }
    
    .title {
        font-size: 1.2rem;
    }
    
    .image-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .contact-form-wrapper {
        padding: 25px;
    }
    
    .project-card {
        padding: 25px;
    }
}
