/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

.container {
    padding: 0 1rem;
}

/* Navigation Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.main-nav a:hover {
    opacity: 1;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10vw;
    position: relative;
}
.hero-section canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-section h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    overflow: visible;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    opacity: 0.7;
    max-width: 600px;
    overflow: hidden;
}

/* Animation Classes */
.animate-text {
    opacity: 1;
    transform: none;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Fix header/navigation for mobile */
    .site-header {
        padding: 1rem;
        background: rgba(15, 15, 15, 0.95); /* Always show background on mobile */
    }

    .main-nav {
        width: 100vw;
        height: 100dvh; /* Use dynamic viewport height for better mobile support */
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        transition: right 0.3s ease;
        padding: 5rem 2rem;
    }

    .main-nav.active {
        right: 0;
    }

    /* Improve mobile text sizing */
    .hero-section h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        text-align: center;
        padding: 0 1rem;
    }

    .subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
        text-align: center;
        padding: 0 1rem;
    }

    /* Fix section padding for mobile */
    .expertise-section,
    .skills-section,
    .portfolio-section,
    .experience-section,
    .contact-section {
        padding: 4rem 1rem;
    }

    /* Improve card layouts for mobile */
    .expertise-card,
    .tech-card,
    .skill-card {
        padding: 1.5rem;
    }

    /* Adjust grid layouts */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 1rem;
    }

    .prof-skills-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}

/* Add specific iPhone notch handling */
@supports (padding-top: env(safe-area-inset-top)) {
    .site-header {
        padding-top: calc(env(safe-area-inset-top) + 1rem);
    }

    .main-nav {
        padding-top: calc(env(safe-area-inset-top) + 5rem);
    }
}

/* Fix touch interactions */
@media (hover: none) {
    /* Remove hover effects on mobile */
    .tech-card:hover,
    .skill-card:hover,
    .expertise-card:hover {
        transform: none;
    }

    /* Improve touch targets */
    .main-nav a,
    .cta-button,
    .project-link {
        padding: 1rem;
        min-height: 44px; /* Minimum touch target size */
    }
}

/* Fix iOS momentum scrolling */
.main-nav,
.portfolio-slides,
.timeline {
    -webkit-overflow-scrolling: touch;
}

/* Add better support for foldable devices */
@media (max-width: 280px) {
    /* Extra small devices like Galaxy Fold */
    .hero-section h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .tech-grid {
        grid-template-columns: 1fr; /* Single column for very narrow screens */
    }
}

/* Fix landscape mode issues */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100dvh;
        padding: 4rem 1rem;
    }

    .main-nav {
        padding: 1rem;
        overflow-y: auto;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .site-header {
        padding: 0.8rem;
    }

    .main-nav ul {
        gap: 0.8rem;
    }

    .hero-section {
        justify-content: center;
    }

    .text-wrapper {
        width: 100%;
        padding: 0 1rem;
    }
}

/* Handle tall mobile devices */
@media (max-height: 700px) {
    .hero-section {
        padding-top: 4rem;
    }

    .scroll-prompt {
        bottom: 0.5rem;
    }
}

/* Handle landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 4rem 1.5rem 2rem;
    }

    .scroll-prompt {
        bottom: 1rem;
    }

    .site-header {
        padding: 0.5rem 1rem;
    }
}

/* Prevent overflow issues */
html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* Touch device optimizations */
@media (hover: none) {
    .cta-button:hover::before {
        width: 0;
        height: 0;
    }

    .char:hover {
        transform: none;
    }
}

/* Ensure smooth scrolling on iOS */
@supports (-webkit-touch-callout: none) {
    .hero-section, .about-section {
        min-height: -webkit-fill-available;
    }
}

/* Selection Style */
::selection {
    background: #ffffff;
    color: #0f0f0f;
}

/* Add this to your existing CSS file */
.cursor {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.site-header.scrolled {
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
}

/* Add new styles for the text wrapper */
.text-wrapper {
    max-width: 1200px;
    width: 100%;
}

.hero-section h1,
.hero-section .subtitle {
    opacity: 1;
}

/* When JavaScript is loaded, it will add this class */
.js-loaded .animate-text {
    opacity: 0;
    transform: translateY(100%);
}

/* Add these styles for the letter hover effect */
.char {
    display: inline-block;
    position: relative;
    transition: color 0.5s ease;
}

.char:hover {
    color: #64ffda; /* You can change this color to match your preference */
    transition: color 0.3s;
}

/* Update hero section styles to ensure chars work properly */
.hero-section h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    overflow: visible; /* Changed from hidden to visible */
}

.hero-section .char {
    transform-origin: center center;
}

/* Logo Styles */
.logo {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 1;
}

/* Update main-nav to work with new layout */
/* .main-nav {
    margin-left: auto; 
} */

