/* Reset some browser defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

/* Apple-inspired base styles */
body {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    color: #1d1d1f;
    background-color: #ffffff;
}

/* For Safari and iOS devices */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Optional: Add custom scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Header styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

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

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

nav a {
    text-decoration: none;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #0066cc;
}

/* Hero section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background-color: #ffffff;
    margin-bottom: 0;
}

.hero-content {
    max-width: 700px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s forwards 0.3s;
}

.hero h1 {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #6e6e73;
    margin-bottom: 15px;
}

.hero p {
    font-size: 21px;
    color: #6e6e73;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
}

.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

/* Common section styles */
section {
    padding: 120px 20px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

section h2 {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    text-align: center;
}

/* Button styles */
.button {
    display: inline-block;
    background: linear-gradient(90deg, #007aff 0%, #0056d6 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 980px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.3); 
}


.learn-more {
    color: #0066cc;
    font-size: 17px;
    text-decoration: none;
    font-weight: 400;
    transition: 0.2s ease;
}

.learn-more span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.learn-more:hover span {
    transform: translateX(3px);
}

/* Education section */
.education-container {
    display: flex;
    align-items: center;
    gap: 50px;
    background-color: #f5f5f7;
    border-radius: 18px;
    padding: 40px;
    margin-top: 20px;
}

.education-image {
    flex: 0 0 150px;
}

.education-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.education-text {
    flex: 1;
}

.education-text h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.education-degree {
    font-size: 20px;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.education-specialization {
    font-size: 18px;
    color: #6e6e73;
    margin-bottom: 10px;
}

.education-status {
    font-size: 16px;
    color: #0066cc;
    font-weight: 500;
}

/* Projects section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.project-item {
    background-color: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

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

.project-item:hover .project-image img {
    transform: scale(1.05);
}

.project-text {
    padding: 25px;
}

.project-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.project-text p {
    font-size: 15px;
    color: #6e6e73;
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tech span {
    background-color: #f5f5f7;
    color: #6e6e73;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* More Projects Section */
.more-projects {
  text-align: center;
  margin-top: 40px;
}

.more-projects a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.more-projects a:hover {
  color: #0071e3;
}

/* Research section */
.research-item {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 60px;
    background-color: #fff;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.research-item:nth-child(even) {
    flex-direction: row-reverse;
}

.research-image {
    flex: 0 0 40%;
    overflow: hidden;
    border-radius: 12px;
}

.research-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.research-item:hover .research-image img {
    transform: scale(1.03);
}

.research-text {
    flex: 1;
}

.research-text h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

.research-text p {
    font-size: 17px;
    color: #6e6e73;
    margin-bottom: 20px;
    line-height: 1.6;
}

.research-status {
    font-style: italic;
    color: #0066cc;
}

/* Book section */
.book-container {
    display: flex;
    align-items: center;
    gap: 50px;
    background: linear-gradient(to right, #f5f5f7, #fbfbfd);
    border-radius: 18px;
    padding: 60px;
    margin-top: 20px;
}

.book-image {
    flex: 0 0 300px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: transform 0.5s ease;
}

.book-image:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.book-text {
    flex: 1;
}

.book-text h3 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.015em;
}

.book-text p {
    font-size: 17px;
    color: #6e6e73;
    margin-bottom: 20px;
    line-height: 1.6;
}

.book-details {
    list-style: none;
    margin: 25px 0;
}

.book-details li {
    margin-bottom: 10px;
    font-size: 17px;
}

.book-note {
    color: #0066cc;
    font-weight: 500;
    font-size: 18px;
}

/* Contact section */
#contact {
    text-align: center;
    padding-bottom: 80px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #1d1d1f;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
    color: #0066cc;
}

.social-link i {
    font-size: 32px;
    margin-bottom: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #f5f5f7;
    font-size: 14px;
    color: #6e6e73;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 48px;
    }
    
    .hero h2 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .research-item, 
    .research-item:nth-child(even),
    .education-container,
    .book-container {
        flex-direction: column;
        text-align: center;
    }
    
    .research-image, 
    .education-image,
    .book-image {
        margin-bottom: 30px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 20px;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
    
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none; /* In a real site, you'd add a mobile menu */
    }
    
    section {
        padding: 80px 20px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero h2 {
        font-size: 20px;
    }
    
    section h2 {
        font-size: 32px;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
}

/* Freelance Projects Section */
#freelance-projects {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh; /* Ensures it takes the full height of the viewport */
    text-align: center;
    background-color: #ffffff; /* Optional: Add a background color */
    padding: 20px;
    border-radius: 24px;
}

#freelance-projects .projects-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#freelance-projects .project-item {
    max-width: 600px; /* Optional: Limit the width of the project card */
    margin: 20px 0;
}

#freelance-projects .project-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px; /* Optional: Add rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Add a shadow */
}

/* Achievements Section */
.achievements-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px auto;
    max-width: 1000px; /* Reduced from full width */
}

.achievement-item {
    background-color: #fff;
    border-radius: 12px; /* Reduced from 18px */
    padding: 20px 15px; /* Reduced padding */
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.achievement-item:hover {
    transform: translateY(-5px); /* Reduced from -10px */
}

.achievement-icon {
    font-size: 28px; /* Reduced from 40px */
    color: #007aff;
    margin-bottom: 12px; /* Reduced from 20px */
}

.achievement-item h3 {
    font-size: 16px; /* Reduced from 20px */
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.achievement-item p {
    font-size: 14px; /* Reduced from 16px */
    color: #6e6e73;
    margin: 0;
    line-height: 1.4;
}

/* Blog Section */
.blog-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.blog-post {
    background-color: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-10px);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 25px;
}

.blog-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f;
}

.blog-content p {
    font-size: 16px;
    color: #6e6e73;
    margin-bottom: 15px;
}

.blog-date {
    font-size: 14px;
    color: #86868b;
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .achievements-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .achievements-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
        gap: 15px;
    }
    
    .achievement-item {
        padding: 15px 12px;
    }
}

/* Resume Section */
#resume {
    background-color: #f5f5f7;
    text-align: center;
}

.resume-container {
    max-width: 600px;
    margin: 0 auto;
}

.resume-preview {
    background-color: #fff;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.resume-preview:hover {
    transform: translateY(-5px);
}

.resume-preview i.fa-file-pdf {
    font-size: 60px;
    color: #007aff;
    margin-bottom: 20px;
}

.resume-preview h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.resume-preview p {
    font-size: 16px;
    color: #6e6e73;
    margin-bottom: 25px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #007aff;
    color: white;
    padding: 12px 24px;
    border-radius: 980px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.download-button:hover {
    background-color: #0056d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.3);
}

.download-button i {
    font-size: 18px;
}

/* Add this to your existing media queries if needed */
@media (max-width: 768px) {
    .resume-container {
        padding: 0 20px;
    }
    
    .resume-preview {
        padding: 30px;
    }
}

.experience-section {
    padding: 60px 0;
    background: #f9f9f9;
    border-radius: 24px;
}

.experience-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 600;
}

.experience-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.experience-item {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.3s;
}

.experience-item:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.experience-role-company {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.experience-role-company h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0;
}

.experience-role-company h4 {
    font-size: 1.1rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 0;
}

.experience-details {
    margin-top: 8px;
}

.experience-duration {
    display: inline-block;
    font-size: 0.95rem;
    color: #0071e3;
    margin-bottom: 8px;
}

