/* --- Global Styles & Variables --- */
:root {
    /* Dark Professional Color Palette */
    --primary-dark: #1a2a40;   /* Very dark blue/almost black */
    --secondary-dark: #121e2c; /* Even darker blue for backgrounds/scrolled navbar */
    --primary-blue: #007bff;   /* Standard professional blue for accents/buttons */
    --accent-teal: #00c0a6;    /* Teal/Aqua for highlights */

    --light-text: #e0e7ff;     /* Very light blue for text on dark backgrounds */
    --dark-text: #212529;      /* Near-black for main text on light backgrounds */
    --medium-grey: #495057;    /* Medium grey for paragraph text on light backgrounds */
    --light-grey-text: #6c757d; /* Lighter grey for subtle text on light backgrounds */

    --bg-light: #f8f9fa;       /* Off-white background */
    --bg-dark-section: #0f1a26; /* Dark section background */
    --card-bg-dark: #20304a;   /* Darker blue for cards on dark backgrounds */
    --card-bg-light: #ffffff;  /* White for cards on light backgrounds */

    --border-light: #dee2e6;   /* Light border for light elements */
    --border-dark: #34495e;    /* Dark border for dark elements */

    /* Gradients (Blue to Dark Blue/Black) */
    --gradient-start: #007bff;
    --gradient-end: #1a2a40;

    /* Shadows */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.25);

    /* Spacing & Sizing */
    --section-spacing-lg: 120px;
    --section-spacing-md: 100px;
    --section-spacing-sm: 80px;
    --content-gap-lg: 70px;
    --content-gap-md: 50px;
    --card-padding: 30px;
    --border-radius-md: 12px;
    --border-radius-lg: 15px;

    /* Transitions */
    --transition-speed: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif; /* Keeping Inter for a modern professional feel */
    line-height: 1.6;
    color: var(--dark-text);
    background: var(--bg-light);
    overflow-x: hidden;
}

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

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

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

/* --- Reusable Components --- */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05em;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed);
}

.btn.primary {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: var(--light-text);
    box-shadow: 0 4px 12px var(--shadow-dark);
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px var(--shadow-dark);
    opacity: 0.95;
}

.btn.secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn.secondary:hover {
    background: var(--primary-blue);
    color: var(--light-text);
    transform: translateY(-3px);
}

/* Sections & Headers */
.section {
    padding: var(--section-spacing-md) 0;
    position: relative;
    overflow: hidden;
}

.section-header {
    margin-bottom: var(--content-gap-lg);
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* Fallback for text alignment */
}

.section-header .section-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 3.2em;
    color: var(--dark-text); /* Default for light sections */
    margin-bottom: 15px;
    line-height: 1.2;
    position: relative;
    
}

/* Specific h2 color for dark sections */
.section.dark-bg .section-header h2 {
    color: var(--light-text);
}


.section-header h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.25em;
    color: var(--light-grey-text); /* Default for light sections */
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
}

/* Specific subtitle color for dark sections */
.section.dark-bg .section-subtitle {
    color: var(--light-text);
}


.gradient-text {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Animate on Scroll (Controlled by JS) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Navbar --- */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    padding: 18px 0;
    box-shadow: 0 2px 12px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background-color: var(--secondary-dark); /* Darker blue when scrolled */
    padding: 12px 0;
    box-shadow: 0 4px 18px var(--shadow-dark);
}

.navbar.scrolled .nav-links a {
    color: var(--light-text);
}

.navbar.scrolled .logo .logo-text {
    color: var(--light-text);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-blue); /* Logo color */
}

.logo-text {
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

.logo-dot {
    width: 9px;
    height: 9px;
    background-color: var(--accent-teal); /* Teal dot */
    border-radius: 50%;
    margin-left: 6px;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(0.8); opacity: 0.7; }
    to { transform: scale(1.2); opacity: 1; }
}

.nav-links a {
    color: var(--dark-text);
    margin-left: 35px;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    font-size: 1.05em;
    transition: color var(--transition-speed);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-teal); /* Teal underline */
    transition: width var(--transition-speed);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-blue); /* Blue active link */
}