/* CTA Button Styles */
.cta-button {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px; /* More square but still rounded edges */
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.cta-button:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Expanding dot effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.cta-button:hover::before {
    width: 300px;  /* Large enough to cover the button */
    height: 300px;
}

/* Add text color transition */
.cta-button span {
    position: relative;
    z-index: 1;
    transition: color 0.6s ease;
}

.cta-button:hover span {
    color: #0f0f0f; /* Text becomes dark on white background */
}

/* About Section Styles */
.about-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10vw;
    background-color: #0f0f0f;
}

.about-section .scroll-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.4;
    max-width: 1000px;
}

.about-section .scroll-text .char {
    color: #4a4a4a;
    transition: color 0.3s ease;
    display: inline-block;
}

/* Ensure line breaks work properly with split text */
.about-section .scroll-text br {
    display: block;
    content: "";
    margin-top: 1em;
}

/* Scroll Prompt Styles (completely separate) */
.scroll-prompt {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.scroll-prompt .scroll-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
    animation: bounceArrow 2s infinite;
}

.scroll-arrow:hover {
    transform: translateY(5px);
}

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

/* Scroll Prompt Text (separate styling) */
.scroll-prompt .scroll-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hamburger Menu Styles - Now visible on all devices */
.hamburger {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

/* Hide the regular nav items */
.main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 15, 15, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.main-nav.active {
    transform: translateX(0);
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-size: 2rem;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-nav.active a {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the nav items animation */
.main-nav.active li:nth-child(1) a { transition-delay: 0.1s; }
.main-nav.active li:nth-child(2) a { transition-delay: 0.2s; }
.main-nav.active li:nth-child(3) a { transition-delay: 0.3s; }
.main-nav.active li:nth-child(4) a { transition-delay: 0.4s; }

/* Header layout */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem 1.5rem;
    }

    .main-nav a {
        font-size: 1.5rem; /* Smaller font for mobile */
    }
}

/* Add body class for when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Hamburger icon styles */
.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease;
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    bottom: -8px;
}

/* Hamburger Animation */
.hamburger.active .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::before {
    transform: translateY(8px) rotate(90deg);
}

.hamburger.active .hamburger-inner::after {
    transform: translateY(-8px) rotate(90deg);
    opacity: 0;
}

/* Backdrop blur when menu is open */
.main-nav {
    backdrop-filter: blur(10px);
}

/* Loader Styles */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: #0f0f0f;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
    will-change: opacity; /* Optimize for animation */
}

.loader.fade-out {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

body.loading {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

/* Content transition */
.content {
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

.content.visible {
    opacity: 1;
}

/* Loader animation */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(100, 255, 218, 0.1);
    border-top-color: #64ffda;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    will-change: transform; /* Optimize spinner animation */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    body.loading {
        position: fixed;
        width: 100%;
        height: -webkit-fill-available;
    }
}

/* Expertise Section Styles */
.expertise-section {
    min-height: 100vh;
    background-color: #0f0f0f;
    padding: 8rem 2rem;
    position: relative;
    visibility: visible; /* Ensure section is visible */
}

.expertise-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #ffffff;
    margin-bottom: 4rem;
    opacity: 1; /* Set initial opacity */
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
}

.expertise-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1; /* Set initial opacity */
}

.expertise-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.card-content h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.skills-list {
    list-style: none;
    padding: 0;
}

.skills-list li {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.skills-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #64ffda;
}

