:root {
    --bg-main: #0b0b0b;
    --bg-alt: #161616;
    --text-primary: #ffffff;
    --text-secondary: #a8a8a8;
    --accent: #0f62fe; /* IBM Blue */
    --border: #262626;
    --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 2rem; }

/* Navigation */
nav { padding: 1.5rem 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(11, 11, 11, 0.8); backdrop-filter: blur(10px); z-index: 100; }
nav .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 600; font-size: 1.25rem; letter-spacing: -1px; }
.logo span { color: var(--accent); }
nav ul { display: flex; list-style: none; gap: 2rem; }
nav a { text-decoration: none; color: var(--text-secondary); font-size: 0.85rem; transition: 0.3s; }
nav a:hover { color: var(--text-primary); }

/* Hero */
header { padding: 10rem 0 7rem; }
.label { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 1rem; }
h1 { font-size: 3.5rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.04em; max-width: 800px; margin-bottom: 1.5rem; }
.highlight { color: var(--text-secondary); font-style: italic; font-weight: 300; }
.description { font-size: 1.25rem; color: var(--text-secondary); max-width: 600px; margin-bottom: 2.5rem; }

.btn { display: inline-block; padding: 0.8rem 1.5rem; text-decoration: none; font-size: 0.9rem; font-weight: 600; border-radius: 4px; margin-right: 1rem; transition: 0.3s; }
.btn.primary { background: var(--accent); color: white; }
.btn.secondary { border: 1px solid var(--border); color: white; }
.btn:hover { opacity: 0.8; }

/* Sections */
section { padding: 7rem 0; border-bottom: 1px solid var(--border); }
.alt-bg { background-color: var(--bg-alt); }
.section-title { font-size: 0.8rem; font-family: var(--mono); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 3rem; }

/* Open Source Grid */
.project-card { background: var(--bg-alt); padding: 2.5rem; border: 1px solid var(--border); border-radius: 8px; }
.repo-type { color: var(--accent); font-family: var(--mono); font-size: 0.7rem; }
.project-card h3 { font-size: 1.75rem; margin: 0.5rem 0 1rem; }
.tech-stack { margin-top: 2rem; }
.tech-stack span { font-family: var(--mono); font-size: 0.7rem; color: var(--text-secondary); border: 1px solid var(--border); padding: 0.3rem 0.6rem; margin-right: 0.5rem; border-radius: 3px; }

/* Patent List */
.patent-item { margin-bottom: 3rem; }
.patent-no { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.patent-item h4 { font-size: 1.25rem; margin: 0.2rem 0 0.5rem; }
.patent-item p { color: var(--text-secondary); }

/* Pub List */
.pub-list { list-style: none; }
.pub-list li { display: flex; gap: 3rem; margin-bottom: 2rem; }
.pub-year { font-family: var(--mono); color: var(--accent); }
.pub-info strong { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.pub-info p { color: var(--text-secondary); font-size: 0.9rem; }

/* Footer */
footer { padding: 4rem 0; font-size: 0.8rem; color: var(--text-secondary); }
.footer-wrap { display: flex; justify-content: space-between; }
.footer-links a { color: var(--text-secondary); text-decoration: none; margin-left: 1.5rem; }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .pub-list li { flex-direction: column; gap: 0.5rem; }
}

/* Hero Layout with Image */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px; /* Slight rounding for a modern look */
    filter: grayscale(20%); /* Optional: subtle professional desaturation */
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Responsive adjustment for mobile */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image {
        order: -1; /* Puts image above text on mobile */
        max-width: 300px;
        margin: 0 auto 2rem;
    }
    .cta-group {
        display: flex;
        justify-content: center;
        gap: 1rem;
    }
}

/* Contact Section Styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.status-indicator {
    margin-top: 2rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: #00ff41; /* Matrix/Terminal Green */
}

.status-indicator .dot {
    height: 8px;
    width: 8px;
    background-color: #00ff41;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    box-shadow: 0 0 8px #00ff41;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: #111;
    border: 1px solid var(--border);
    color: white;
    font-family: var(--mono);
    border-radius: 4px;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

/* Adds spacing between paragraphs in the About/Bio section */
.bio-content p {
    margin-bottom: 1.5rem;
}

/* Removes margin from the last paragraph so the spacing is even */
.bio-content p:last-child {
    margin-bottom: 0;
}
.bio-content {
    line-height: 1.8; /* Increases vertical space between lines of text */
    color: var(--text-secondary); /* Makes it slightly softer on the eyes */
}

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

.project-card {
    background: var(--bg-main);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

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

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

.tech-stack span {
    font-family: var(--mono);
    font-size: 0.7rem;
    background: rgba(15, 98, 254, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* Blog List */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.blog-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.blog-date {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 80px;
}

.blog-content h3 a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.blog-content h3 a:hover {
    color: var(--accent);
}

.blog-content p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.view-all {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
}