@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Roboto+Mono:wght@400;700&display=swap');

:root {
    --primary-color: #00a8ff;
    --secondary-color: #00c3ff;
    --background-color: #0a0a14;
    --surface-color: #101224;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --muted-text-color: #a0a0b0;
    --border-color: rgba(0, 168, 255, 0.2);
    --shadow-color: rgba(0, 168, 255, 0.1);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-color);
}

/* Update body styles to include grid background */
body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
    position: relative;
}

/* Add grid background to body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.8;
    z-index: -2;
    pointer-events: none;
}
/* Remove the old glitch effect styles and add new name animation styles */

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
}

.text-prefix {
    color: var(--text-color);
    opacity: 0.9;
}

.name-animation {
    position: relative;
    display: inline-block;
    height: 1.2em;
    overflow: hidden;
    color: var(--primary-color);
}

.name-slide {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    animation: slideName 9s cubic-bezier(0.23, 1, 0.32, 1) infinite;
    opacity: 0;
    transform: translateY(100%);
}

.name-slide:nth-child(1) {
    animation-delay: 0s;
}

.name-slide:nth-child(2) {
    animation-delay: 3s;
}

.name-slide:nth-child(3) {
    animation-delay: 6s;
}

@keyframes slideName {
    0%, 5% {
        opacity: 0;
        transform: translateY(100%);
    }
    10%, 25% {
        opacity: 1;
        transform: translateY(0);
    }
    30%, 35% {
        opacity: 0;
        transform: translateY(-100%);
    }
    100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* Add a typing cursor effect */
.name-animation::after {
    content: '|';
    position: absolute;
    right: -0.5rem;
    top: 0;
    color: var(--primary-color);
    animation: blink 1s steps(2) infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive adjustments for the new name animation */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .text-prefix {
        display: block;
    }
    
    .name-animation {
        height: 1.2em;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}
/* Updated Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.4;
}

.matrix-rain span {
    position: absolute;
    top: -20px;
    color: rgb(30, 255, 0);
    font-family: var(--font-secondary);
    animation: fall linear infinite;
    opacity: 0.5;
}

.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: grid-pan 15s linear infinite;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 0 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    backdrop-filter: blur(5px);
    background: rgba(10, 10, 20, 0.5);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.hero-text {
    padding: 2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
    position: relative;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: flex-start;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 168, 255, 0.1);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-description {
        margin: 0 auto 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        width: 100%;
    }
}
/* --- Custom Cursor --- */
/* Removed `cursor: none` for accessibility. The follower is an enhancement. */
.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s, opacity 0.3s;
    opacity: 0;
}

/* Show cursor only on devices that can hover */
@media (hover: hover) and (pointer: fine) {
    body:hover .cursor-follower {
        opacity: 1;
    }
    a:hover ~ .cursor-follower,
    button:hover ~ .cursor-follower {
        width: 40px;
        height: 40px;
        background-color: var(--shadow-color);
    }
}

/* Hide custom cursor on touch devices or small screens */
@media (pointer: coarse), (max-width: 1024px) {
    .cursor-follower {
        display: none;
    }
}


/* --- Global Styles --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    background-color: var(--shadow-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
}

.section-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}


/* --- Navbar --- */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: var(--heading-color);
    text-decoration: none;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: var(--primary-color);
}

.logo-subtitle {
    font-size: 1rem;
    margin-left: 0.5rem;
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--heading-color);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}


/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 5rem; /* Add padding for navbar */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.matrix-rain span {
    position: absolute;
    top: -20px;
    color: var(--primary-color);
    font-family: var(--font-secondary);
    animation: fall linear infinite;
    opacity: 0.5;
}

@keyframes fall {
    to { transform: translateY(105vh); }
}

.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0;
    animation: grid-pan 10s linear infinite;
}

@keyframes grid-pan {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
    position: relative;
    color: var(--heading-color);
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    overflow: hidden;
    clip-path: inset(50% 0 50% 0);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-color);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary-color);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(10% 0 80% 0); } 100% { clip-path: inset(40% 0 10% 0); }
}
@keyframes glitch-anim-2 {
    0% { clip-path: inset(70% 0 5% 0); } 100% { clip-path: inset(20% 0 50% 0); }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 550px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary-color); font-family: var(--font-secondary); }
.stat-label { font-size: 0.9rem; color: var(--muted-text-color); }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.security-shield { width: 250px; height: 250px; position: relative; display: flex; justify-content: center; align-items: center; }
.shield-icon { font-size: 10rem; color: var(--primary-color); z-index: 2; animation: pulse 2s infinite; }
.shield-layers { position: absolute; width: 100%; height: 100%; border-radius: 50%; }

