/* --- Variables & Reset --- */
:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #151515;
    --bg-panel: #242424;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --accent-teal: #1abc9c;
    --border-color: #333333;
    
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .subtitle, .accordion {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--accent-teal); transition: color 0.3s ease; }
li { list-style: none; }

.hi-button{text-decoration: none; color: inherit; 
    position: absolute;
    bottom: -20px;
    left: -30px;
    background-color: var(--accent-teal);
    color: var(--bg-dark);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    
}
.hi-button:hover { 
    color: white; 
    transition: color 0.3s ease;
    transform: scale(1.2);
 
}

.name {
    color: var(--accent-teal);
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 2rem;
}

.highlight {
    color: var(--accent-teal);
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 5.3rem;
    
}

/* Global max-width to center content and control section spacing */
.section-padding { 
    padding: 15rem 2rem; /* CHANGED: Massive spacing between sections */
    max-width: 1100px;
    margin: 0 auto;
}

/* NEW: Section Animation States */
.section-hidden {
    opacity: 0;
    transform: translateY(60px); /* Pushes it down slightly while hidden */
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.section-visible {
    opacity: 1;
    transform: translateY(0); /* Snaps it to its normal position */
}


/* --- Buttons --- */
.btn-primary {
    background-color: var(--text-light);
    color: var(--bg-dark);
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: 600;
}

.btn-outline {
    border: 1px solid var(--accent-teal);
    color: var(--accent-teal);
    padding: 10px 24px;
    border-radius: 20px;
    display: inline-block;
    background: transparent;
    cursor: pointer;
    transition: 0.3s;
}
.btn-outline:hover {
    background: var(--accent-teal);
    color: var(--bg-dark);
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 0.6rem 0.6rem 1.5rem; 
    gap: 2rem;
    
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    
    width: max-content;
    max-width: 95%; 
}

.nav-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 2rem;
    background: transparent;
    padding: 0;
}

.nav-links a { 
    font-size: 0.9rem; 
    font-weight: 400; 
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-teal);
}

/* --- Hero Section --- */
@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-150px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(150px); }
    100% { opacity: 1; transform: translateX(0); }
}

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

.hero {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    padding: 12rem 2rem 10rem;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;    
}

.hero h1 { 
    font-family: 'Oswald', sans-serif !important; 
    font-weight: 700; 
    font-size: clamp(4.5rem, 10vw, 10rem); 
    line-height: 1; 
    letter-spacing: -2px;
    margin: 0; 
    text-transform: uppercase;
}

/* --- Left Side: TOP LEFT --- */
.hero-left { 
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem; 
    z-index: 2; 
}
.text-wrapper-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: clamp(100px, 20vw, 350px); 
    opacity: 0; 
    animation: slideInLeft 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.subtitle { 
    display: block; 
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 0.9rem; 
    margin: 0 0 5px 6px; 
    letter-spacing: 1px;
}

/* --- Center Image --- */
.hero-center {
    position: relative;
    z-index: 1; 
    width: 320px; 
    flex-shrink: 0; 
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.3s; 
}
.hero-image-container { 
    position: relative; 
    width: 100%; 
}
.hero-img { 
    width: 100%; 
    aspect-ratio: 1 / 1.2; 
    border-radius: 30px; 
    object-fit: cover; 
}
.hi-badge {
    position: absolute;
    bottom: -20px;
    left: -30px;
    background-color: var(--accent-teal);
    color: var(--bg-dark);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* --- Right Side: BOTTOM RIGHT --- */
.hero-right { 
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 2rem; 
    z-index: 2; 
}
.text-wrapper-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    margin-left: clamp(100px, 20vw, 350px); 
    opacity: 0; 
    animation: slideInRight 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.15s; 
}
.text-wrapper-right p {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 10px;
    margin-bottom: 0;
    max-width: 250px;
    line-height: 1.4;
}

/* --- Layout Grids --- */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem; 
    align-items: start;
}

