/* Global Styles */
body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Raleway', sans-serif;
    scroll-behavior: smooth;
}

/* Intro Screen */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeOut 1s ease forwards 3s;
    opacity: 1;
    padding: 20px;
    transition: padding 0.3s ease;
}

.intro-text {
    text-align: center;
    opacity: 0;
    animation: textAppear 1.5s ease forwards 1s;
    transition: all 0.3s ease;
}

.intro-text h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    transition: font-size 0.3s ease;
}

.intro-text p {
    font-size: 1.2rem;   transition: font-size 0.3s ease;
}

@keyframes textAppear {
    0% {
        opacity: 0;   transform: translateY(20px);
    }
    100% {
        opacity: 1;  transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;  visibility: hidden;
    }
}

.hidden {
    opacity: 0;
    display: none;
    transition: opacity 0.5s ease;
}

/* Responsive Styles */

/* For tablets (768px to 1024px) */
@media (max-width: 1024px) {
    .intro-screen {
        padding: 15px;
    }

    .intro-text h1 {
        font-size: 2.5rem;
    }

    .intro-text p {
        font-size: 1rem;
    }

    .container {
        max-width: 100%;  padding: 0 15px;
    }

    .hero-content {
        flex-direction: column;  text-align: center;
    }

    .hero-photo {
        justify-content: center;
        padding-right: 0;
        padding-bottom: 20px;
    }

    .hero-photo img {
        max-width: 80%;  max-height: 300px;
    }

    .hero-text h2 {
        font-size: 36px;
    }

    .hero-text p {
        font-size: 20px;
    }
}

/* For mobile devices (max-width: 768px) */
@media (max-width: 768px) {
    .intro-screen {
        padding: 10px;
    }

    .intro-text h1 {
        font-size: 2rem;
    }

    .intro-text p {
        font-size: 0.9rem;
    }

    .container {
        max-width: 100%;   padding: 0 10px;
    }

    .hero {
        padding: 15px;
    }

    .hero-content {
        flex-direction: column;   text-align: center;
    }

    .hero-photo img {
        max-width: 90%;   max-height: 250px;
    }

    .hero-text h2 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 18px;
    }

    .scroll-arrow.scroll-down {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }

    .scroll-arrow.scroll-down i {
        font-size: 20px;
    }
}