.shield-layers::before,
.shield-layers::after {
    content: '';
    position: absolute;
    inset: -20%;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    animation: rotate 8s linear infinite;
}

.shield-layers::after { inset: -40%; animation-direction: reverse; }

@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }

.floating-icons .icon-float { position: absolute; font-size: 1.5rem; color: var(--secondary-color); opacity: 0.5; animation: float 6s ease-in-out infinite; }
.icon-float:nth-child(1) { top: 0; left: 10%; }
.icon-float:nth-child(2) { top: 20%; right: 0; }
.icon-float:nth-child(3) { bottom: 10%; left: 0; }
.icon-float:nth-child(4) { bottom: 0; right: 20%; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }


/* --- About Section --- */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-intro { font-size: 1.2rem; font-weight: 600; margin-bottom: 2rem; color: var(--heading-color); }
.about-details { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.detail-item { display: flex; align-items: center; gap: 0.8rem; }
.detail-item i { color: var(--primary-color); font-size: 1.2rem; }
.specializations h3 { margin-bottom: 1.5rem; color: var(--heading-color); }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.spec-item { background-color: var(--surface-color); padding: 1rem; border-radius: 8px; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border-color); transition: transform 0.3s, box-shadow 0.3s; }
.spec-item:hover { transform: translateY(-5px); box-shadow: 0 5px 15px var(--shadow-color); }
.spec-item i { font-size: 1.5rem; color: var(--primary-color); }
.about-visual { display: flex; justify-content: center; }
.profile-card { background: var(--surface-color); border-radius: 15px; padding: 2rem; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.2); position: relative; }

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 5px solid var(--primary-color);
    overflow: hidden;
}
.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.security-metrics { display: flex; justify-content: space-around; text-align: center; }
.metric-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }


/* --- Skills Section --- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.skill-category { background-color: var(--surface-color); padding: 2rem; border-radius: 10px; border: 1px solid var(--border-color); }
.category-title { color: var(--heading-color); margin-bottom: 1.5rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; display: inline-block; }
.skill-item { margin-bottom: 1rem; }
.skill-name { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.skill-bar { width: 100%; height: 10px; background-color: rgba(255, 255, 255, 0.1); border-radius: 5px; overflow: hidden; }
.skill-progress { width: 0; height: 100%; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); border-radius: 5px; transition: width 1s ease-in-out; }


/* --- Experience Section --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 3px; background-color: var(--border-color); top: 0; bottom: 0; left: 50%; transform: translateX(-50%); }
.timeline-item { padding: 1rem 3rem; position: relative; width: 50%; opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s; }
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-marker { position: absolute; width: 20px; height: 20px; border-radius: 50%; background-color: var(--background-color); border: 4px solid var(--primary-color); top: 25px; z-index: 1; transition: transform 0.3s; }
.timeline-item:nth-child(odd) .timeline-marker { right: -10px; }
.timeline-item:nth-child(even) .timeline-marker { left: -10px; }
.timeline-item:hover .timeline-marker { transform: scale(1.2); }
.timeline-content { padding: 1.5rem; background-color: var(--surface-color); border-radius: 8px; border: 1px solid var(--border-color); position: relative; }
.timeline-header { margin-bottom: 1rem; }
.timeline-header h3 { color: var(--primary-color); }
.company { font-weight: 600; color: var(--heading-color); }
.duration { float: right; font-size: 0.9rem; color: var(--muted-text-color); }


/* --- Projects Section --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.project-card { background-color: var(--surface-color); border-radius: 10px; overflow: hidden; border: 1px solid var(--border-color); transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px var(--shadow-color); }
.project-image-container { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; }
.project-image-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover img { transform: scale(1.05); }
.project-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-title { color: var(--heading-color); margin-bottom: 0.5rem; }
.project-description { margin-bottom: 1rem; color: var(--muted-text-color); flex-grow: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tech-tag { background-color: var(--shadow-color); color: var(--primary-color); padding: 0.3rem 0.8rem; border-radius: 15px; font-size: 0.8rem; }
.project-links a { color: var(--text-color); font-size: 1.5rem; margin-right: 1rem; transition: color 0.3s, transform 0.3s; }
.project-links a:hover { transform: scale(1.2); color: var(--primary-color); }


/* --- Certifications Section --- */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; }
.cert-card { background-color: var(--surface-color); padding: 2rem 1rem; border-radius: 10px; text-align: center; border: 1px solid var(--border-color); transition: transform 0.3s, box-shadow 0.3s; }
.cert-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px var(--shadow-color); }
.cert-badge { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }
.cert-name { font-size: 1.2rem; font-weight: 700; color: var(--heading-color); }
.cert-org { color: var(--muted-text-color); font-size: 0.9rem; }


