:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --dark-bg: #0b0e14;
    --card-bg: #161b22;
    --text-main: #e6edf3;
    --text-dim: #8b949e;
    --accent: #58a6ff;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Nav */
header {
    background: rgba(11, 14, 20, 0.98);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #30363d;
    backdrop-filter: blur(10px);
}

nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.hero-text h5 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-text h3 {
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.typing {
    color: var(--accent);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-img .img-box {
    width: min(400px, 80vw);
    aspect-ratio: 1/1;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.2);
    animation: morph 8s ease-in-out infinite;
}

.hero-img .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: #0b0e14;
}

.btn-primary:hover {
    background: #00b4db;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.2);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-secondary:hover {
    background: rgba(0, 210, 255, 0.1);
    transform: translateY(-3px);
}

/* Section Common */
section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* About */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-dim);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #30363d;
    transition: all 0.3s ease;
}

.skill-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    background: #1c2128;
}

.skill-card i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.skill-card p {
    color: var(--text-dim);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    position: relative;
    height: 300px;
    background: #161b22;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #30363d;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.9));
    z-index: 1;
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 2;
}

.project-info h3 { margin-bottom: 0.5rem; font-size: 1.3rem; }
.project-info p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 1.2rem; }
.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.project-link:hover { text-decoration: underline; }

/* Contact Form */
.contact-wrapper {
    max-width: 650px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid #30363d;
}

.form-group {
    margin-bottom: 1.5rem;
}

input, textarea {
    width: 100%;
    padding: 1.2rem;
    background: #0b0e14;
    border: 1px solid #30363d;
    color: #fff;
    border-radius: 10px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--primary-color);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid #30363d;
    text-align: center;
}

footer p { color: var(--text-dim); margin-bottom: 1.5rem; }

.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.socials a {
    color: var(--text-main);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.socials a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Reveal Animations */
.hidden-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Tablets & Mobile Navigation */
@media (max-width: 992px) {
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 4rem;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-img {
        justify-content: center;
    }

    .cta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #161b22;
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    section {
        padding: 60px 0;
    }

    .contact-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-img .img-box {
        width: 250px;
    }

    .cta .btn {
        width: 100%;
    }
}
