/* --- Global Styles & Variables --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --header-bg: #ffffff;
    --font-family: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--secondary-color);
    font-weight: 700;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* --- Hero Section (Homepage) --- */
.hero {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* --- Main Content & Cards --- */
.content {
    padding: 3rem 0;
}

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.card p {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card small {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.read-more {
    font-weight: 700;
    align-self: flex-start;
}

/* --- Tags --- */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}
.tag-ai { background-color: #dc3545; }
.tag-hardware { background-color: #28a745; }
.tag-security { background-color: #ffc107; color: #333; }
.tag-code { background-color: #17a2b8; }

/* --- Projects Page --- */
.project-card .card-content {
    justify-content: space-between;
}

.project-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #5a6268;
}

/* --- About Page --- */
.about-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--card-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.about-text {
    flex: 1;
}

.social-links {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    background: #e9ecef;
    border-top: 1px solid var(--border-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .about-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}