@media (max-width: 768px) {
    .expertise-section {
        padding: 4rem 1.5rem;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}

/* Skills Section Styles */
.skills-section {
    background-color: #0f0f0f;
    padding: 8rem 2rem;
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.tech-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(100, 255, 218, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 255, 218, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

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

.tech-card span {
    color: #ffffff;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.tech-card:hover span {
    color: #64ffda;
}

/* Professional Skills */
.prof-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(100, 255, 218, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 255, 218, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-icon {
    font-size: 2rem;
    color: #64ffda;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

.skill-card h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.skill-card:hover h3 {
    color: #64ffda;
}

.skill-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.skill-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* Certification Styles */
.cert-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    opacity: 0;
}

.cert-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.cert-content h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.cert-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.cert-year {
    color: #64ffda;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .skills-section {
        padding: 4rem 1.5rem;
    }
    
    .cert-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Portfolio Section Styles */
.portfolio-section {
    min-height: 100vh;
    background-color: #0f0f0f;
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.testimonial-stars {
    color: #ffd700;
    font-size: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.portfolio-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 4rem;
}

.portfolio-slides {
    flex: 1;
    position: relative;
    min-height: 400px;
}

.portfolio-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem;
}

.portfolio-slide.active {
    opacity: 1;
}

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

.project-content h3 {
    color: #64ffda;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.project-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-tag {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project-links {
    display: flex;
    gap: 2rem;
}

.project-link {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #64ffda;
}

.slider-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #ffffff;
}

.slider-arrow i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.slider-arrow:hover {
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
}

.slider-arrow.prev:hover i {
    transform: translateX(-2px);
}

.slider-arrow.next:hover i {
    transform: translateX(2px);
}

/* Ensure arrows are clickable */
.portfolio-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 4rem;
    padding: 0 1rem;
}

.portfolio-slides {
    flex: 1;
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

@media (max-width: 768px) {
  .portfolio-section {
      padding: 4rem 1rem;
  }

  .portfolio-slider {
      display: flex;
      flex-direction: column; /* Stack arrows and slides for smaller screens */
      gap: 1rem; /* Add spacing between arrows and slides */
      align-items: center;
  }

  .portfolio-slides {
      display: flex;
      flex-direction: column; /* Stack slides vertically */
      gap: 1rem; /* Add spacing between individual slides */
      max-height: 80vh; /* Limit height for better viewport fit */
      overflow-y: auto; /* Enable scrolling if content exceeds max height */
      width: 100%; /* Ensure it takes the full width */
      box-sizing: border-box; /* Include padding/borders in width/height */
  }

  .portfolio-slide {
      display: flex;
      flex-direction: column; /* Stack content vertically */
      align-items: center;
      justify-content: flex-start; /* Align content at the top */
      padding: 1rem;
      max-height: 70vh; /* Restrict slide height */
      overflow-y: auto; /* Enable scrolling inside individual slides */
      border: 1px solid rgba(255, 255, 255, 0.1); /* Optional: distinguish slides visually */
      border-radius: 10px;
      box-sizing: border-box;
  }

  .project-content {
      max-width: 100%; /* Prevent content from exceeding container width */
      padding: 1rem;
      margin: 0 auto;
      font-size: 0.9rem;
      line-height: 1.5;
      overflow-wrap: break-word; /* Handle long text gracefully */
  }

  .project-content h3 {
      font-size: 1.5rem; /* Adjust heading size */
      line-height: 1.3;
      margin-bottom: 0.5rem;
  }

  .project-description {
      font-size: 1rem; /* Smaller font size for mobile */
      line-height: 1.6;
      margin-bottom: 1rem; /* Add space after description */
  }

  .tech-stack {
      display: flex;
      flex-wrap: wrap; /* Ensure tags wrap on smaller screens */
      justify-content: center; /* Center-align tags */
      gap: 0.5rem;
  }

  .project-links {
      display: flex;
      flex-wrap: wrap; /* Allow wrapping of links on small screens */
      justify-content: center; /* Center-align links */
      gap: 1rem;
  }
}



/* Experience Section Styles */
.experience-section {
    background-color: #0f0f0f;
    padding: 8rem 2rem;
    min-height: 100vh;
}

.experience-container {
    max-width: 1200px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 4rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(100, 255, 218, 0.3),
        rgba(100, 255, 218, 0.1)
    );
}

.timeline-item {
    position: relative;
    padding-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
}

.timeline-marker {
    position: absolute;
    left: -2.4rem;
    width: 1rem;
    height: 1rem;
    background: #64ffda;
    border-radius: 50%;
    border: 2px solid #0f0f0f;
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.3);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: -5px 5px 20px rgba(100, 255, 218, 0.1);
}

.role-header h3 {
    color: #64ffda;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.role-meta {
    display: flex;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.company {
    font-weight: 500;
}

.duration {
    color: rgba(255, 255, 255, 0.5);
}

.role-description p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.achievements {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.achievements li {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.achievements li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #64ffda;
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-pills span {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .experience-section {
        padding: 4rem 1rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.9rem;
    }

    .timeline-content:hover {
        transform: none;
    }
}

/* Contact Section */
.contact-section {
    min-height: 60vh;
    background-color: #0f0f0f;
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 2rem;
    margin: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.pre-title {
    color: #64ffda;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: block;
}

.contact-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #ffffff;
    margin-bottom: 1rem;
}

.contact-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.button-dot {
    width: 8px;
    height: 8px;
    background-color: #64ffda;
    border-radius: 50%;
}

.contact-button:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

/* Footer Styles */
.site-footer {
    background-color: #0f0f0f;
    padding: 4rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-brand {
    text-align: left;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.footer-email {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
}

.copy-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-nav a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #64ffda;
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.footer-heart {
    font-size: 1.2rem;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .contact-section {
        margin: 1rem;
        padding: 4rem 1rem;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* Responsive typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin: 0 0 1rem;
}

/* Responsive grid */
.tech-grid, .prof-skills-grid, .cert-container, .timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Responsive navigation */
.footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Responsive contact section */
.contact-section {
    padding: 4rem 1rem;
    margin: 1rem;
}

/* Responsive footer */
.site-footer {
    padding: 2rem 1rem;
}

/* Media queries for larger screens */
@media (min-width: 768px) {
    .tech-grid, .prof-skills-grid, .cert-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .timeline {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .contact-section {
        padding: 8rem 2rem;
    }

    .site-footer {
        padding: 4rem 2rem;
    }
}
