
/* Modern Color Palette */
:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --secondary-dark: #0d9a6b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --light-gray: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    padding-top: 80px;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

section {
    padding: 4rem 3rem;
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

nav h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

nav h1 span {
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.cta-button {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-button span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 3rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-image {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
}

.portrait {
    width: 100%;
    max-width: 300px;
    border-radius: var(--radius);
    z-index: 2;
    box-shadow: var(--shadow);
}

.pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary-light);
    opacity: 0.1;
    border-radius: var(--radius);
    transform: rotate(-5deg);
    z-index: 1;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

/* Buttons */
.primary-button {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    min-width: 0;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.primary-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.secondary-button {
    background-color: var(--white);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex; /* Changed from inline-block */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
    white-space: nowrap; /* Prevents text wrapping */
    overflow: hidden; /* Safety measure */
    text-overflow: ellipsis; /* Adds ... if text is too long */
    min-width: 0; /* Allows text scaling */
    font-size: clamp(0.875rem, 2vw, 1rem); /* Responsive text scaling */
}

.secondary-button:hover {
    background-color: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.tools-accent {
  background-color: var(--secondary);
  color: rgb(255, 255, 255);
  padding: 0.35rem 0.5rem; /* tighter spacing */
  border-radius: 9999px; /* pill shape */
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  font-size: clamp(0.75rem, 1.8vw, 0.875rem);
  line-height: 1; 
}

/* Section Titles */
.section-title {
    position: relative;
    margin-bottom: 2rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 3rem;
}

/* About Section */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    max-width: 800px;
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.skill-card {
    background-color: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Project Tabs */
.project-tabs {
    margin-top: 2rem;
}

.tab-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.nav-arrow {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  opacity: 0.7;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-arrow:hover {
  opacity: 1;
  transform: scale(1.1);
}

.nav-arrow svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.tab-buttons {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  gap: 8px;
  padding-bottom: 6px; /* Reduced space below tabs */
  scrollbar-width: thin; /* Firefox - makes scrollbar thinner than default */
  scrollbar-color: var(--primary-light) transparent; /* Makes Firefox track transparent */
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* Webkit browsers (Chrome, Safari, Edge) */
.tab-buttons::-webkit-scrollbar {
  height: 1px; /* Ultra-thin 1px scrollbar */
}

.tab-buttons::-webkit-scrollbar-track {
  background: transparent; /* Fully transparent track */
  margin: 0 20px; /* Contains scrollbar within content area */
}

.tab-buttons::-webkit-scrollbar-thumb {
  background: var(--primary); 
  border-radius: 1px;
  transition: background-color 0.2s;
}

.tab-buttons::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark); /* Slightly darker on hover */
  height: 2px; /* Slightly thicker on hover */
}

/* Firefox specific tweaks */
@supports (scrollbar-color: red blue) {
  .tab-buttons {
    scrollbar-color: var(--primary) transparent;
    padding-bottom: 4px; /* Even less space in Firefox */
  }
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  color: var(--gray);
  border-radius: 8px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--primary);
  background-color: rgba(79, 70, 229, 0.1);
}

.tab-btn.active {
  color: var(--primary);
  background-color: rgba(79, 70, 229, 0.1);
  position: relative;
}

.tab-btn.active:after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 50%;
  width: 0%;
  height: 2px;
  background-color: var(--primary-light);
  transform: translateX(-50%);
}

/* Tab Content */
.tab-content {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-item {
    display: none;
    padding: 2.5rem;
}

.tab-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-details {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.project-info {
    flex: 1;
}

.project-image {
    flex: 1;
}

.project-image img {
    width: 80%;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 4px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 0px;
    box-shadow: var(--shadow);
    display: block;
}

.project-image a.image-link {
  display: block;
  width: 80%;
  margin: 0 auto;
}

.project-image a.image-link img {
  border: 4px solid var(--primary-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  width: 100%;
}

.project-description {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.project-features {
    margin-bottom: 2rem;
    list-style-position: inside;
}

.project-features li {
    margin-bottom: 0.5rem;
    padding-left: 1.2em;
    text-indent: -1.2em;
}

.project-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap; /* Wrap buttons on mobile */
}

/* Testimonials */
.testimonials {
    background-color: var(--white);
    padding: 4rem 3rem;
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    background-color: var(--light);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.testimonial-text {
    font-size: 1.125rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.author-name {
    font-weight: 600;
    color: var(--dark);
}

.author-title {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Contact Section */
.contact-methods {
    display: flex;
    flex-direction: row; /* Changed from column to row */
    flex-wrap: wrap; /* Allows wrapping if needed */
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: center; /* Vertically center items */
}

/* Keep all other existing contact styles the same */
.contact-methods {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: center;
}

/* Add vertical bars between contact links */
.contact-link:not(:last-child)::after {
    content: "|";
    margin-left: 1.5rem; /* Matches the gap */
    color: var(--white);
    opacity: 0.7;
}

/* Keep all other existing styles */
.contact-section {
    background-color: var(--primary);
    color: var(--white);
    padding: 4rem 3rem;
}

.contact-section .section-title {
    color: var(--white);
}

.contact-section .section-title:after {
    background-color: var(--white);
}

.contact-container {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.contact-link:hover {
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-methods {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Remove bars on mobile */
    .contact-link:not(:last-child)::after {
        content: none;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius);
    border: none;
    font-family: inherit;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 {
    font-size: 2.5rem;
    }
    
    h2 {
    font-size: 2rem;
    }
    
    .hero {
    padding: 2rem 1rem;
    }
    
    section {
    padding: 3rem 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }

    .hero-content {
        margin-bottom: 2rem;
        max-width: 100%;
    }
    
    .hero-image {
        max-width: 350px;
        margin: 0 auto;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem 2rem;
    }

    .nav-links a:after {
        display: none;
    }

    /* Fixed Tab Navigation */
    .project-tabs {
        position: relative;
    }

    .tab-navigation {
        display: flex;
        align-items: center;
        position: relative;
        width: 100%;
    }

    .nav-arrow {
        position: static; /* Changed from absolute to prevent vertical movement */
        width: 36px;
        height: 36px;
        background: var(--white);
        border: 1px solid var(--primary-light);
        border-radius: 4px;
        z-index: 2;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        flex-shrink: 0;
        margin: 0;
    }

    .tab-buttons {
        flex: 1;
        overflow-x: auto;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        padding: 0 8px;
        margin: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        display: flex;
        gap: 8px;
    }

    .tab-buttons::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        scroll-snap-align: start;
        flex-shrink: 0;
        position: relative;
        padding: 8px 16px;
        white-space: nowrap;
    }

    .tab-btn.active:after {
        bottom: -0.6rem;
    }

    .mobile-menu-button {
        display: block;
    }

    .mobile-menu-button.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-button.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-button.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .project-details {
        flex-direction: column;    
    }

    .project-image {
        order: -1;
    }

    .project-image img {
        width: 100%;
        max-width: 500px;
        margin-top: 2rem;
    }

    .contact-container {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .skills-grid {
        gap: 1.5rem;
    }
    
    .skill-card {
        padding: 1.5rem;
    }

    .skill-card h3 {
        font-size: clamp(1.1rem, 3vw, 1.5rem);
    }

    .skill-card p {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
    }
    
    .testimonials {
        padding: 2rem 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    nav {
        padding: 1rem;
    }
    
    section {
        padding: 2rem 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-card {
        padding: 1.25rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}