.navbar.scrolled .nav-links a.active {
    color: var(--accent-teal); /* Teal active link when scrolled */
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.hamburger span {
    width: 32px;
    height: 3px;
    background-color: var(--dark-text);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar.scrolled .hamburger span {
    background-color: var(--light-text);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9f0ff 100%); /* Light blue gradient */
    padding: var(--section-spacing-lg) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--content-gap-lg);
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-text {
    flex: 1;
    min-width: 320px;
}

.glitch-text {
    font-size: 5em;
    font-weight: 900;
    color: var(--dark-text);
    position: relative;
    line-height: 1.1;
    margin-bottom: 15px;
}

/* Glitch effect for hero name */
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-teal); /* Teal glitch */
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 2s infinite alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary-blue); /* Blue glitch */
    clip: rect(85px, 450px, 100px, 0);
    animation: glitch-anim-2 3s infinite alternate-reverse;
}
@keyframes glitch-anim-1 { /* unchanged */
    0% { clip: rect(25px, 9999px, 83px, 0); } 10% { clip: rect(63px, 9999px, 89px, 0); } 20% { clip: rect(10px, 9999px, 35px, 0); } 30% { clip: rect(72px, 9999px, 100px, 0); } 40% { clip: rect(15px, 9999px, 75px, 0); } 50% { clip: rect(40px, 9999px, 60px, 0); } 60% { clip: rect(90px, 9999px, 120px, 0); } 70% { clip: rect(5px, 9999px, 30px, 0); } 80% { clip: rect(50px, 9999px, 70px, 0); } 90% { clip: rect(80px, 9999px, 110px, 0); } 100% { clip: rect(25px, 9999px, 83px, 0); }
}
@keyframes glitch-anim-2 { /* unchanged */
    0% { clip: rect(20px, 9999px, 70px, 0); } 15% { clip: rect(55px, 9999px, 80px, 0); } 30% { clip: rect(5px, 9999px, 25px, 0); } 45% { clip: rect(65px, 9999px, 95px, 0); } 60% { clip: rect(10px, 9999px, 60px, 0); } 75% { clip: rect(35px, 9999px, 50px, 0); } 90% { clip: rect(80px, 9999px, 105px, 0); } 100% { clip: rect(20px, 9999px, 70px, 0); }
}

.hero-text .title {
    font-size: 2.5em;
    color: var(--primary-blue);
    margin-bottom: 30px;
    font-weight: 600;
}

.social-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.stat-link {
    color: var(--dark-text);
    font-size: 2.2em;
    color: invert;
}

.stat-link:hover {
    color: var(--primary-blue);
}

.cta-buttons {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    min-width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 35px var(--shadow-dark);
    transition: transform 0.5s ease;
}

.hero-image img:hover {
    transform: translateY(-8px) scale(1.03);
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--light-grey-text);
    font-size: 0.95em;
    text-transform: uppercase;
    font-weight: 600;
}

.scroll-down:hover {
    color: var(--primary-blue);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--light-grey-text);
    border-radius: 25px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 7px;
    height: 7px;
    background-color: var(--light-grey-text);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-anim 1.5s infinite;
}

.arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.arrow {
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 12px solid var(--light-grey-text);
    animation: arrow-anim 1.5s infinite;
    opacity: 0;
}

.arrow:nth-child(2) { animation-delay: 0.2s; }
.arrow:nth-child(3) { animation-delay: 0.4s; }

@keyframes scroll-anim { /* unchanged */
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}
@keyframes arrow-anim { /* unchanged */
    0% { opacity: 0; transform: translateY(-10px); } 20% { opacity: 1; transform: translateY(0); } 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(10px); }
}

/* --- About Section --- */
.about {
    background: var(--bg-light);
    padding: var(--section-spacing-md) 0;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--content-gap-lg);
    max-width: 1000px;
    margin: var(--content-gap-lg) auto 0;
    text-align: left;
}

.about-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-img {
    width: 380px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px var(--shadow-dark);
    transition: transform 0.4s ease;
    margin: 0 auto 330px auto;
}

.about-img:hover {
    transform: scale(1.04);
}

.about-text {
    flex: 2;
    min-width: 400px;
}

.about-text p {
    font-size: 1.15em;
    margin-bottom: 25px;
    color: var(--medium-grey);
    line-height: 1.7;
}

