/* Base styles and variables */
:root {
    --primary-color: #0066cc;
    --secondary-color: #004d99;
    --accent-color: #ff6b00;
    --background-color: #ffffff;
    --secondary-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #000000;
    --light-text: #666666;
    --border-color: #e6e6e6;
    --transition: all 0.25s ease;
    --box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 5px 30px rgba(0, 0, 0, 0.1);
    --section-spacing: 100px;
    --border-radius: 8px;
}

/* Reset and global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--section-spacing) 0;
}

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

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

ul {
    list-style: none;
}

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

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Header styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--background-color);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

nav ul {
    display: flex;
}

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

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 6px 0;
    transition: var(--transition);
}

/* About section */
.about {
    margin-top: 80px;
}

.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--light-text);
}

/* Enhanced Social Links */
.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
  }
  
  .social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
  }
  
  /* Brand-specific colors */
  .social-links a:nth-child(1) {
    background-color: #000000;
    color: white;
  }
  
  .social-links a:nth-child(2), 
  .social-links a:nth-child(3) {
    background-color: #333;
    color: white;
  }
  
  .social-links a:nth-child(4) {
    background-color: #0066cc;
    color: white;
  }
  
  /* Hover effects */
  .social-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
  }
  
  .social-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: height 0.3s ease;
    z-index: 1;
  }
  
  .social-links a:hover::after {
    height: 100%;
  }
  
  .social-links a i {
    position: relative;
    z-index: 2;
  }

/* Projects section */
.projects {
    background-color: var(--secondary-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.project-image {
    width: 100%;
    position: relative;
    padding-bottom: 100%; /* Creates a perfect square */
    overflow: hidden;
    background-color: #f8f9fa;
}

/* Position image absolutely within the square container */
.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 80%; /* Leave some margin around */
    height: 80%;
    object-fit: contain;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

/* Slightly enhance the hover effect */
.project-card:hover .project-image img {
    width: 85%;
    height: 85%;
}

.project-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--light-text);
    margin-bottom: 20px;
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-links {
    margin-top: auto;
}

.project-links a {
    display: inline-block;
    margin-right: 15px;
    font-weight: 600;
    padding: 8px 0;
}

.project-links a i {
    margin-right: 5px;
}

/* Skills section */
.skills {
    background-color: var(--background-color);
}

.skills-content {
    text-align: center;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skill-tags span {
    background-color: var(--secondary-bg);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.skill-tags span:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

/* Education section */
.education {
    background-color: var(--secondary-bg);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 50px;
}

.timeline-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    left: 13px;
    top: 15px;
    z-index: 1;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

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

.timeline-content p {
    color: var(--light-text);
    margin-bottom: 5px;
}

.timeline-content p:last-child {
    margin-bottom: 0;
}

/* Contact section */
.contact {
    background-color: var(--background-color);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.contact-item {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.contact-item p a {
    color: var(--text-color);
    font-weight: 500;
}

.contact-item p a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 40px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer .social-links a {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

footer .social-links a:hover {
    background-color: var(--primary-color);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Responsive styles */
@media (max-width: 992px) {
    :root {
        --section-spacing: 80px;
    }
    
    .about-content {
        grid-template-columns: 250px 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: 70px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--background-color);
        text-align: center;
        padding-top: 50px;
        transition: var(--transition);
    }
    
    nav.show {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(8px, 6px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -6px);
    }
    
    footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    :root {
        --section-spacing: 60px;
    }
    
    html {
        font-size: 14px;
    }
    
    .section-title {
        text-align: center;
        display: block;
    }
    
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        right: 20px;
        bottom: 20px;
    }
}

.project-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.project-image a:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Companies section */
.companies {
    background-color: var(--secondary-bg);
}

.companies-grid {
    display: flex;
    justify-content: left;
    gap: 30px;
}

.companies-grid .project-card {
    max-width: 320px;
    width: 100%;
}

/* For responsive design */
@media (max-width: 576px) {
    .companies-grid .project-card {
        max-width: 100%;
    }
}

/* Products section */
.products {
    background-color: var(--background-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.products-grid .project-card {
    width: 100%;
    height: 100%;
}

/* For responsive design */
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.logo-link:hover {
    color: inherit;
}