/* styles.css - Updated with all text fitting fixes */

/* Modern Color Scheme */
:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --text: #495057;
    --text-light: #6c757d;
    --white: #ffffff;
    --success: #4cc9f0;
    
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden;
}

/* Gradient Background Sections */
.gradient-bg {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.dark-gradient-bg {
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    color: var(--white);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--primary);
    border-radius: 5px;
}

.dark-gradient-bg .section-title::after {
    background: var(--accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
    background: var(--secondary);
}

.btn::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: 0.5s;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

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

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    transition: var(--transition);
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
}

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

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
}

nav ul li a:hover {
    color: var(--primary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(67, 97, 238, 0.7), rgba(247, 37, 133, 0.5));
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-content h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(247, 37, 133, 0.3);
    z-index: -1;
    transform: skewX(-15deg);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-img {
    flex: 1;
    position: relative;
    min-width: 300px;
}

.about-img img {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transform: rotate(-2deg);
    transition: var(--transition);
}

.about-img:hover img {
    transform: rotate(0deg);
}

.about-img::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid var(--primary);
    border-radius: 10px;
    top: 15px;
    left: 15px;
    z-index: -1;
    transition: var(--transition);
}

.about-img:hover::before {
    top: 10px;
    left: 10px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1rem;
    word-wrap: break-word;
    hyphens: auto;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.skill-card {
    background-color: var(--white);
    padding: 30px 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

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

.skill-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.skill-card:hover i {
    transform: scale(1.1);
    color: var(--accent);
}

.skill-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.skill-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Education Section */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 8px;
}

.timeline-item {
    padding: 10px 30px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 3px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--white);
    position: relative;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.timeline-content p {
    margin-bottom: 5px;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.timeline-content p strong {
    color: var(--dark);
}

.download-cv {
    text-align: center;
    margin-top: 50px;
}

/* Interests Section */
.interests-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.interest-card {
    background-color: var(--white);
    padding: 30px 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.interest-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.interest-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.interest-card:hover i {
    color: var(--accent);
}

.interest-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.interest-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
}

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

.project-info p {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    word-wrap: break-word;
}

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

/* Contact Section */
.contact-container {
    display: flex;
    gap: 40px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.contact-info p {
    margin-bottom: 25px;
    font-size: 1rem;
    word-wrap: break-word;
}

.contact-info ul {
    list-style: none;
    margin-bottom: 30px;
}

.contact-info ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info ul li i {
    margin-right: 12px;
    color: var(--primary);
    font-size: 1.2rem;
    width: 20px;
    transition: var(--transition);
}

.contact-info ul li:hover i {
    color: var(--accent);
    transform: scale(1.1);
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.1rem;
}

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

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-family: inherit;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 25px 0;
    font-size: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

/* Scroll Reveal Animation */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) !important;
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
        white-space: normal;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .about-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::after {
        left: 18px;
    }
    
    .left::after, .right::after {
        left: 18px;
    }
    
    .right {
        left: 0%;
    }
    
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .header-container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin: 0 8px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .about-text h3 {
        font-size: 1.6rem;
    }
    
    .skills-container,
    .interests-container,
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .project-img {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
        margin-bottom: 10px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .about-img {
        min-width: auto;
    }
    
    .project-info h3,
    .skill-card h3,
    .interest-card h3 {
        font-size: 1.3rem;
    }
    
    .contact-info h3 {
        font-size: 1.6rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
}