/* --- Typography & Text --- */
h2 { font-size: 3rem; margin-bottom: 1rem; }
p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* --- Accordions (Services & FAQ) --- */
.accordion {
    background-color: transparent;
    color: var(--text-light);
    cursor: pointer;
    padding: 1.5rem 0;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--border-color);
    outline: none;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    transition: color 0.4s ease, border-color 0.4s ease; 
}
.accordion:hover, .accordion.active { 
    color: var(--accent-teal); 
}
.accordion.active {
    border-bottom-color: transparent; 
}
.panel {
    padding: 0;
    background-color: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.accordion.active + .panel {
    border-bottom: 1px solid var(--accent-teal);
}
.panel p { padding-top: 1rem; margin-bottom: 0; }
.service-list { padding-top: 1rem; padding-bottom: 1.5rem; }
.service-list li {
    color: var(--text-muted);
    padding: 8px 0;
    position: relative;
    padding-left: 20px;
}
.service-list li::before {
    content: "•";
    color: var(--accent-teal);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

/* --- About Section --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}
.stats-grid h3 { font-size: 2.5rem; color: var(--accent-teal); line-height: 1; }
.stats-grid p { font-size: 0.8rem; margin-top: 5px; }
.contact-info {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* --- Skills Cluster --- */
.skills-cluster {
    display: flex;
    flex-wrap: wrap; /* Allows the tags to drop to the next line naturally */
    gap: 10px; /* Space between each tag */
    max-width: 90%; /* Keeps it from stretching too far horizontally */
}

.skill-tag {
    background-color: var(--bg-panel);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px; /* Gives them the 'pill' shape */
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default; /* Tells the user it's informational, not a link */
}

/* Subtle interactive feel when the mouse passes over them */
.skill-tag:hover {
    color: var(--text-light);
    border-color: var(--accent-teal);
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 4px 10px rgba(26, 188, 156, 0.1); /* Soft teal glow */
}

/* --- Projects Section --- */
.projects-header { max-width: 600px; margin-bottom: 3rem; }
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-bottom: 3rem;
}

.project-card {
    position: relative;
    height: 450px; 
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    padding: 1.5rem; 
    text-align: left; 
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    z-index: 1;
}

.project-card.active-scroll {
    transform: scale(1.05); 
    z-index: 2; 
}

.project-card:hover {
    transform: scale(1.08);
}

.project-info-block {
    background-color: var(--bg-panel); 
    width: 100%;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); 
}

.badge {
    background: var(--accent-teal);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.project-info-block h3 { 
    font-size: 1.8rem; 
    margin-bottom: 0.5rem; 
    line-height: 1.2;
}

.project-info-block p { 
    font-size: 0.85rem;
    color: var(--text-muted); 
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.center-btn { text-align: center; }

/* --- Contact Form --- */
.contact-image-container { position: relative; }
.contact-img { width: 100%; max-width: 400px; border-radius: 20px; }
.contact-badge { bottom: -20px; left: -20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.5rem; display: flex; flex-direction: column; }
.form-group label {
    color: var(--accent-teal);
    font-size: 0.8rem;
    margin-bottom: 5px;
}
input, select, textarea {
    background: var(--bg-panel);
    border: none;
    padding: 15px;
    border-radius: 10px;
    color: var(--text-light);
    font-family: var(--font-body);
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent-teal); }
.submit-btn { width: 150px; }

/* --- Direct Contact Actions --- */
.direct-contact-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.direct-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden; /* Keeps the sliding tooltip contained */
}

.contact-icon {
    width: 22px;
    height: 22px;
}

/* The hidden "Copied!" message */
.copy-tooltip {
    position: absolute;
    top: -100%; /* Hidden completely above the button */
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-teal);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Nice bouncy slide */
}

/* When the JS adds the .copied class, slide the tooltip down */
.direct-action-btn.copied .copy-tooltip {
    top: 0;
}

/* --- Custom Hover State for Contact Buttons --- */
.direct-contact-actions .direct-action-btn {
    /* Ensures the scale animation is smooth */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.direct-contact-actions .direct-action-btn:hover {
    background-color: var(--accent-teal);
    color: var(--text-light); /* Changes text and SVG icons to white */
    transform: scale(1.08); /* Scales the button up by 8% */
    border-color: var(--accent-teal);
}

/* --- Footer Section --- */
.site-footer {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
}
.footer-content {
    padding-top: 4rem; 
    padding-bottom: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
}
.footer-brand h3 { font-size: 1.5rem; color: var(--text-light); margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }
.footer-contact { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; }
.footer-col span {
    font-family: var(--font-heading);
    color: var(--accent-teal);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}
.footer-col a { color: var(--text-light); font-size: 0.9rem; transition: color 0.3s ease; margin-bottom: 0.3rem; }
.footer-col a:hover { color: var(--accent-teal); }
.footer-socials { display: flex; gap: 1rem; }
.footer-bottom { text-align: center; padding: 1.5rem 2rem; border-top: 1px solid var(--border-color); background-color: var(--bg-dark); }
.footer-bottom p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }

