/* =========================================
   DESIGN SYSTEM & THEME TOKENS
   ========================================= */
:root {
    /* -- Palette -- */
    --color-primary: #0f172a;
    /* Slate 900 */
    --color-secondary: #334155;
    /* Slate 700 */
    --color-accent: #3b82f6;
    /* Blue 500 */
    --color-accent-hover: #2563eb;
    /* Blue 600 */
    --color-background: #fafaf9;
    /* Mild Warm (Stone 50) */
    --color-surface: #ffffff;
    /* Pure White Cards */
    --color-border: #e2e8f0;
    /* Slate 200 */
    --color-text: #1e293b;
    /* Slate 800 */
    --color-text-muted: #64748b;
    /* Slate 500 */

    /* -- Apps -- */
    --max-width: 1000px;
    --header-height: 70px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* =========================================
   RESET & BASE TYPOGRAPHY
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    font-size: 1.15rem;
    /* Increased base font size for desktop */
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* =========================================
   LAYOUT COMPONENTS
   ========================================= */
/* Header */
header {
    height: var(--header-height);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.nav-link {
    color: var(--color-primary);
    font-weight: 600;
    margin-right: 28px;
    font-size: 1.15rem;
    /* Increased from 1.05rem */
}

/* ... existing code ... */

.profile-content h2 {
    margin-top: 0;
    font-size: 2.2rem;
    /* Increased from 2rem */
    color: var(--color-primary);
}

.profile-content p {
    font-size: 1.2rem;
    /* Increased from 1.1rem */
    color: var(--color-text);
    line-height: 1.7;
}

/* ... existing code ... */

h1 {
    font-size: 2.5rem;
    /* Increased from 2.25rem */
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5em;
    margin-top: 0;
}

h2 {
    font-size: 2rem;
    /* Increased from 1.75rem */
}

h3 {
    font-size: 1.5rem;
    /* Increased from 1.25rem */
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
    text-decoration: none;
}

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

/* Footer */
footer {
    margin-top: 80px;
    padding: 60px 20px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    background: #f8fafc;
    /* Slight contrast footer bg */
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px;
    font-weight: 600;
    color: var(--color-primary) !important;
    /* Force visible dark color */
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.footer-link:hover {
    color: var(--color-accent) !important;
    transform: translateY(-2px);
}

.footer-link i {
    font-size: 1.3rem;
}

/* =========================================
   UI COMPONENTS (Reusable)
   ========================================= */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: var(--color-accent);
    color: white !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.1s, background-color 0.2s;
}

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

.btn--github {
    background-color: #24292e;
}

.btn--linkedin {
    background-color: #0077b5;
}

/* Cards (Feature Grid) */
/* Cards (Feature Grid) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* DEFAULT: 3 Columns (Desktop First) */
    gap: 20px;
    margin: 30px 0;
}

/* Mobile: Stack them */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: all 0.2s ease;
    height: 100%;
    /* Ensure uniform height */
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
}

.card-icon-wrapper {
    text-align: center;
    margin-bottom: 16px;
}

.card-icon-wrapper i {
    font-size: 2.2rem;
    color: var(--color-accent);
}

.feature-card h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    text-align: center;
    margin: 0;
    flex-grow: 1;
    /* Pushes content to fill space */
}

/* Hero Banner */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1e293b 100%);
    color: white;
    padding: 40px 20px;
    /* Reduced padding */
    text-align: center;
    margin-bottom: 40px;
    min-height: 200px;
    /* Reduced height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Blockquote Styling */
blockquote {
    border-left: 4px solid var(--color-accent);
    margin: 1.5em 0;
    padding-left: 1em;
    font-style: italic;
    color: var(--color-text-muted);
    background: transparent;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: 2.5rem;
    letter-spacing: -0.05em;
    color: white !important;
    border-bottom: none;
}

.hero p {
    font-size: 2.5rem;
    /* 40px */
    color: #f1f5f9;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 700;
    line-height: 1.25;
}

/* -- Profile Section (Bio) -- */
.profile-section {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 40px 0 60px 0;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}

.profile-avatar {
    flex: 0 0 180px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.profile-content h2 {
    margin-top: 0;
    font-size: 2rem;
    color: var(--color-primary);
}

.profile-content p {
    font-size: 1.1rem;
    color: var(--color-text);
    line-height: 1.7;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* Profile Links (Mini Sidebar Replacement) */
.profile-links {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

.profile-link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.profile-link-item:hover {
    color: var(--color-accent);
}

.profile-link-item i {
    color: var(--color-text-muted);
}

/* Typography Headings */
h1,
h2,
h3 {
    color: var(--color-primary);
    letter-spacing: -0.025em;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

h1 {
    font-size: 2.25rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5em;
    margin-top: 0;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

/* Images & Gallery */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.2s;
}

.gallery img:hover {
    transform: scale(1.02);
}

/* =========================================
   MOBILE RESPONSIVENESS FIXES
   ========================================= */
@media (max-width: 768px) {

    /* Header & Navigation */
    header {
        height: auto;
        position: sticky;
        top: 0;
    }

    .nav-container {
        /* Enable horizontal scrolling */
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px;
        width: 100%;
        height: 60px;
        align-items: center;
        mask-image: linear-gradient(to right, black 90%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    }

    /* Hide scrollbars */
    .nav-container::-webkit-scrollbar {
        display: none;
    }

    .nav-container {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav-link {
        margin-right: 20px;
        font-size: 0.95rem;
        flex-shrink: 0;
        /* Prevent shrinking */
    }

    /* Hero Text Sizing */
    .hero {
        padding: 30px 15px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1.25rem;
        /* Significantly smaller than desktop 2.5rem */
        line-height: 1.4;
    }

    /* Main Container Padding */
    main {
        margin: 20px auto;
        padding: 0 16px;
    }

    /* Center Profile on Mobile */
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding-bottom: 30px;
    }

    .profile-content p {
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        padding: 0 10px;
        /* Added slight side padding */
    }

    .profile-avatar {
        width: 140px;
        height: 140px;
        flex: 0 0 140px;
        /* Prevent flex shrinking */
        margin: 0 auto;
    }

    .profile-links {
        justify-content: center;
        gap: 15px;
    }
}