@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #00f2fe;
    --secondary: #6a11cb;
    --accent: #7ef0d1;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
}

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

/* Three.js Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    outline: none;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 10%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.navbar a {
    font-size: 1.1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    margin-left: 2.5rem;
    transition: var(--transition);
    position: relative;
}

.navbar a:hover, .navbar a.active {
    color: var(--primary);
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.navbar a:hover::after, .navbar a.active::after {
    width: 100%;
}

/* Hero Section */
section {
    min-height: 100vh;
    padding: 8rem 10% 4rem;
}

.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.home-content {
    max-width: 600px;
}

.home-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

.home-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin: 0.5rem 0;
    line-height: 1.1;
}

.home-content h3 span {
    color: var(--primary);
}

.home-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 1.5rem 0 2rem;
}

.home-sci {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.home-sci a {
    width: 45px;
    height: 45px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.home-sci a:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
}

.btn-box {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(106, 17, 203, 0.2);
}

.btn-box:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(106, 17, 203, 0.4);
}

.profile-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    object-fit: cover;
    border: 4px solid var(--glass-border);
    animation: morph 8s ease-in-out infinite alternate;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* About Section */
.about-section {
    background: rgba(30, 41, 59, 0.3);
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
}

.section-title span {
    color: var(--primary);
}

.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.about-tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 2rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
}

.tab-contents {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.tab-contents.active-tab {
    display: block;
}

.about-box {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    padding: 1rem;
    background: var(--glass);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.skill-item:hover {
    background: rgba(0, 242, 254, 0.1);
    transform: translateY(-5px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-img {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--glass);
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: var(--glass);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent);
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
}

/* Services Section */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.service-card:hover {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.05), rgba(106, 17, 203, 0.05));
    transform: translateY(-10px);
    border-color: var(--primary);
}

.service-card i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--glass);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
}

.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.send-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .home { flex-direction: column; text-align: center; }
    .home-content { margin: 0 auto; }
    .home-sci { justify-content: center; }
    .contact-container { grid-template-columns: 1fr; }
    .profile-wrapper { width: 300px; height: 300px; }
}

@media (max-width: 768px) {
    .navbar { display: none; } /* Add burger menu later if needed */
    .home-content h1 { font-size: 3rem; }
    section { padding: 6rem 5% 3rem; }
}