/* =========================================
   Smart Scroll Button
   ========================================= */

/* The Wrapper handles the horizontal sliding */
.smart-scroll-wrapper {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    transition: all 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Gives it a slight spring effect */
}

/* State 2: Moved to the right */
.smart-scroll-wrapper.scrolled-past {
    left: 100%;
    transform: translateX(-100px); /* Stops 100px from the right edge */
}

/* The Button handles size, color, and interactions */
.smart-scroll-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Uses 6402 theme if available, otherwise global accent */
    background-color: var(--6402-green, var(--accent-teal)); 
    color: var(--6402-eggshell, var(--bg-dark));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: background-color 0.4s ease, border 0.4s ease;
}

/* Optional: Darkens the button when it moves to the side */
.smart-scroll-wrapper.scrolled-past .smart-scroll-btn {
    background-color: var(--bg-panel);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

/* The SVG handles the rotation */
.smart-scroll-btn svg {
    width: 28px;
    height: 28px;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.smart-scroll-wrapper.scrolled-past svg {
    transform: rotate(180deg);
}

/* Hover effect */
.smart-scroll-btn:hover {
    background-color: var(--6402-light-green, var(--text-light));
    color: var(--bg-dark);
}

/* --- Bounce Animation Logic --- */
@keyframes bounceUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Only bounce when it has NOT scrolled past */
.smart-scroll-wrapper:not(.scrolled-past) .smart-scroll-btn {
    animation: bounceUpDown 2s infinite ease-in-out;
}

/* =========================================
   Responsive Breakpoints 
   ========================================= */

@media (max-width: 992px) {
    .hero h1 { font-size: 5rem; }
    .grid-2-col { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    
    .navbar { 
        flex-wrap: nowrap; /* Forces everything onto a single line */
        justify-content: space-between; 
        top: 0; 
        width: 100%;
        max-width: 100%;
        border-radius: 0; 
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.8rem 1rem; /* Slightly tighter padding */
        gap: 0.5rem; /* Overrides the large 2rem desktop gap */
    }
    
    .nav-links { 
        order: unset; /* Stops it from being pushed to the bottom */
        width: auto;  /* Stops it from taking up the full width */
        margin-top: 0; 
        gap: 1rem; /* Tighter gap between the text links */
    }
    
    .nav-links a { 
        font-size: 1rem; 
    }
    
    .nav-contact {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
    
    .hero { padding-top: 10rem; padding-bottom: 5rem; min-height: auto; }
    
    .hero-left { margin-bottom: 2rem; }
    .text-wrapper-left { margin-right: 0; align-items: center; text-align: center; }
    .subtitle { margin-left: 0; } 
    
    .hero-center { width: 100%; max-width: 300px; }
    
    .hero-right { margin-top: 2rem; }
    .text-wrapper-right { margin-left: 0; align-items: center; text-align: center; }
    .text-wrapper-right p { text-align: center; margin-top: 15px; }
    
    .hi-badge { width: 60px; height: 60px; font-size: 1.2rem; left: -10px; }
    
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .contact-info { flex-direction: column; gap: 1rem; }
    
    .project-card { height: 350px; }
    .project-card h3 { font-size: 1.8rem; }
    .project-card p { font-size: 0.9rem; }
    
    .form-row { grid-template-columns: 1fr; }

    .direct-contact-actions {
        flex-direction: column;
        width: 100%;
    }
    .direct-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content { flex-direction: column; gap: 2rem; }
    .footer-contact { flex-direction: column; gap: 1.5rem; }
    
    /* Slightly less extreme padding on mobile */
    .section-padding { padding: 8rem 2rem; }

    /* Project back to top button */
    .smart-scroll-wrapper { bottom: 20px; }
    .smart-scroll-wrapper.scrolled-past {
        transform: translateX(-70px); /* Tighter margin on mobile */
    }
    .smart-scroll-btn { width: 50px; height: 50px; }
    .smart-scroll-btn svg { width: 24px; height: 24px; }
    
}

@media (max-width: 368px){
    .hero h1 {font-size: 4rem;}
    .section-padding h2 {font-size: 3rem;}

    .name {line-height: 3rem;}
    
    .highlight {font-size: 6rem;}

    .nav-links { 
        order: unset; /* Stops it from being pushed to the bottom */
        width: auto;  /* Stops it from taking up the full width */
        margin-top: 0; 
        gap: 1rem; /* Tighter gap between the text links */
    }
}