/* Color variables */
:root {
    --bg-color: #050505;
    --card-bg: #0f1214;
    --primary-color: #00f3ff; /* Glowing Cyan */
    --primary-dim: rgba(0, 243, 255, 0.1);
    --primary-border: rgba(0, 243, 255, 0.25);
    --text-color: #e0e0e0;
    --secondary-text: #888;
    --font-main: 'Poppins', sans-serif;
    --font-code: 'Fira Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Grid background effect */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
}

.logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 4px 0;
    transition: 0.4s;
}

/* Hero section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 8% 50px;
    flex-wrap: wrap; 
    gap: 50px;
}

.hero-text {
    flex: 1.2;
    min-width: 320px;
}

.terminal-badge {
    background: var(--primary-dim);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid var(--primary-border);
}

h1 {
    font-size: 3.6rem;
    margin-bottom: 15px;
    line-height: 1.15;
    font-weight: 700;
}

h1 span {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.typewriter {
    font-family: var(--font-code);
    font-size: 1.35rem;
    color: var(--secondary-text);
    min-height: 1.8em;
}

.cursor {
    display: inline-block;
    width: 8px;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
}

.bio-text {
    color: #b0b0b0;
    margin-top: 15px;
    max-width: 540px;
    font-size: 1.05rem;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin: 25px 0 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-code);
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: bold;
}

.stat-desc {
    font-size: 0.85rem;
    color: var(--secondary-text);
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: 0.3s ease;
    font-family: var(--font-main);
}

.btn:hover {
    background: var(--primary-color);
    color: #050505;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: none;
}

.hero-img-container {
    flex: 0.8;
    min-width: 280px;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-img {
    width: 320px;
    height: 420px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
    border: 1px solid var(--primary-border);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-img-container:hover .profile-img {
    transform: translateY(-4px);
    box-shadow: 0 0 45px rgba(0, 243, 255, 0.3);
}

.code-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    font-family: var(--font-code);
    color: rgba(0, 243, 255, 0.08);
    z-index: -1;
    font-size: 5rem;
    font-weight: bold;
}

/* Sections Global */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--secondary-text);
    margin-bottom: 45px;
    font-size: 0.95rem;
}

/* Projects Section */
.projects-section {
    padding: 80px 8%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 243, 255, 0.1);
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    background: #020617;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img {
    transform: scale(1.04);
}

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(5, 5, 5, 0.85);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

/* Terminal Mockup for Project 2 */
.code-preview-wrapper {
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.terminal-mockup {
    width: 100%;
    height: 100%;
    background: #000000;
    border-radius: 6px;
    border: 1px solid #1f2937;
    overflow: hidden;
}

.terminal-bar {
    background: #111827;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    margin-left: 10px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: #94a3b8;
}

.terminal-body {
    padding: 12px;
    color: #38bdf8;
    font-family: var(--font-code);
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-header h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tags span {
    font-family: var(--font-code);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    color: #94a3b8;
}

.project-description {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 12px;
}

.proj-link {
    text-decoration: none;
    font-family: var(--font-code);
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 4px;
    transition: 0.2s ease;
}

.proj-link.primary {
    background: var(--primary-dim);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.proj-link.primary:hover {
    background: var(--primary-color);
    color: #000;
}

.proj-link.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

/* Skills Section */
.skills {
    padding: 80px 8%;
    background: rgba(15, 18, 20, 0.5);
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 10px;
}

.skill-category-card h3 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-code);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 14px;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #d1d5db;
    transition: 0.2s;
}

.skill-tag:hover {
    transform: translateX(4px);
    background: var(--primary-dim);
    color: #ffffff;
}

.skill-tag.highlight {
    border-left-color: #10b981;
    color: #a7f3d0;
}

/* About & Bio */
.bio-section {
    padding: 70px 8%;
    text-align: center;
}

.bio-container {
    max-width: 750px;
    margin: 0 auto;
}

.bio-container p {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Contact */
.contact-section {
    padding: 70px 8%;
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.contact-btn {
    font-size: 0.95rem;
}

footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--secondary-text);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsive Styles */
@media (max-width: 850px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: rgba(5, 5, 5, 0.98);
        text-align: center;
        padding: 30px 0;
        border-bottom: 2px solid var(--primary-color);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 15px 0;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    h1 {
        font-size: 2.8rem;
    }

    .profile-img {
        width: 260px;
        height: 340px;
    }
}