/* For very small devices (max-width: 480px) */
@media (max-width: 480px) {
    .hero {
        padding: 10px;
    }

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

    .hero-photo img {
        max-width: 100%;    max-height: 200px;
    }

    .hero-text h2 {
        font-size: 28px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .scroll-arrow.scroll-down {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }

    .scroll-arrow.scroll-down i {
        font-size: 20px;
    }
}

/* OVERLAY */
.overlay {
    z-index: 9;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
}
  
.overlay-slide-right {
    transition: all 0.4s ease-in-out;  transform: translateX(0);
}
  
.overlay-slide-left {
    transition: all 0.8s ease-in-out;  transform: translateX(-100%);
}

/* NAV MENU ITEMS */
nav {
    background-color: #333;
}

nav ul {
    height: 100vh;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

nav ul li {
    width: 100%;
    height: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
}
  
nav li:nth-of-type(1) { background-color: #4a4a4a; }
nav li:nth-of-type(2) { background-color: #6a3f2e; }
nav li:nth-of-type(3) { background-color: #2c2f3d; }
nav li:nth-of-type(4) { background-color: #4c6d5b; }
nav li:nth-of-type(5) { background-color: #4c556d; }
nav li:nth-of-type(6) { background-color: #736b4e; }
  
nav li a {
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.3rem;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}
  
nav li a:hover, nav li a:active {
    transform: scale(1.1);  color: #e94d3f;
}
  
/* NAV SLIDE IN ANIMATION */
.slide-in-1 { animation: slide-in 0.5s ease-in-out 0.2s both; }
.slide-in-2 { animation: slide-in 0.5s ease-in-out 0.4s both; }
.slide-in-3 { animation: slide-in 0.5s ease-in-out 0.6s both; }
.slide-in-4 { animation: slide-in 0.5s ease-in-out 0.8s both; }
.slide-in-5 { animation: slide-in 0.5s ease-in-out 0.8s both; }
.slide-in-6 { animation: slide-in 0.5s ease-in-out 1s both; }
  
@keyframes slide-in {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
  
/* NAV SLIDE OUT ANIMATION */
.slide-out-1 { animation: slide-out 0.4s ease-in-out 0.5s both; }
.slide-out-2 { animation: slide-out 0.4s ease-in-out 0.4s both; }
.slide-out-3 { animation: slide-out 0.4s ease-in-out 0.3s both; }
.slide-out-4 { animation: slide-out 0.4s ease-in-out 0.2s both; }
.slide-out-5 { animation: slide-out 0.4s ease-in-out 0.2s both; }
.slide-out-6 { animation: slide-out 0.4s ease-in-out 0.1s both; }

  
@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}
  

/* HAMBURGER MENU ANIMATION */
.hamburger-menu {
    position: fixed;
    top: 1rem;
    right: 2rem;
    z-index: 10;
    cursor: pointer;
}
  
.menu-bar1, .menu-bar2, .menu-bar3 {
    width: 3.5rem;
    height: 0.2rem;
    background-color: #fff;
    margin: 0.8rem 0;
    transition: 0.4s;
}
  
.menu-bar2 {
    width: 2rem;
    margin-left: auto;
}
  
.active .menu-bar1 {
    transform: rotate(-45deg) translate(-0.7rem, 0.8rem);
}

  
.active .menu-bar2 {
    opacity: 0;
}
  
.active .menu-bar3 {
    transform: rotate(45deg) translate(-0.6rem, -0.8rem);
}

  
/* Hero Section */
.hero {
    height: 100vh;
    background-color: #000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    flex-direction: row; /* Ensure row direction for larger screens */
}

.hero-photo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 30px;
}

.hero-photo img {
    max-width: 100%; /* Adjust photo width for responsiveness */
    border-radius: 8px;
    width: auto;
    height: auto;
    max-height: 400px; /* Limit the height for larger images */
    object-fit: cover; /* Ensure image covers the area */
    transition: transform 0.3s ease;
}

.hero-photo img:hover {
    transform: scale(1.05);
}

.hero-text {
    flex: 1;
}

.hero-text h2 {
    font-size: 48px;   margin: 0;
}

.hero-text p {
    font-size: 24px;  line-height: 1.5; /* Improve readability */
}

.learn-more-button {
    display: inline-block;
    margin-top: 20px; /* Add margin for spacing from text */
    padding: 12px 30px;
    color: #fff;
    background-color: #000000;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite; /* Pulse animation for attention */
    border: 2px solid #ffffff; /* Add border with color */
}

.learn-more-button:hover {
    background-color: #e94d3f;
    transform: translateY(-4px);
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5);
    border: 2px solid #727171;
}
/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column; /* Stack content vertically on tablets */   text-align: center; /* Center text */
    }

    .hero-photo {
        justify-content: center; /* Center the photo */
        padding-right: 0; /* Remove padding */
        padding-bottom: 20px; /* Add space below the photo */
    }

    .hero-photo img {
        max-width: 80%; /* Make the photo wider */    max-height: 300px; /* Adjust the height */
    }

    .hero-text h2 {
        font-size: 36px; /* Smaller heading size */
    }

    .hero-text p {
        font-size: 20px; /* Smaller paragraph size */
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 15px; /* Reduce padding for smaller screens */
    }

    .hero-content {
        flex-direction: column; /* Stack content vertically on smaller devices */
    }

    .hero-photo img {
        max-width: 90%; /* Make the photo fill more space */   max-height: 250px; /* Further adjust the height */
    }

    .hero-text h2 {
        font-size: 32px; /* Even smaller heading size */
    }

    .hero-text p {
        font-size: 18px; /* Smaller paragraph size */
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 10px; /* Minimal padding for mobile */
    }

    .hero-content {
        text-align: center; /* Center-align content for small screens */
    }

    .hero-photo img {
        max-width: 100%; /* Full width for small screens */   max-height: 200px; /* Even smaller height for compact view */
    }

    .hero-text h2 {
        font-size: 28px; /* Smallest heading size */
    }

    .hero-text p {
        font-size: 16px; /* Smallest paragraph size */
    }

    .scroll-arrow.scroll-down {
        bottom: 10px; /* Adjust position for smaller screens */
        right: 10px;
        width: 40px; /* Smaller arrow button */
        height: 40px;
    }

    .scroll-arrow.scroll-down i {
        font-size: 20px; /* Smaller icon size */
    }
}

/* Responsive Styles */

/* For tablets (768px to 1024px) */
@media (max-width: 1024px) {
    .hero {
        padding: 0 10px; /* Reduced padding for smaller screens */
    }

    .hero-content {
        flex-direction: column; /* Stack elements vertically */
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-photo {
        justify-content: center; /* Center photo on smaller screens */
        padding: 0; /* Remove padding */
        margin-bottom: 20px; /* Space between photo and text */
    }

    .hero-photo img {
        max-width: 80%; /* Adjust image size for tablets */
    }

    .hero-text {
        padding: 10px; /* Reduced padding */
    }

    .hero-text h2 {
        font-size: 36px; /* Smaller heading for tablets */
    }

    .hero-text p {
        font-size: 18px; /* Smaller text for tablets */
    }
}

/* For mobile devices (max-width: 768px) */
@media (max-width: 768px) {
    .hero {
        padding: 0 10px; /* Reduce padding for smaller screens */
    }

    .hero-content {
        flex-direction: column; /* Stack elements vertically */
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-photo {
        justify-content: center; /* Center photo on smaller screens */
        padding: 0; /* Remove padding */
        margin-bottom: 20px; /* Space between photo and text */
    }

    .hero-photo img {
        max-width: 90%; /* Reduce image size for mobile devices */
    }

    .hero-text {
        padding: 10px; /* Reduce padding */
    }

    .hero-text h2 {
        font-size: 32px; /* Smaller font size for mobile */
    }

    .hero-text p {
        font-size: 16px; /* Smaller font size for mobile */
    }

    .scroll-arrow.scroll-down {
        width: 40px; /* Smaller arrow button */
        height: 40px;
        bottom: 10px; /* Adjust position */
        right: 10px;
    }

    .scroll-arrow.scroll-down i {
        font-size: 20px; /* Smaller icon */
    }
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
    position: relative;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 60px;
    height: 3px;
    background-color: #e94d3f;
    opacity: 0;
    animation: fadeIn 1s ease-in-out 0.3s forwards;
}

/* Portfolio Section */
.portfolio {
    padding: 50px;   background-color: #f4f4f4;
}

.portfolio-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px; /* Space between projects and the left/right edges */
    justify-content: center; /* Center the projects */
}

.portfolio-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative; /* Needed for the description overlay */
    transition: transform 0.3s ease;
    width: calc(46% - 10px); /* Two items per row with gap */
}

.portfolio-item:hover {
    transform: scale(1.05);   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
    width: 100%;   height: auto;
}

.portfolio-item-content {
    padding: 20px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay */
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-item-content {
    opacity: 1;
}

.portfolio-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.portfolio-item-description {
    font-size: 14px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .portfolio-item {
        width: 100%; /* One item per row on smaller screens */
    }
    .portfolio-container {
        padding: 0 10px; /* Adjust padding for smaller screens */
    }
}


.view-more-container {
    text-align: center;  margin-top: 20px;
}

.view-more-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #e75e51;
    color: #fff;
    text-decoration: none;
    border-radius: 25px; /* More rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    font-size: 16px; /* Larger font size */
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.view-more-button:hover {
    background-color: #e94d3f;    transform: translateY(-3px); /* Slight lift effect on hover */
}

.menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
}

@media (max-width: 768px) {
    .menu-button {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 10px;
        background-color: #fff;
        position: absolute;
        top: 60px;
        right: 20px;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }
}

/* Custom Scrollbar */
.portfolio-container::-webkit-scrollbar {
    height: 8px;
}

.portfolio-container::-webkit-scrollbar-thumb {
    background-color: #888;  border-radius: 4px;
}

.portfolio-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}


/* About Section */
.about {
    padding: 80px 0;
    background-color: #f4f4f9;  color: #333;
}

.about p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

/* Skills Section */
.skills {
    padding: 80px 20px;
    background-color: #f7f7f7;  text-align: center;
}

.skills-container {
    display: flex;
    overflow-x: auto;
    gap: 40px;
    padding: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.skill-item {
    min-width: 250px; /* Ensure a minimum width for each item */
    flex: 0 0 auto; /* Prevent flex items from shrinking */
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-item i {
    font-size: 40px;
    color: #FF6F61;
    margin-bottom: 15px;
}

.skill-item h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.skill-item p {
    font-size: 14px;  color: #777;
}

.skill-item:hover {
    transform: translateY(-10px);
}

/* Hide scrollbar for Webkit browsers */
.skills-container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for all browsers */
.skills-container {
    -ms-overflow-style: none;  /* IE and Edge */  scrollbar-width: none;  /* Firefox */
}


/* Contact Section */
.contact {
    padding: 50px;
    background-color: #f7f7f7;
    color: #333;
    text-align: center;
}

.contact .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #333;
    position: relative;
    display: inline-block;
    opacity: 0; /* Ensures animation works */
    animation: fadeIn 1s ease-in-out forwards;
}

.contact-info {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Ensures all items are the same height */
    gap: 40px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.contact-item {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: 250px;
    text-align: center;
    opacity: 0; /* Ensures animation works */
    animation: fadeIn 1s ease-in-out 0.3s forwards;
}

.contact-item i {
    font-size: 24px;
    color: #e94d3f;
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 16px;  color: #333;
}

.contact-item a {
    color: #e94d3f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #e94d3f;
}

.contact-item:hover {
    transform: translateY(-5px);  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}


/* Footer */
.footer {
    background-color: #333333;
    color: #ffffff;
    padding: 40px 20px;
    text-align: left;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.get-in-touch {
    flex: 1;
    min-width: 300px;
    margin-right: 20px;
}

.get-in-touch h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #f04e30;
}

.get-in-touch .form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.get-in-touch .form-group input,
.get-in-touch .form-group textarea,
.get-in-touch .form-group select {
    flex: 1;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #2c2c2c;
    color: #fff;
    font-size: 16px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.get-in-touch .form-group input::placeholder,
.get-in-touch .form-group textarea::placeholder {
    color: #ccc;
}

.get-in-touch .form-group textarea {
    min-height: 120px;
}

.get-in-touch .form-group input:focus,
.get-in-touch .form-group textarea:focus,
.get-in-touch .form-group select:focus {
    background-color: #444;
    border-color: #f04e30;
    outline: none;
}

.get-in-touch button {
    padding: 14px;
    background-color: #f04e30;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.get-in-touch button:hover {
    background-color: #d03e20;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0 0 20px 0;
    padding: 0;
}

.social-links li {
    margin: 0 10px;
}

.social-links a {
    color: #ffffff;
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #e94d3f;
}

.footer p {
    margin: 0;
    font-size: 14px;
    text-align: center;
}

/* Scroll Up Arrow */
.scroll-up {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #d4d4d4;
    color: #000000;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add shadow for a modern look */
}

.scroll-up.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-up:hover {
    background-color: #e94d3f;
}

/* Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
    width: 12px;  height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    transition: background-color 0.3s, width 0.3s;
}

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

html {
    scrollbar-width: thin;  scrollbar-color: #888 #f1f1f1;
}

html:hover {
    scrollbar-color: #555 #f1f1f1;
}