/* --- Base Styles & Variables --- */
:root {
    --bg-main: #0b1120;
    --bg-secondary: #1e293b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #f87171; /* changed to red accent */
    --primary-hover: #dc2626;
    --accent: #10b981;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: #334155;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 800;
}

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

.nav-links a {
    color: var(--text-main);
    margin-left: 30px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.resume-btn {
    border: 1px solid var(--primary);
    color: var(--primary) !important;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.resume-btn:hover {
    background-color: rgba(248, 113, 113, 0.1);
}

/* --- Header / Hero Section --- */
header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 0 20px;
}

.header-content {
    max-width: 800px;
    text-align: center;
}

.greeting {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    margin-bottom: 10px;
}

header h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin: 0 0 20px 0;
    color: #f8fafc;
}

.gradient-text {
    background: linear-gradient(90deg, #f87171, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Typing effect container below subtitle */
.typing-container {
    margin-top: 10px;
    margin-bottom: 25px;
    font-size: 2.2rem;
    color: var(--primary);
    font-weight: 600;
    text-align: center;
    font-family: 'Fira Code', monospace;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary);
    animation: blink 0.75s step-end infinite;
}

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

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Skills */
.hero-skills {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-skill {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* Remove hover effect from hero skills */
.hero-skill:hover {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    transform: none;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--bg-main);
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.secondary-btn {
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.secondary-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* --- General Sections --- */
.section-container {
    padding: 80px 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.bg-darker {
    background-color: #080d18;
    max-width: 100%;
    padding-left: 10%;
    padding-right: 10%;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    color: #f8fafc;
}

.section-title::after {
    content: "";
    display: block;
    height: 1px;
    width: 300px;
    background-color: var(--border-color);
    margin-left: 20px;
    flex-grow: 1;
    max-width: 300px;
}

/* --- About --- */
.about-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 800px;
}

.about-content strong {
    color: var(--primary);
}

/* --- Skills Progress Bars --- */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-box {
    width: 100%;
}

.skill-box .title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    font-family: 'Fira Code', monospace;
}

.skill-box .title i {
    color: var(--primary);
    margin-right: 5px;
}

.skill-bar {
    height: 10px;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 6px;
    position: relative;
}

.skill-per {
    position: absolute;
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.tooltip {
    position: absolute;
    right: -14px;
    top: -28px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--primary);
    z-index: 1;
}

.tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    height: 10px;
    width: 10px;
    z-index: -1;
    background-color: var(--primary);
    transform: translateX(-50%) rotate(45deg);
}

/* --- Projects --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.folder-icon {
    font-size: 2.5rem;
    color: var(--primary);
}

.project-header a {
    color: var(--text-main);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.project-header a:hover {
    color: var(--text-main); /* remove hover effect */
}

.project-card h3 {
    margin-top: 0;
    color: #f8fafc;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tech-stack {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--accent);
}

/* Remove hover on tech-stack */
.tech-stack span:hover {
    color: var(--accent);
    cursor: default;
    font-size: 14px;
}

/* --- Contact --- */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-item {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 25px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Scroll Animations via JS --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }
    
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .nav-links a {
        margin: 0;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .section-container {
        padding: 60px 20px;
    }

    .section-title::after {
        width: 100px;
    }
    
    .btn {
        margin-bottom: 10px;
    }
}

.project-impact {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--accent);
    font-family: 'Fira Code', monospace;
}
