/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    /* Colors */
    --bg-primary: #0a0c10;
    --bg-secondary: #12161f;
    --bg-card: rgba(22, 27, 34, 0.7);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    --accent-primary: #2f81f7;
    /* Electric Blue */
    --accent-secondary: #3fb950;
    /* Success Green */
    --accent-glow: rgba(47, 129, 247, 0.2);

    --border-color: #30363d;
    --border-hover: #8b949e;

    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --container-width: 1100px;
    --header-height: 70px;
    --section-gap: 6rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Cursor Glow Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(47, 129, 247, 0.15),
            transparent 40%);
    z-index: -1;
    /* Behind everything */
    pointer-events: none;
    /* Let clicks pass through */
    transition: opacity 0.3s ease;
}

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

a:hover {
    color: #58a6ff;
    text-decoration: underline;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-mono {
    font-family: var(--font-mono);
}

.text-accent {
    color: var(--accent-primary);
}

.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Scroll Down Button */
.scroll-down-btn {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 1.5rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(22, 27, 34, 0.5);
    /* subtle background for better visibility */
    backdrop-filter: blur(4px);
}

.scroll-down-btn:hover {
    color: var(--accent-primary);
    opacity: 1;
    background: rgba(22, 27, 34, 0.8);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

section {
    position: relative;
    /* Ensure absolute positioning works for the button */
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
    border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
    background-color: #2c76e3;
    text-decoration: none;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-secondary);
    text-decoration: none;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: radial-gradient(circle at 50% 20%, rgba(47, 129, 247, 0.1) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
}

.hero-overline {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: block;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(120deg, #fff, #8b949e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-image {
    flex-shrink: 0;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 0 50px rgba(47, 129, 247, 0.25);
    overflow: hidden;
    animation: fadeIn 1.2s ease-out;
    background: var(--bg-secondary);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        padding-top: 2rem;
    }

    .hero-content {
        margin-right: 0;
        margin-bottom: 2rem;
        order: 1;
    }

    .hero-image {
        width: 250px;
        height: 250px;
        margin: 0 auto 2rem auto;
        order: 0;
        /* Image on top active choice for better personal branding on mobile? Or text? Let's try text first (default order). actually let's make explicit order. Text first. */
        order: 2;
        display: none;
        /* Often hero images take too much space on mobile if text is important. Let's keep it but smaller. */
        display: block;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* About Section */
.about {
    padding: var(--section-gap) 0;
}

.scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.scope-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.scope-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.scope-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.scope-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Domains Section */
.domains {
    padding: var(--section-gap) 0;
    background-color: var(--bg-secondary);
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.domain-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
}

.domain-card h3 {
    color: var(--accent-primary);
}

.domain-card ul {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.domain-card li {
    margin-bottom: 0.5rem;
}

/* Case Studies */
.projects {
    padding: var(--section-gap) 0;
}

.project-card {
    margin-bottom: 4rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.project-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: rgba(47, 129, 247, 0.1);
    color: var(--accent-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.project-impact strong {
    color: var(--accent-secondary);
}

/* Blog Preview */
.blog-preview {
    padding: var(--section-gap) 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.blog-card:hover {
    border-color: var(--accent-primary);
}

.blog-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .project-body {
        grid-template-columns: 1fr;
    }

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

/* Article Styling */
.article-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.article-content {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #c9d1d9;
    /* Slightly brighter than standard text-secondary for reading */
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: #c9d1d9;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content code {
    background: rgba(110, 118, 129, 0.4);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 85%;
    font-family: var(--font-mono);
}

.article-content pre {
    background: #161b22;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin-bottom: 2rem;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: #e6edf3;
    font-size: 0.9rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
    margin: 2rem 0;
    color: var(--text-muted);
    font-style: italic;
}

/* Experience Timeline */
.experience-timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
    margin-top: 2rem;
}

.experience-item {
    margin-bottom: 3rem;
    position: relative;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.4rem;
    width: 1rem;
    height: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 10;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.exp-header h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.exp-date {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--bg-card);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.experience-item h4 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

/* Education List */
.education-list {
    margin-top: 0.5rem;
}

.education-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.education-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}