/* --- Blog Section --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.blog-card { background-color: var(--surface-color); border-radius: 10px; overflow: hidden; border: 1px solid var(--border-color); transition: transform 0.3s, box-shadow 0.3s; }
.blog-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px var(--shadow-color); }
.blog-link-wrapper { text-decoration: none; color: inherit; display: block; }
.blog-image-container { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; }
.blog-image-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-card:hover img { transform: scale(1.05); }
.blog-content { padding: 1.5rem; }
.blog-title { color: var(--heading-color); margin-bottom: 0.5rem; }
.blog-excerpt { color: var(--muted-text-color); margin-bottom: 1rem; }
.blog-meta { font-size: 0.8rem; color: var(--muted-text-color); }


/* --- Contact Section --- */
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; background-color: var(--surface-color); padding: 3rem; border-radius: 10px; border: 1px solid var(--border-color); }
.contact-info h3 { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 1rem; }
.contact-methods { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.contact-method { display: flex; align-items: center; gap: 1rem; }
.contact-method i { font-size: 1.5rem; color: var(--primary-color); }
.method-label { display: block; color: var(--muted-text-color); }
.method-value { color: var(--text-color); text-decoration: none; transition: color 0.3s; }
.method-value:hover { color: var(--primary-color); }
.social-links { margin-top: 2rem; display: flex; gap: 1rem; }
.social-link { color: var(--muted-text-color); font-size: 1.5rem; transition: color 0.3s, transform 0.3s; }
.social-link:hover { color: var(--primary-color); transform: translateY(-3px); }
.form-group { position: relative; margin-bottom: 2rem; }
.form-input { width: 100%; padding: 0.8rem 0; background: transparent; border: none; border-bottom: 2px solid var(--border-color); color: var(--heading-color); font-size: 1rem; outline: none; transition: border-color 0.3s; }
.form-input:focus { border-bottom-color: var(--primary-color); }
.form-label { position: absolute; top: 0.8rem; left: 0; color: var(--muted-text-color); transition: all 0.3s; pointer-events: none; }
.form-input:focus ~ .form-label, .form-input:not(:placeholder-shown) ~ .form-label { top: -1.2rem; font-size: 0.8rem; color: var(--primary-color); }
.form-submit { width: 100%; display: flex; justify-content: center; align-items: center; gap: 0.5rem; }


/* --- Footer --- */
.footer { background-color: var(--surface-color); padding: 4rem 0 2rem; border-top: 1px solid var(--border-color); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.footer-logo { margin-bottom: 1rem; }
.footer-title { color: var(--heading-color); margin-bottom: 1rem; }
.footer-link { display: block; color: var(--muted-text-color); text-decoration: none; margin-bottom: 0.5rem; transition: color 0.3s; }
.footer-link:hover { color: var(--primary-color); }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; color: var(--muted-text-color); }
.footer-legal { display: flex; gap: 1rem; }
.footer-legal-link { text-decoration: none; color: var(--muted-text-color); transition: color 0.3s; }
.footer-legal-link:hover { color: var(--primary-color); }

/* --- Scroll To Top --- */
.scroll-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; background: var(--primary-color); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.4s; z-index: 999; border: none; }
.scroll-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }


/* --- Responsive Design --- */

/* Medium devices (tablets, less than 992px) */
@media (max-width: 992px) {
    .hero-content, .about-content, .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text { order: 2; }
    .hero-visual { order: 1; margin-bottom: 3rem; }
    .hero-stats, .hero-buttons { justify-content: center; }
    .hero-description { margin-left: auto; margin-right: auto; }
    
    .timeline::after { left: 20px; transform: translateX(0); }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 1rem; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; }
    .timeline-marker { left: 10px; }
    .timeline-item:nth-child(odd) .timeline-marker, .timeline-item:nth-child(even) .timeline-marker { left: 10px; }
    .duration { display: block; float: none; margin-top: 0.5rem; }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        justify-content: center;
        background-color: var(--surface-color);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: left 0.3s ease-in-out;
        gap: 2rem;
        padding-top: 0;
    }
    .nav-menu.active { left: 0; }
    .nav-link { font-size: 1.5rem; }
    .nav-toggle { display: block; }

    .nav-toggle.active .bar:nth-child(2) { opacity: 0; }
    .nav-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .nav-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    section { padding: 4rem 0; }
    .section-title { font-size: 2.2rem; }
    .about-details { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
}

/* Extra small devices (portrait phones, less than 480px) */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-stats { gap: 1rem; }
    .stat-item { flex-basis: 45%; }
    .contact-content { padding: 1.5rem; gap: 2rem; }
    .footer-content { text-align: center; }
    .footer-links { display: flex; flex-direction: column; align-items: center; }
}
