/* ==========================================
   Modern Dark-Mode Stylesheet for Portfolio
   ========================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
    --bg-primary: #0a0f1d;
    --bg-secondary: #111827;
    --bg-card: #1f293d;
    --bg-card-hover: #26334d;
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-blue: #3b82f6;
    --accent-teal: #14b8a6;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.4);
    
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace, consolas;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);
}

/* --- Base Reset & Setup --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* --- Typography Helpers --- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: table;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    margin: 8px auto 0 auto;
}

/* --- Layout Sections --- */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

/* --- Navigation Bar Fix --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none; /* Removes bullet points */
    margin: 0;
    padding: 0;
}

.nav-links li {
    list-style: none; /* Extra safeguard against default bullet points */
}

.nav-links a {
    color: var(--text-secondary, #94a3b8);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast, all 0.2s ease);
}

.nav-links a:hover {
    color: var(--accent-blue, #6366f1);
}

.btn-nav {
    border: 1px solid var(--accent-blue, #6366f1);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    color: var(--accent-blue, #6366f1) !important;
}

.btn-nav:hover {
    background-color: rgba(99, 102, 241, 0.1);
}
.logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    float: left;
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
}

.logo-code {
    color: var(--accent-blue);
    font-weight: 800;
}

.logo:hover {
    color: var(--accent-teal);
    transform: translateY(-1px);
}
.nav-links {
    float: right;
}

.nav-links li {
    display: inline-block;
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.btn-nav {
    border: 1px solid var(--accent-blue);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    color: var(--accent-blue) !important;
}

.btn-nav:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* --- Hero Section (Fixed Flexbox Alignment) --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;       /* Vertically centers image and text */
    justify-content: center;   /* Horizontally centers content in container */
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
}

.hero-container {
    display: flex;
    align-items: center;       /* Aligns profile photo with middle of text block */
    gap: 3.5rem;               /* Clean spacing between photo and text */
    width: 100%;
}

.hero-image {
    flex-shrink: 0;            /* Prevents image from shrinking when screen resizes */
}

.profile-photo {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.profile-photo:hover {
    transform: scale(1.05);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}

.hero-content {
    flex: 1;                   /* Allows text to take up remaining space */
}

/* Mobile Responsiveness (Stacked Alignment) */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column; /* Stacks image above text on phones */
        text-align: center;
        gap: 2rem;
    }

    .profile-photo {
        width: 190px;
        height: 190px;
    }
}

    /* Existing hero adjustments on mobile remain */
    .hero-title {
        font-size: 2.4rem;
    }
    /* ... other existing mobile styles ... */

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    margin-right: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.social-links a {
    display: inline-block;
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-right: 1.5rem;
}

.social-links a:hover {
    color: var(--accent-blue);
    transform: translateY(-3px);
}

/* --- Technical Skills Grid --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition-smooth);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
}

.skill-header {
    display: table;
    margin-bottom: 1.5rem;
}

.skill-header i {
    font-size: 1.8rem;
    color: var(--accent-blue);
    float: left;
    margin-right: 0.8rem;
}

.skill-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.8rem;
}

.tags {
    display: block;
}

.tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--accent-teal);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    margin: 0.3rem 0.3rem 0.3rem 0;
    transition: var(--transition-fast);
}

.tag:hover {
    background: rgba(20, 184, 166, 0.15);
    border-color: var(--accent-teal);
}

/* --- Featured Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-fast);
}

.project-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
}

.project-card:hover::before {
    opacity: 1;
}

.project-type {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.project-bullets {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.project-bullets li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.project-tech {
    margin-bottom: 1.8rem;
}

.project-tech span {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-right: 0.8rem;
    margin-bottom: 0.4rem;
}

.project-links {
    border-top: 1px solid var(--border-color);
    padding-top: 1.2rem;
}

.project-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 1.2rem;
}

.project-link i {
    color: var(--accent-blue);
    margin-right: 0.4rem;
}

.project-link:hover {
    color: var(--accent-blue);
}

/* --- Contact Section --- */
.contact-section {
    text-align: center;
    max-width: 700px;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-family: var(--font-mono);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links li {
        margin-left: 1rem;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .btn-primary {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
        text-align: center;
    }

    .btn-secondary {
        display: block;
        width: 100%;
        text-align: center;
    }
}
/* ==========================================
   MOBILE & TABLET RESPONSIVE STYLES
   ========================================== */

/* Tablet & Mobile Screens (768px and smaller) */
@media screen and (max-width: 768px) {
    
    /* 1. Header & Navigation Adjustments */
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.9rem;
    }

    /* 2. Hero Section Adjustments */
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 5rem;
        gap: 2rem;
    }

    .hero-image img {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-links {
        justify-content: center;
    }

    /* 3. Grid Section Adjustments (Skills & Projects) */
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr; /* Stacks cards into a single column */
        gap: 1.5rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* Extra Small Phones (480px and smaller) */
@media screen and (max-width: 480px) {
    .btn {
        width: 100%; /* Makes buttons full-width for easy finger tapping */
        text-align: center;
    }
}