.experience-stats {
    display: flex;
    gap: 40px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.experience-stats .stat {
    text-align: center;
    flex: 1;
    min-width: 140px;
    background: var(--card-bg-light);
    padding: 25px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-stats .stat:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 22px var(--shadow-dark);
}

.experience-stats .stat .number {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
    margin-bottom: 8px;
}

.experience-stats .stat .label {
    font-size: 1em;
    color: var(--light-grey-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Experience & Education Section --- */
.experience {
    background: var(--bg-dark-section); /* Dark background for experience */
    padding: var(--section-spacing-md) 0;
}

.experience .section-header h2,
.experience .section-subtitle {
    color: var(--light-text); /* Light text for dark section headers */
}

.timeline-container {
    display: flex;
    justify-content: center;
    gap: var(--content-gap-lg);
    margin-top: var(--content-gap-lg);
    flex-wrap: wrap;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.timeline-column {
    flex: 1;
    min-width: 450px;
    max-width: 550px;
    text-align: left;
}

.timeline-title {
    font-size: 2.2em;
    color: var(--primary-blue); /* Blue title */
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.timeline-title i {
    font-size: 1.3em;
}

.timeline {
    position: relative;
    padding-left: 35px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: var(--primary-blue);
}

.timeline-item {
    margin-bottom: 45px;
    position: relative;
    padding: 25px;
    background: var(--card-bg-dark); /* Dark card background */
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 18px var(--shadow-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 22px var(--shadow-dark);
}

.timeline-marker {
    position: absolute;
    left: -42px;
    top: 30px;
    width: 20px;
    height: 20px;
    background-color: var(--accent-teal); /* Teal marker */
    border: 4px solid var(--primary-blue);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content h4 {
    font-size: 1.6em;
    color: var(--light-text); /* Light text for titles */
    margin-bottom: 8px;
}

.timeline-content h5 {
    font-size: 1.15em;
    color: var(--light-text); /* Light text for subtitles */
    margin-bottom: 12px;
}

.timeline-content .timeline-date {
    display: block;
    font-size: 0.95em;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 18px;
}

.timeline-content p {
    font-size: 1.05em;
    color: var(--light-text); /* Light text for paragraphs */
}

/* --- Skills Section --- */
.section#skills {
    background: var(--bg-light); /* Light background for skills */
    padding: var(--section-spacing-md) 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: var(--content-gap-lg);
    max-width: 1000px; /* Centering the grid itself */
    margin-left: auto;
    margin-right: auto;
}

.skill-category {
    background: var(--card-bg-light); /* Light card background */
    padding: 35px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--shadow-light);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px var(--shadow-dark);
}

.skill-category h3 {
    font-size: 1.9em;
    color: var(--primary-blue);
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 18px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-tag {
    background-color: #e0e7ff; /* Light blue for tags */
    color: var(--primary-blue);
    padding: 9px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--primary-blue);
    color: var(--light-text);
}

/* --- Projects Section --- */
.section#projects {
    background: var(--bg-dark-section); /* Dark background for projects */
    padding: var(--section-spacing-md) 0;
}

.section#projects .section-header h2,
.section#projects .section-subtitle {
    color: var(--light-text); /* Light text for dark section headers */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: var(--content-gap-lg);
    max-width: 1000px; /* Centering the grid itself */
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background: var(--card-bg-dark); /* Dark card background */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--shadow-dark);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px var(--shadow-dark);
}

.project-header {
    padding: 30px;
    text-align: left;
    border-bottom: 1px solid var(--border-dark); /* Dark border */
}

.project-header h3 {
    font-size: 2em;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.project-header p {
    font-size: 1.15em;
    color: var(--light-text); /* Light text */
}

.project-content {
    padding: 30px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.tech-tag {
    background-color: #34495e; /* Darker blue for tags */
    color: var(--light-text);
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.project-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-features li {
    font-size: 1.05em;
    color: var(--light-text); /* Light text */
    margin-bottom: 12px;
    position: relative;
    padding-left: 30px;
}

.project-features li::before {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-teal); /* Teal checkmark */
    position: absolute;
    left: 0;
    top: 3px;
}

/* --- Certifications Section --- */
.certifications {
    background: var(--bg-light); /* Light background */
    padding: var(--section-spacing-md) 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: var(--content-gap-lg);
    max-width: 1000px; /* Centering the grid itself */
    margin-left: auto;
    margin-right: auto;
}

.achievement-card {
    background: var(--card-bg-light); /* Light card background */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--shadow-light);
    padding: 35px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px var(--shadow-dark);
}

.achievement-icon {
    font-size: 2.8em;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.achievement-content h3 {
    font-size: 1.7em;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.achievement-content .issuer {
    display: block;
    font-size: 1.05em;
    color: var(--light-grey-text);
    margin-bottom: 8px;
}

.achievement-content .achievement-date {
    display: block;
    font-size: 0.95em;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 18px;
}

.achievement-content p {
    font-size: 1em;
    color: var(--medium-grey);
    line-height: 1.6;
    margin-bottom: 18px;
}

.achievement-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.achievement-skills span {
    background-color: #e6f0ff; /* Light blue */
    color: var(--primary-blue);
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

/* --- Blog Section --- */
.blog {
    padding: var(--section-spacing-md) 0;
    background: var(--bg-dark-section); /* Dark background for blog */
}

.blog .section-header h2,
.blog .section-subtitle {
    color: var(--light-text); /* Light text for dark section headers */
}

.blog-filters {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: var(--content-gap-lg);
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.blog-filters .filter-btn {
    background: var(--card-bg-dark); /* Dark card background */
    border: 2px solid var(--border-dark);
    color: var(--light-text);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-speed);
}

.blog-filters .filter-btn:hover {
    background: var(--primary-dark); /* Darker on hover */
    border-color: var(--primary-blue);
    color: var(--light-text);
}

.blog-filters .filter-btn.active {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: var(--light-text);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px var(--shadow-dark);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1000px; /* Centering the grid itself */
    margin-left: auto;
    margin-right: auto;
}

.blog-card {
    background: var(--card-bg-dark); /* Dark card background */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--shadow-dark);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px var(--shadow-dark);
}

.blog-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card .image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
}

.blog-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover img {
    transform: scale(1.08);
}

.blog-card .card-content {
    padding: 30px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-size: 0.95em;
    color: var(--light-text); /* Light text */
}

.blog-card .card-meta .category {
    background-color: #34495e; /* Darker blue */
    color: var(--light-text);
    padding: 6px 15px;
    border-radius: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card h3 {
    font-size: 1.8em;
    color: var(--light-text); /* Light text */
    margin-bottom: 25px;
    line-height: 1.4;
}

.blog-card .read-more {
    color: var(--primary-blue);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: gap 0.3s ease;
}

.blog-card .read-more:hover {
    gap: 15px;
}

/* --- Contact Section --- */
.contact {
    background: linear-gradient(135deg, #e9f0ff 0%, #d8e2f8 100%); /* Light blue gradient */
    padding: var(--section-spacing-md) 0;
}

.contact-container {
    display: flex;
    gap: var(--content-gap-lg);
    margin-top: var(--content-gap-lg);
    flex-wrap: wrap;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    min-width: 320px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 25px;
    background: var(--card-bg-light); /* Light card background */
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 18px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 22px var(--shadow-dark);
}

.info-item i {
    font-size: 2.5em;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1.5em;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.info-content p {
    font-size: 1em;
    color: var(--medium-grey);
}


.social-links {
    display: flex;
    gap: 20px;
    margin-top: 35px;
    justify-content: flex-start;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e0e7ff;
    color: var(--primary-blue);
    font-size: 1.5em;
    transition: all var(--transition-speed);
}

.social-link:hover {
    background-color: var(--primary-blue);
    color: var(--light-text);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.contact-form {
    flex: 2;
    min-width: 350px;
    background: var(--card-bg-light); /* Light card background */
    padding: 45px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px var(--shadow-light);
    text-align: left;
}

.form-group {
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 1.05em;
    color: var(--dark-text);
    background-color: #fcfdff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 180px;
}

/* --- Footer --- */
.footer {
    background: var(--secondary-dark); /* Darker blue for footer */
    color: var(--light-text);
    padding: 35px 0;
    text-align: center;
    font-size: 0.95em;
}

.footer p {
    margin: 0;
}

/* --- Media Queries (Responsiveness) --- */
@media (max-width: 992px) {
    .section {
        padding: var(--section-spacing-sm) 0;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: var(--content-gap-md);
    }

    .hero-image {
        order: -1;
        margin-bottom: var(--content-gap-md);
    }

    .glitch-text {
        font-size: 3.8em;
    }

    .hero-text .title {
        font-size: 2em;
    }

    .social-stats,
    .cta-buttons {
        justify-content: center;
    }

    .about-content,
    .timeline-container,
    .contact-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--content-gap-md);
    }

    .about-text,
    .timeline-column,
    .contact-info,
    .contact-form {
        min-width: unset;
        width: 100%;
        max-width: 700px;
    }

    .about-text {
        padding: 0 20px;
    }

    .experience-stats {
        justify-content: center;
        gap: 30px;
    }

    .timeline {
        padding-left: 25px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-marker {
        left: -12px;
    }

    .social-links {
        justify-content: center;
    }

    .section-header h2 {
        font-size: 2.8em;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        position: absolute;
        top: 70px;
        left: 0;
        box-shadow: 0 8px 15px var(--shadow-dark);
        padding: 20px 0;
        z-index: 999;
    }

    .navbar.scrolled .nav-links {
        background: var(--secondary-dark);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        margin: 12px 0;
        padding: 10px 20px;
        text-align: center;
        color: var(--dark-text);
    }

    .navbar.scrolled .nav-links a {
        color: var(--light-text);
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .glitch-text {
        font-size: 3.2em;
        text-align: center;
    }

    .hero-text .title {
        font-size: 1.8em;
        text-align: center;
    }

    .section-header h2 {
        font-size: 2.5em;
    }

    .about-img {
        width: 320px;
    }

    .skill-category h3,
    .project-header h3,
    .blog-card h3 {
        font-size: 1.7em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .glitch-text {
        font-size: 2.5em;
    }

    .hero-text .title {
        font-size: 1.5em;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .section-header h2 {
        font-size: 2em;
    }

    .section-subtitle {
        font-size: 1.1em;
    }

    .experience-stats {
        flex-direction: column;
        gap: 25px;
    }

    .timeline-column {
        min-width: unset;
        width: 100%;
    }

    .timeline-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .timeline-item {
        padding: 20px;
        margin-bottom: 35px;
    }

    .info-item {
        padding: 25px;
        gap: 20px;
    }

    .contact-form {
        padding: 30px;
    }
}