@font-face {
    font-family: 'Trap Regular';
    src: url('../../assets/fonts/Trap_/Trap-Regular.woff2') format('woff2'),
    url('../../assets/fonts/Trap_/Trap-Regular.woff') format('woff'),
    url('../../assets/fonts/Trap_/Trap-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Trap Bold';
    src: url('../../assets/fonts/Trap_/Trap-Bold.woff2') format('woff2'),
    url('../../assets/fonts/Trap_/Trap-Bold.woff') format('woff'),
    url('../../assets/fonts/Trap_/Trap-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Trap Medium';
    src: url('../../assets/fonts/Trap_/Trap-Medium.woff2') format('woff2'),
    url('../../assets/fonts/Trap_/Trap-Medium.woff') format('woff'),
    url('../../assets/fonts/Trap_/Trap-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Trap Light';
    src: url('../../assets/fonts/Trap_/Trap-Light.woff2') format('woff2'),
    url('../../assets/fonts/Trap_/Trap-Light.woff') format('woff'),
    url('../../assets/fonts/Trap_/Trap-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

html{
    scroll-behavior: smooth;
}

/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Trap Regular', sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* Title */
.header-main {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 20px;
    background-color: transparent;
    z-index: 10;
    margin: 0;
}

.top-line {
    height: 20px; /* Adjust height */
    background-color: #000; /* Change color */
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10; /* Ensure it's below the header */
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1800px;
    margin: auto;
}

.logo-nav-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    background-color: #000;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    z-index: 10;
    margin-top: -20px;
    margin-left: -10px;
}

.logo-image {
    width: 60px;
    height: 60px;
    margin-right: 10px;
}

.logo {
    width: 60px;
    height: 60px;
}

.nav-name {
    color: #fff;
    font-size: 20px;
    font-family: 'Trap Medium';
}

/* Navbar Styles */
.nav-square {
    background-color: #ffffff80;
    border: 1px solid rgba(209,213,219,.5);
    box-shadow: 0 3px 20px -5px #00000026;
    border-radius: 40px;
    padding: 10px;
    display: flex;
    align-items: center;
    height: 40px;
    margin-left: -10px;
    transform: translateX(-100%); /* Start off-screen to the left */
    animation: slideIn 1.5s ease-out forwards; /* Apply the slide-in animation */
    backdrop-filter: blur(10px); /* Apply blur effect */
    -webkit-backdrop-filter: blur(10px); /* Ensure compatibility with WebKit browsers */
}

/* Hamburger button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
}
.menu-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease, width .2s ease;
}

/* Slide-in Animation */
@keyframes slideIn {
    0% {
        transform: translateX(-40%); /* Off-screen to the left */
    }
    100% {
        transform: translateX(0); /* Slide into its final position */
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #000;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 50px;
    transition: background-color 0.3s, color 0.3s;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.4);
    color: #333;
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    background: linear-gradient(45deg, #7249f1, #BEDC74, #16aeb5, #957ef2, #f27e7e, #b3003e);    background-size: 300% 300%;
    animation: gradientBG 5s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 20px;
    padding-top: 60px;
    margin-left: 30px;
    margin-right: 30px;
    margin-top: 20px;
}

.hero-content h1 {
    font-size: 48px;
    font-family: 'Trap Bold', Arial, sans-serif;
    text-align: center;
    max-width: 100%;
}

/* Prevent long headings from overflowing */
.hero-content h1,
.section-title,
.projects-section h2,
.about-text h2 {
    word-break: break-word;
    hyphens: auto;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.noise {
    background-image: url(/assets/img/noise.png);
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    margin-top: -60px;
    z-index: 1;
}

/* Social Box */
.social-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #000;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    z-index: 9;
}

.social-buttons a {
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s;
}

.social-buttons a:hover {
    color: #b3003e;
}

/* Work Experience Section */
.experience-section {
    padding: 60px 20px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #ffffff;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: auto;
}

.timeline::after {
    content: "";
    position: absolute;
    width: 4px;
    background-color: #b3003e;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 4px;
}

/* Timeline Items */
.timeline-item {
    padding: 20px;
    position: relative;
    background-color: #101010;
    color: white;
    width: 45%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* When the element is visible, apply these styles */
.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* Left Side (Odd Items) */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

/* Right Side (Even Items) */
.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* Timeline Dots */
.timeline-item::before {
    content: "";
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: #b3003e;
    border-radius: 50%;
    border: 4px solid white;
}

/* Left Dots (Odd) */
.timeline-item:nth-child(odd)::before {
    left: 100%;
    transform: translateX(-50%);
}

/* Right Dots (Even) */
.timeline-item:nth-child(even)::before {
    right: 100%;
    transform: translateX(50%);
}

/* Content Styling */
.timeline-content h3 {
    margin-top: 0;
    font-size: 20px;
    color: #ffffff;
}

.timeline-content p {
    color: #ffffff;
    font-size: 14px;
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    /* Simplify timeline to a clean vertical list */
    .timeline { max-width: 680px; }
    .timeline::after { display: none; }
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left;
        padding: 16px;
        margin-left: 0;
    }
    .timeline-item::before { display: none; }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) { left: 0; text-align: left; }
}


/* Projects Box */
.projects-box {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #000; /* Adjust color as needed */
    border-radius: 10px;
    padding: 20px; /* Adjust padding as needed */
    text-align: center;
    z-index: 1;
    width: 300px; /* Adjust width as needed */
    height: auto; /* Allow height to adjust based on content */
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px; /* Space between items */
    margin-left: -30px;
    margin-bottom: -30px;
}

/* Box Item */
.box-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure each item takes full width */
    font-family: 'Trap Medium', Arial, sans-serif;
}

/* Counter Circle */
.counter-circle {
    border: 5px solid #fff; /* Circle border color */
    border-radius: 50%;
    width: 60px; /* Adjust size as needed */
    height: 60px; /* Maintain aspect ratio */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px; /* Adjust margin as needed */
    font-size: 20px; /* Adjust text size as needed */
    color: #ffffff; /* Text color */
}

/* Counter Label */
.counter-label {
    font-size: 14px; /* Adjust font size as needed */
    color: #fff; /* Text color */
    margin: 0;
}

/* About Me Section */
.about-section {
    background-color: #000; /* Slightly lighter dark background */
    color: #fff;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.about-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* Center container horizontally */
    max-width: 1200px;
    margin: 0 auto; /* Center the container */
    gap: 50px;
}

.about-text {
    flex: 2;
    max-width: 600px;
    text-align: right; /* Align text to the right */
    font-size: 19px;
}

.about-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-family: 'Trap Bold', Arial, sans-serif;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    text-align: right; /* Align heading to the right */
}

.about-text h2::after {
    content: '';
    position: absolute;
    right: 0; /* Move the underline to the right */
    bottom: 0;
    width: 50px;
    height: 4px;
    background: #b3003e; /* Accent color */
    border-radius: 2px;
}

.about-image {
    flex: 1;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.about-image img {
    width: 100%;
    height: auto;
}

.about-image:hover {
    transform: scale(1.05);
}

.btn-lets-talk {
    display: inline-block;
    color: #fff;
    border: 2px solid white; /* Border color to make the button outline visible */
    font-size: 18px;
    padding: 10px 20px;
    margin-top: 20px;
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-align: right; /* Align button text to the right */
}

.btn-lets-talk:hover {
    transition: background-color 0.3s ease;
    background-color: white;
    color: black;
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        align-items: center; /* Center align items on smaller screens */
        text-align: center; /* Center text on smaller screens */
    }
}

/* Skills and Services */
.skills-services {
    text-align: center;
    padding: 20px;
}

.skills-services h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-family: 'Trap Bold', Arial, sans-serif;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    text-align: right; /* Align heading to the right */
}

.skills-services h2::after {
    content: '';
    position: absolute;
    right: 0; /* Move the underline to the right */
    bottom: 0;
    width: 100px;
    height: 4px;
    background: #b3003e; /* Accent color */
    border-radius: 2px;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.skill-item h3 {
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
}

.skill-item p {
    margin-left: 20px;
}

.skill-item h3 span {
    display: inline-block;
    padding-left: 10px;
}

.skill-item h3 span:before {
    content: " ";
    background-color: #fff; /* Adjust background color */
    padding: 4px;
    border-radius: 4px;
    margin-right: 10px;
    display: inline-block;
    width: 60px;
    height: 40px; /* Adjust size as needed */
}

/* Selected Work Section */
.projects-section {
    background-color: #000; /* Dark background for contrast */
    color: #fff;
    padding: 60px 20px;
    text-align: center; /* Center the title */
}

.projects-section h2 {
    font-size: 35px; /* Increase the font size */
    margin-bottom: 28px; /* Slightly tighter for mobile variants */
    font-family: 'Trap Bold', Arial, sans-serif;
}

.projects-container {
    max-width: 1200px;
    margin: auto;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-card {
    background-color: #101010;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 20px;
    position: relative;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: scale(1.02);
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    width: 100%;
    align-items: center;
}

.project-info {
    flex-grow: 1;
    padding-right: 20px;
    text-align: left; /* Align text to the left */
}

.project-info h3 {
    font-size: 28px;
    margin-bottom: 10px;
    font-family: 'Trap Medium', Arial, sans-serif;
}

.project-info p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tech-icons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.tech-icon {
    background-color: #dcdcdc;
    color: #000;
    border-radius: 15px;
    padding: 10px 15px;
    font-size: 14px;
    font-family: 'Trap Medium', Arial, sans-serif;
}

.project-button {
    display: inline-block;
    color: #fff;
    border: 2px solid white; /* Border color to make the button outline visible */
    font-size: 15px;
    padding: 10px 20px;
    margin-top: 20px;
    border-radius: 50px;
    background-color: transparent;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-align: center; /* Center the button text */
    cursor: pointer; /* Change cursor to pointer on hover */
}

.project-button:hover {
    background-color: white;
    color: black;
}

.project-image {
    flex-shrink: 0;
    width: 400px;
    height: 300px;
    margin-right: -30px;
    margin-bottom: -90px;
    position: relative;
    z-index: 1;
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.project-card:hover .project-image {
    transform: rotate(-5deg);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.project-more h3{
    align-items: center;
    font-size: 34px;
}

.project-more .bi-github {
    color: white;
}

.project-more .bi-github:hover {
    color: #b3003e;
}

@media (max-width: 768px) {
    .project-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-image {
        margin: 20px 0 0 0;
        transform: rotate(0deg); /* No rotation on smaller screens */
    }

    .tech-icons {
        justify-content: flex-start;
    }
}


/* Initially hide the additional projects */
.hidden {
    display: none;
}

/* Show More and Hide More Button Styling */
.show-more-btn, .hide-more-btn {
    font-family: 'Trap Medium', Arial, sans-serif;
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #b3003e;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.show-more-btn:hover, .hide-more-btn:hover {
    background-color: #555;
}

/* Contact Us Section */
.contact-hero {
    height: 87vh;
    background: linear-gradient(45deg, #7249f1, #1478c3, #16aeb5, #73a5e9, #957ef2, #f27e7e);
    background-size: 300% 300%;
    animation: gradientBG 5s ease infinite;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    padding-top: 60px;
    margin-left: 30px;
    margin-right: 30px;
    margin-top: 20px;
    margin-bottom: 3px;
    position: relative;
}

/* Contact Content */
.contact-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    z-index: 1;
}

/* Heading */
.contact-content h1 {
    font-family: 'Trap Bold', Arial, sans-serif;
    font-size: 90px;
    margin-top: 90px;
    margin-left: 40px;
    text-align: left;
}

/* Button container */
.contact-button-container {
    display: flex;
    flex-direction: column; /* Stack button and email text vertically */
    align-items: flex-end; /* Align items to the end (right) */
    position: static;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    margin-top: auto; /* push to the bottom within flex column */
    padding: 0 20px 20px 20px;
}

/* Button Wrapper */
.button-wrapper {
    position: relative;
}

/* Button */
.button {
    display: block;
    font-family: 'Trap Medium', Arial, sans-serif;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: 2px;
    padding: 16px 32px;
    background-color: transparent; /* Transparent background */
    color: white; /* Text color */
    border-radius: 50px;
    border: 2px solid white; /* Border color to make the button outline visible */
    cursor: pointer;
    position: relative;
    overflow: hidden; /* Ensures the gradient background does not overflow */
    transition: background-color 1s ease;
}

.button:hover{
    transition: background-color 1s ease;
    background-color: white;
    color: black;
}

/* Button Background */
.button-bg {
    position: absolute;
    top: 0;
    left: 0;
    background-size: 300% 300%;
    border-radius: 50px;
    z-index: -1;
}

.button-wrapper:hover .button-bg {
    filter: blur(10px);
    transition: filter .4s ease-in;
}

/* Email text */
.contact-email {
    font-size: 24px;
    font-family: 'Trap Regular', Arial, sans-serif;
    color: #fff; /* Lighter color */
    margin-top: 10px; /* Space above email text */
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    visibility: hidden;
    opacity: 0; /* Start with invisible button */
    background-color: #f8f9fa;
    color: #000;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-size: 14px;
    transition: opacity 0.3s ease, background-color 0.3s, box-shadow 0.3s;
    z-index: 99;
}

.back-to-top.visible {
    visibility: visible;
    opacity: 1; /* Fade in when visible */
}

.back-to-top:hover {
    background-color: #e2e6ea;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top:focus {
    outline: none;
}


/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero {
        height: 75vh;
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (max-width: 768px) {
    /* Header & Nav */
    .header-main {
        padding: 12px;
    }

    .top-line {
        height: 12px;
    }

    .header-container {
        max-width: 100%;
    }

    .logo-nav-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        position: relative;
    }

    .logo-container {
        padding: 16px;
        margin-top: -10px;
        margin-left: -6px;
        border-radius: 14px;
    }

    .logo-image {
        width: 52px;
        height: 52px;
    }

    .nav-name {
        font-size: 18px;
    }

    /* Full-screen overlay nav */
    .nav-square {
        height: auto;
        padding: 8px 10px;
        border-radius: 12px;
        animation: none;
        transform: none;
        width: 100%;
        overflow: hidden;
        display: none; /* hidden by default, toggled by hamburger */
        flex-direction: column;
        /* Overlay styles */
        position: fixed;
        inset: 0;
        background: rgba(10,10,10,0.75);
        backdrop-filter: blur(10px) saturate(120%);
        -webkit-backdrop-filter: blur(10px) saturate(120%);
        z-index: 999;
        padding: 80px 24px 24px 24px;
    }

    nav ul {
        gap: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul li a {
        padding: 16px 12px;
        font-size: 18px;
        display: block;
        color: #fff;
    }

    .menu-toggle {
        display: block;
        position: fixed;
        right: 16px;
        top: 14px;
        z-index: 2000;
        padding: 14px;
        border-radius: 12px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent; /* remove default button styles */
        border: none;            /* remove default button border */
    }
    .menu-toggle:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
        border-radius: 12px;
    }
    .nav-square.open { display: flex; }

    /* Lock scroll when menu is open */
    body.menu-open { overflow: hidden; }

    /* Hide decorative header corners on mobile */
    .svg-corner { display: none; }

    /* Hide decorative header corners on mobile */
    .svg-corner { display: none; }

    /* Hero */
    .hero {
        height: auto;
        min-height: 75vh;
        padding-top: 80px;
        margin-left: 16px;
        margin-right: 16px;
    }

    .hero-content h1 {
        font-size: 54px;
        line-height: 1.25;
        padding: 0 8px;
        margin-top: -20px;
    }

    .noise {
        border-radius: 16px;
        margin-top: -40px;
    }

    /* Social buttons */
    .social-buttons {
        bottom: 12px;
        right: 12px;
        padding: 8px;
        gap: 8px;
    }

    .social-buttons a {
        font-size: 18px;
    }

    /* Hero counters projects-box */
    /* Hide counters entirely on mobile */
    .projects-box { display: none; }

    .box-item {
        width: auto;
        flex: 1 1 0;
    }

    .counter-circle {
        width: 48px;
        height: 48px;
        font-size: 16px;
        border-width: 4px;
    }

    .counter-label {
        font-size: 12px;
    }

    /* About */
    .about-text {
        text-align: center;
        font-size: 16px;
    }

    .about-text h2 {
        font-size: 28px;
        text-align: center;
    }

    .about-text h2::after {
        right: 50%;
        transform: translateX(50%);
    }

    /* Skills */
    .skills-services h2 {
        font-size: 28px;
        text-align: center;
    }

    .skills-services h2::after {
        right: 50%;
        transform: translateX(50%);
        width: 60px;
    }

    .skill-item {
        flex-direction: column;
        text-align: center;
    }

    .skill-item h3 {
        font-size: 24px;
    }

    .skill-item p {
        margin-left: 0;
        font-size: 14px;
        max-width: 560px;
    }

    /* Projects - mobile redesign */
    .projects-section h2 {
        font-size: 26px;
    }

    .project-link {
        flex-direction: column;
        align-items: stretch;
    }

    .project-info h3 {
        font-size: 24px;
    }

    .project-info p {
        font-size: 15px;
    }

    .project-card {
        padding: 16px;
        gap: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.04);
    }

    .project-image {
        width: 100%;
        height: auto;
        margin: 12px 0 0 0;
        order: -1; /* image on top */
    }

    .tech-icons {
        flex-wrap: wrap;
    }
    .tech-icon { margin-bottom: 6px; }

    /* Contact */
    .contact-hero {
        margin-left: 16px;
        margin-right: 16px;
        padding-top: 56px;
        height: auto;
        min-height: 75vh;
    }

    .contact-content h1 {
        font-size: 42px;
        margin-top: -10px;
        margin-left: 20px;
    }

    .contact-button-container {
        position: static;
        align-items: flex-start;
        width: 100%;
        margin: 0;
        margin-top: auto; /* push to the bottom within flex column */
        padding: 260px 20px 20px 20px;
    }

    .button {
        font-size: 20px;
        padding: 14px 26px;
        border-width: 2px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    }

    .contact-email {
        font-size: 18px;
        margin-left: 2px;
        margin-top: 14px;
        line-height: 1.5;
        color: rgba(255,255,255,0.92);
    }

    /* Timeline readability on small screens */
    .timeline-item {
        padding: 16px;
    }
    .timeline-content h3 { font-size: 18px; }
    .timeline-content p { font-size: 13px; }

    /* Back to top button position */
    .back-to-top {
        right: 12px;
        bottom: 12px;
        font-size: 12px;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 30px;
    }

    .projects-box {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .box-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
    }

    .contact-content h1 {
        font-size: 34px;
        margin-left: 16px;
    }

    main { padding-top: 30px; }
}