/* Basic Resets & Global Styles */
:root {
    /* --- Light Mode Colors --- */
    --primary-color: #007bff;
    /* A nice blue for links, highlights */
    --secondary-color: #6c757d;
    /* Grey for muted text, taglines */
    --accent-color: #28a745;
    /* Green for success/icons */

    --bg-primary: #ffffff;
    /* Main background */
    --bg-secondary: #e9ecef;
    /* For alternate sections (e.g., About, Projects) */
    --card-bg: #f8f9fa;
    /* Background for cards, skill categories, timeline items */

    --text-primary: #121212;
    /* Main body text color */
    --text-secondary: #343a40;
    /* Slightly darker text for headings, important info */
    --text-faded: #6c757d;
    /* Muted text */

    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    /* For box-shadows */

    --header-bg: #343a40;
    /* Dark background for header - now used as base for rgba */
    --header-text: #f8f9fa;
    /* Light text for header */

    /* --- General Variables --- */
    --font-family-sans: 'Roboto', sans-serif;
    --box-shadow: 0 4px 8px var(--shadow-color);
    --border-radius: 8px;
    --transition-speed: 0.3s ease;
}

/* --- Dark Mode Overrides --- */
body.dark-mode {
    --primary-color: #66ccff;
    /* Lighter blue for dark mode */
    --secondary-color: #a0a0a0;
    /* Lighter grey for dark mode muted text */
    --accent-color: #76ff7c;
    /* Lighter green for dark mode */

    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --card-bg: #2a2a2a;

    --text-primary: #e0e0e0;
    --text-secondary: #c0c0c0;
    --text-faded: #a0a0a0;

    --border-color: #444444;
    --shadow-color: rgba(255, 255, 255, 0.05);
    /* Lighter shadow for dark mode */

    --header-bg: #000000;
    /* Dark background for header - now used as base for rgba */
    --header-text: #f8f9fa;
    /* Stays light for contrast */
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ===========================================
   AI/ML THEMED ANIMATIONS
   =========================================== */

/* Neural Network Nodes Animation */
@keyframes neuralPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes neuralConnect {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Data Particles Animation */
@keyframes dataFlow {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Binary Code Rain */
@keyframes binaryFall {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* AI Brain Pulse */
@keyframes brainPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.6;
    }
}

/* Circuit Board Lines */
@keyframes circuitFlow {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.3;
    }
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 100% {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

/* ML Model Training Progress */
@keyframes trainingProgress {
    0% {
        width: 0%;
        opacity: 0.5;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

/* Neural Network Container */
.neural-network-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

body.dark-mode .neural-network-bg {
    opacity: 0.5;
}

/* SVG Neural Network Connections */
.neural-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.neural-line {
    stroke: #66ccff;
    stroke-width: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: neuralConnect 4s ease-in-out infinite;
    opacity: 0.5;
    filter: drop-shadow(0 0 3px #66ccff);
}

body.dark-mode .neural-line {
    stroke: #66ccff;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px #66ccff);
}

.neural-line:nth-child(1) { animation-delay: 0s; }
.neural-line:nth-child(2) { animation-delay: 0.3s; }
.neural-line:nth-child(3) { animation-delay: 0.6s; }
.neural-line:nth-child(4) { animation-delay: 0.9s; }
.neural-line:nth-child(5) { animation-delay: 1.2s; }
.neural-line:nth-child(6) { animation-delay: 1.5s; }
.neural-line:nth-child(7) { animation-delay: 1.8s; }
.neural-line:nth-child(8) { animation-delay: 2.1s; }
.neural-line:nth-child(9) { animation-delay: 2.4s; }
.neural-line:nth-child(10) { animation-delay: 2.7s; }

.neural-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #66ccff;
    border-radius: 50%;
    animation: neuralPulse 3s ease-in-out infinite;
    box-shadow: 0 0 10px #66ccff;
}

body.dark-mode .neural-node {
    background: #66ccff;
    box-shadow: 0 0 15px #66ccff, 0 0 30px rgba(102, 204, 255, 0.3);
}

.neural-node:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.neural-node:nth-child(2) { top: 40%; left: 25%; animation-delay: 0.5s; }
.neural-node:nth-child(3) { top: 60%; left: 20%; animation-delay: 1s; }
.neural-node:nth-child(4) { top: 30%; left: 70%; animation-delay: 1.5s; }
.neural-node:nth-child(5) { top: 50%; left: 80%; animation-delay: 2s; }
.neural-node:nth-child(6) { top: 70%; left: 75%; animation-delay: 2.5s; }
.neural-node:nth-child(7) { top: 15%; left: 50%; animation-delay: 0.8s; }
.neural-node:nth-child(8) { top: 80%; left: 50%; animation-delay: 1.8s; }

/* Data Particles */
.data-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    animation: dataFlow 8s linear infinite;
    box-shadow: 0 0 10px #00ffff;
}

.data-particle:nth-child(odd) {
    background: #ff66ff;
    box-shadow: 0 0 10px #ff66ff;
}

body.dark-mode .data-particle {
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff, 0 0 20px rgba(0, 255, 255, 0.5);
}

body.dark-mode .data-particle:nth-child(odd) {
    background: #ff66ff;
    box-shadow: 0 0 10px #ff66ff, 0 0 20px rgba(255, 102, 255, 0.5);
}

.data-particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.data-particle:nth-child(2) { left: 30%; animation-delay: 2s; animation-duration: 9s; }
.data-particle:nth-child(3) { left: 50%; animation-delay: 4s; animation-duration: 8s; }
.data-particle:nth-child(4) { left: 70%; animation-delay: 1s; animation-duration: 10s; }
.data-particle:nth-child(5) { left: 90%; animation-delay: 3s; animation-duration: 7.5s; }

/* Binary Code Elements */
.binary-code {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #66ccff;
    animation: binaryFall 10s linear infinite;
    opacity: 0.3;
    font-weight: bold;
}

body.dark-mode .binary-code {
    color: #66ccff;
    opacity: 0.4;
    text-shadow: 0 0 5px rgba(102, 204, 255, 0.5);
}

.binary-code:nth-child(1) { left: 5%; animation-delay: 0s; }
.binary-code:nth-child(2) { left: 15%; animation-delay: 2s; }
.binary-code:nth-child(3) { left: 25%; animation-delay: 4s; }
.binary-code:nth-child(4) { left: 35%; animation-delay: 1s; }
.binary-code:nth-child(5) { left: 45%; animation-delay: 3s; }
.binary-code:nth-child(6) { left: 55%; animation-delay: 5s; }
.binary-code:nth-child(7) { left: 65%; animation-delay: 2.5s; }
.binary-code:nth-child(8) { left: 75%; animation-delay: 4.5s; }
.binary-code:nth-child(9) { left: 85%; animation-delay: 1.5s; }
.binary-code:nth-child(10) { left: 95%; animation-delay: 3.5s; }

/* AI Brain Decoration */
.ai-brain-icon {
    position: absolute;
    font-size: 80px;
    color: #66ccff;
    opacity: 0.15;
    animation: brainPulse 6s ease-in-out infinite;
}

body.dark-mode .ai-brain-icon {
    color: #66ccff;
    opacity: 0.2;
    text-shadow: 0 0 20px rgba(102, 204, 255, 0.3);
}

.ai-brain-icon:nth-child(1) { top: 10%; right: 10%; animation-delay: 0s; }
.ai-brain-icon:nth-child(2) { bottom: 15%; left: 8%; animation-delay: 3s; }

/* Typing Animation for Tagline - DISABLED */
.typing-text {
    display: inline-block;
    /* Animation removed - static text */
}

.typing-text.completed {
    border-right: none;
    animation: none;
}

/* ===========================================
   SECTION ANIMATION BACKGROUNDS
   =========================================== */

/* General Section Animation Container */
.section-animation-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

body.dark-mode .section-animation-bg {
    opacity: 0.5;
}

/* Ensure sections have position relative for absolute positioning */
.about-section,
.skills-section,
.projects-section,
.achievements-section,
.education-section,
.contact-section {
    position: relative;
}

/* Make section animations use the same styling as hero section */
.section-animation-bg .neural-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.section-animation-bg .neural-line {
    stroke: var(--primary-color);
    stroke-width: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: neuralConnect 4s ease-in-out infinite;
    opacity: 0.5;
    filter: drop-shadow(0 0 3px var(--primary-color));
}

body.dark-mode .section-animation-bg .neural-line {
    stroke: #66ccff;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px #66ccff);
}

.section-animation-bg .neural-line:nth-child(1) { animation-delay: 0s; }
.section-animation-bg .neural-line:nth-child(2) { animation-delay: 0.3s; }
.section-animation-bg .neural-line:nth-child(3) { animation-delay: 0.6s; }
.section-animation-bg .neural-line:nth-child(4) { animation-delay: 0.9s; }
.section-animation-bg .neural-line:nth-child(5) { animation-delay: 1.2s; }
.section-animation-bg .neural-line:nth-child(6) { animation-delay: 1.5s; }
.section-animation-bg .neural-line:nth-child(7) { animation-delay: 1.8s; }
.section-animation-bg .neural-line:nth-child(8) { animation-delay: 2.1s; }

.section-animation-bg .neural-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: neuralPulse 3s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

body.dark-mode .section-animation-bg .neural-node {
    background: #66ccff;
    box-shadow: 0 0 15px #66ccff, 0 0 30px rgba(102, 204, 255, 0.3);
}

.section-animation-bg .neural-node:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.section-animation-bg .neural-node:nth-child(2) { top: 40%; left: 25%; animation-delay: 0.5s; }
.section-animation-bg .neural-node:nth-child(3) { top: 60%; left: 20%; animation-delay: 1s; }
.section-animation-bg .neural-node:nth-child(4) { top: 30%; left: 70%; animation-delay: 1.5s; }
.section-animation-bg .neural-node:nth-child(5) { top: 50%; left: 80%; animation-delay: 2s; }
.section-animation-bg .neural-node:nth-child(6) { top: 70%; left: 75%; animation-delay: 2.5s; }
.section-animation-bg .neural-node:nth-child(7) { top: 15%; left: 50%; animation-delay: 0.8s; }

.section-animation-bg .data-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00f7ff;
    border-radius: 50%;
    animation: dataFlow 8s linear infinite;
    box-shadow: 0 0 6px #00f7ff;
}

.section-animation-bg .data-particle:nth-child(odd) {
    background: #ff00ff;
    box-shadow: 0 0 6px #ff00ff;
}

body.dark-mode .section-animation-bg .data-particle {
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff, 0 0 20px rgba(0, 255, 255, 0.5);
}

body.dark-mode .section-animation-bg .data-particle:nth-child(odd) {
    background: #ff66ff;
    box-shadow: 0 0 10px #ff66ff, 0 0 20px rgba(255, 102, 255, 0.5);
}

.section-animation-bg .binary-code {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--primary-color);
    animation: binaryFall 10s linear infinite;
    opacity: 0.3;
    font-weight: bold;
}

body.dark-mode .section-animation-bg .binary-code {
    color: #66ccff;
    opacity: 0.4;
    text-shadow: 0 0 5px rgba(102, 204, 255, 0.5);
}

.section-animation-bg .binary-code:nth-child(1) { left: 5%; animation-delay: 0s; }
.section-animation-bg .binary-code:nth-child(2) { left: 15%; animation-delay: 2s; }
.section-animation-bg .binary-code:nth-child(3) { left: 25%; animation-delay: 4s; }
.section-animation-bg .binary-code:nth-child(4) { left: 35%; animation-delay: 1s; }
.section-animation-bg .binary-code:nth-child(5) { left: 45%; animation-delay: 3s; }
.section-animation-bg .binary-code:nth-child(6) { left: 55%; animation-delay: 5s; }
.section-animation-bg .binary-code:nth-child(7) { left: 65%; animation-delay: 2.5s; }

.section-animation-bg .ai-brain-icon {
    position: absolute;
    font-size: 80px;
    color: var(--primary-color);
    opacity: 0.15;
    animation: brainPulse 6s ease-in-out infinite;
}

body.dark-mode .section-animation-bg .ai-brain-icon {
    color: #66ccff;
    opacity: 0.2;
    text-shadow: 0 0 20px rgba(102, 204, 255, 0.3);
}

.section-animation-bg .ai-brain-icon:nth-child(1) { top: 10%; right: 10%; animation-delay: 0s; }

/* Floating Icons Animation */
@keyframes floatAround {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translate(20px, -30px) rotate(90deg);
        opacity: 0.7;
    }
    50% {
        transform: translate(-20px, -60px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translate(30px, -40px) rotate(270deg);
        opacity: 0.7;
    }
}

.floating-icon {
    position: absolute;
    font-size: 40px;
    color: var(--primary-color);
    animation: floatAround 15s ease-in-out infinite;
    opacity: 0.3;
}

body.dark-mode .floating-icon {
    color: var(--primary-color);
    opacity: 0.4;
}

.floating-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.floating-icon:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 4s;
    animation-duration: 14s;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
    animation-duration: 16s;
}

.floating-icon:nth-child(4) {
    top: 30%;
    right: 25%;
    animation-delay: 6s;
    animation-duration: 13s;
}

.floating-icon:nth-child(5) {
    top: 70%;
    left: 60%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.floating-icon:nth-child(6) {
    top: 40%;
    left: 40%;
    animation-delay: 5s;
    animation-duration: 14s;
}

.floating-icon:nth-child(7) {
    bottom: 30%;
    right: 30%;
    animation-delay: 1s;
    animation-duration: 17s;
}

/* Code Snippets Animation */
@keyframes codeFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-50px) translateX(30px);
        opacity: 0.5;
    }
}

.code-snippet {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent-color);
    background: rgba(0, 0, 0, 0.05);
    padding: 5px 10px;
    border-radius: 4px;
    animation: codeFloat 10s ease-in-out infinite;
    opacity: 0.3;
    white-space: nowrap;
}

body.dark-mode .code-snippet {
    background: rgba(255, 255, 255, 0.05);
    color: #76ff7c;
}

.code-snippet:nth-child(1) {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.code-snippet:nth-child(2) {
    top: 45%;
    right: 20%;
    animation-delay: 2s;
}

.code-snippet:nth-child(3) {
    bottom: 25%;
    left: 25%;
    animation-delay: 4s;
}

.code-snippet:nth-child(4) {
    top: 70%;
    right: 35%;
    animation-delay: 1s;
}

/* Sparkle Particles for Achievements */
@keyframes sparkle {
    0%, 100% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
}

.sparkle-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: gold;
    border-radius: 50%;
    animation: sparkle 3s ease-in-out infinite;
    box-shadow: 0 0 10px gold;
}

body.dark-mode .sparkle-particle {
    background: #ffd700;
    box-shadow: 0 0 15px #ffd700;
}

.sparkle-particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle-particle:nth-child(2) {
    top: 50%;
    right: 25%;
    animation-delay: 1s;
}

.sparkle-particle:nth-child(3) {
    bottom: 30%;
    left: 30%;
    animation-delay: 2s;
}

/* Enhanced Data Particles for Multiple Sections - Match Hero Section */
.section-animation-bg .data-particle:nth-child(1) { 
    left: 10%; 
    animation-delay: 0s; 
    animation-duration: 7s; 
}

.section-animation-bg .data-particle:nth-child(2) { 
    left: 30%; 
    animation-delay: 2s; 
    animation-duration: 9s; 
}

.section-animation-bg .data-particle:nth-child(3) { 
    left: 50%; 
    animation-delay: 4s; 
    animation-duration: 8s; 
}

.section-animation-bg .data-particle:nth-child(4) { 
    left: 70%; 
    animation-delay: 1s; 
    animation-duration: 10s; 
}

.section-animation-bg .data-particle:nth-child(5) { 
    left: 90%; 
    animation-delay: 3s; 
    animation-duration: 7.5s; 
}

/* Responsive adjustments for animations */
@media (max-width: 768px) {
    .floating-icon {
        font-size: 30px;
    }
    
    .code-snippet {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .section-animation-bg {
        opacity: 0.2;
    }
    
    .ai-brain-icon {
        font-size: 60px;
    }
}

/* --- Theme Toggle Button --- */
#theme-toggle {
    position: fixed;
    /* Keep fixed for desktop */
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 1.2rem;
    border: none;
    background: var(--card-bg);
    /* Uses card background for toggle */
    color: var(--text-primary);
    /* Uses primary text color for icon */
    cursor: pointer;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 0 10px var(--shadow-color);
    transition: background var(--transition-speed), color var(--transition-speed), box-shadow var(--transition-speed);
}

#theme-toggle:hover {
    transform: scale(1.05);
}


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

a:hover {
    color: #0056b3;
    /* Slightly darker blue on hover */
}

body.dark-mode a:hover {
    color: #99e6ff;
    /* Lighter blue for dark mode hover */
}


ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    /* Headings use secondary text color */
    transition: color var(--transition-speed);
}

p {
    margin-bottom: 1rem;
    color: var(--text-primary);
    transition: color var(--transition-speed);
}

.section-padding {
    padding: 80px 20px;
}

/* Ensure content doesn't get too wide on large screens */
section > * {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 120px;
}

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

/* --- Header & Navigation --- */
header {
    /* Translucent background with backdrop-filter */
    background-color: rgba(52, 58, 64, 0.7); /* Base header-bg color with 70% opacity */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(8px); /* For Safari support */
    color: var(--header-text);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed), backdrop-filter var(--transition-speed);
}

body.dark-mode header {
    background-color: rgba(0, 0, 0, 0.5); /* Dark mode header-bg with 50% opacity */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    /* Needed for absolute positioning of nav-links */
}

nav .logo a {
    color: var(--header-text);
    font-size: 1.8rem;
    font-weight: 900;
    transition: color var(--transition-speed);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--header-text);
    font-weight: 900;
    padding: 5px 0;
    position: relative;
    transition: color var(--transition-speed);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed), background-color var(--transition-speed);
}

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

/* Hamburger menu button - hidden by default on desktop */
.hamburger-menu {
    display: none;
}


/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    margin-right: 15px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:last-child {
    margin-right: 0;
}

.primary-btn {
    background-color: #ffd700;
    color: #333333;
    border: 2px solid #ffd700;
}

.primary-btn:hover {
    background-color: #ffed4e;
    border-color: #ffed4e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

body.dark-mode .primary-btn {
    background-color: #ffd700;
    color: #1a1a1a;
}

body.dark-mode .primary-btn:hover {
    background-color: #ffed4e;
    border-color: #ffed4e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.secondary-btn {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* --- Hero Section --- */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    min-height: 90vh;
    position: relative;
    text-align: center;
    flex-wrap: wrap;
    overflow: hidden;
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    transition: background var(--transition-speed);
}

/* Light mode gradient background */
body:not(.dark-mode) .hero-section {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
}

/* Dark mode gradient background */
body.dark-mode .hero-section {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

/* Animated floating shapes in background */
.hero-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -250px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -200px;
    left: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

.hero-content {
    flex: 1;
    max-width: 600px;
    margin-right: 40px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content h1 span {
    color: #ffd700;
    transition: color var(--transition-speed);
}

.hero-content .tagline {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 25px;
    transition: color var(--transition-speed);
    line-height: 1.6;
    white-space: normal;
}

.hero-image {
    flex: 0.8;
    max-width: 400px;
    min-width: 250px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow var(--transition-speed);
    position: relative;
    z-index: 1;
    border: 5px solid rgba(255, 255, 255, 0.2);
}

.hero-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

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

.social-links {
    margin-top: 20px;
    margin-bottom: 30px;
}

.social-links a {
    color: #ffffff;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
    color: #ffd700;
}

.social-links a {
    color: var(--text-secondary);
    /* Social icons use secondary text color */
    font-size: 1.8rem;
    margin-right: 20px;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* --- About Section --- */
.about-section {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    transition: background var(--transition-speed);
    position: relative;
}

body.dark-mode .about-section {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.about-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -250px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.about-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -200px;
    left: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

.about-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
    transition: all var(--transition-speed);
    position: relative;
    z-index: 1;
    /* Add card styling for better readability */
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
}

body.dark-mode .about-content {
    background: rgba(30, 30, 30, 0.9);
    color: #e0e0e0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Skills Section --- */
.skills-section {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    transition: background var(--transition-speed);
    position: relative;
    overflow: hidden;
}

body.dark-mode .skills-section {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.skills-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -250px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.skills-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -200px;
    left: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 255, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    flex: 1 1 calc(33% - 40px);
    min-width: 280px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), background var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

body.dark-mode .skill-category {
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.95) 0%, rgba(50, 50, 70, 0.95) 100%);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    transition: color var(--transition-speed);
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: 8px 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: color var(--transition-speed);
}

.skill-category li i {
    margin-right: 10px;
    color: var(--accent-color);
    transition: color var(--transition-speed);
}

/* --- Projects Section --- */
.projects-section {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    transition: background var(--transition-speed);
    position: relative;
    overflow: hidden;
}

body.dark-mode .projects-section {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.projects-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -250px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.projects-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -200px;
    left: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 255, 250, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), background var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.dark-mode .project-card {
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.95) 0%, rgba(40, 50, 60, 0.95) 100%);
}

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

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
    transition: color var(--transition-speed);
}

.project-description {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    flex-grow: 1;
    transition: color var(--transition-speed);
}

.project-tags {
    margin-bottom: 15px;
}

.project-tags span {
    display: inline-block;
    background-color: var(--bg-secondary);
    /* Use secondary background for tags */
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

body.dark-mode .project-tags span {
    background-color: var(--bg-primary);
    /* Adjust for dark mode if needed, e.g., a darker shade */
}

.project-links a {
    margin-right: 15px;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.project-links a i {
    margin-right: 8px;
}

.project-links a:hover {
    text-decoration: underline;
}

/* --- Experience & Education Sections (Timeline Styling) --- */
.experience-section,
.education-section {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    transition: background var(--transition-speed);
    position: relative;
}

body.dark-mode .education-section {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #303f9f 100%);
}

.education-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(63, 81, 181, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(103, 58, 183, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.experience-timeline,
.education-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.experience-timeline::before,
.education-timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    transition: background-color var(--transition-speed);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
    padding: 10px 40px;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 20px;
    transform: translateX(-50%);
    z-index: 1;
    transition: background-color var(--transition-speed);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
}

.timeline-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), background-color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.timeline-content:hover {
    transform: translateY(-3px);
}

.timeline-content h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 1.3rem;
    transition: color var(--transition-speed);
}

.timeline-content .company-name,
.university-name {
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-top: 5px;
    margin-bottom: 5px;
    transition: color var(--transition-speed);
}

.timeline-content .job-duration,
.degree-duration {
    color: var(--text-faded);
    font-size: 0.95rem;
    margin-bottom: 10px;
    transition: color var(--transition-speed);
}

.timeline-content ul {
    list-style: disc;
    margin-left: 20px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: color var(--transition-speed);
}

.timeline-content li {
    margin-bottom: 5px;
}

/* --- Contact Section --- */
.contact-section {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    transition: background var(--transition-speed);
    position: relative;
    overflow: hidden;
}

body.dark-mode .contact-section {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.contact-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -250px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.contact-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -200px;
    left: -100px;
    animation: float 15s infinite ease-in-out reverse;
}

.contact-content {
    /* This was using inline styles, moved here */
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.contact-card {
    flex: 1 1 48%;
    /* Takes up roughly half space, minimum 320px */
    min-width: 320px;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: background var(--transition-speed), box-shadow var(--transition-speed);
}

/* Specific styling for the contact info within contact-card */
.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-card p {
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: color var(--transition-speed);
}

.contact-card p a {
    color: var(--text-primary); /* Keeps email/phone text consistent with surrounding text */
    text-decoration: underline;
}

body.dark-mode .contact-card p a {
    color: var(--text-primary); /* Keep dark mode email/phone text consistent */
}

.contact-card p a:hover {
    color: var(--primary-color);
}


.contact-card i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color var(--transition-speed);
}

.contact-form {
    text-align: left; /* Ensure form elements align left */
}

.contact-form .btn {
    display: inline-block;
    margin-top: 20px;
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-faded);
    margin-top: 20px;
    transition: color var(--transition-speed);
}

/* --- Contact Form Group Styles --- */
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: var(--bg-primary);
    /* Input background adapts */
    width: 100%;
    transition: border-color 0.3s ease, background-color var(--transition-speed), color var(--transition-speed);
    color: var(--text-primary);
    /* Input text color adapts */
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
    /* Consider shadow-color variable here too */
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
    box-shadow: 0 0 5px rgba(102, 204, 255, 0.3);
    /* Dark mode specific shadow */
}


/* --- Footer --- */
footer {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: var(--header-text);
    text-align: center;
    padding: 25px 0;
    font-size: 0.9rem;
    transition: background var(--transition-speed), color var(--transition-speed);
    position: relative;
}

body.dark-mode footer {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content p {
    color: var(--header-text) !important;
    margin: 0;
}

.footer-social-links {
    margin-top: 15px;
}

.footer-social-links a {
    color: var(--header-text);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color var(--transition-speed);
}

.footer-social-links a:hover {
    color: var(--primary-color);
}


/* --- Scroll Reveal (from script.js comments) --- */
/* Add these to your style.css if you're using the JS scroll reveal */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.fade-in {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column-reverse;
        /* Image on top on smaller screens */
        text-align: center;
        min-height: auto;
        padding: 80px 20px 60px;
    }

    .hero-content {
        margin-right: 0;
        margin-bottom: 40px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-image {
        margin-bottom: 30px;
        max-width: 300px;
    }

    /* --- Mobile Navigation Overrides --- */
    .nav-links {
        display: none;
        /* Hidden by default */
        flex-direction: column;
        width: 100%;
        position: absolute;
        /* Position relative to parent 'nav' */
        top: 100%;
        /* Position below the header bar */
        left: 0;
        background-color: var(--header-bg);
        /* Match header background */
        box-shadow: var(--box-shadow);
        padding: 1rem 0;
        align-items: center;
        z-index: 999;
        /* Below theme toggle, above content */
        /* Add a transition for smooth open/close */
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        transform: translateY(-10px);
        /* Start slightly above for fade-in effect */
        opacity: 0;
    }

    .nav-links.active {
        display: flex;
        /* Show when 'active' class is present */
        transform: translateY(0);
        /* Move to final position */
        opacity: 1;
    }

    .nav-links li {
        margin: 0.75rem 0;
    }

    .nav-links a {
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: center;
        /* Ensure hover effect matches header text */
        color: var(--header-text);
    }

    .nav-links a::after {
        background-color: var(--primary-color);
        /* Keep primary color for underline */
    }

    /* Hamburger menu button */
    .hamburger-menu {
        display: block;
        /* Show hamburger only on small screens */
        background: none;
        border: none;
        color: var(--header-text);
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 1001;
        /* Ensure it's on top */
        margin-left: auto;
        /* Push it to the right, next to theme toggle */
        padding: 0.5rem;
        transition: color var(--transition-speed);
    }

    .hamburger-menu:hover {
        color: var(--primary-color);
    }

    /* Adjust header elements for mobile layout */
    header nav {
        flex-direction: row;
        /* Keep elements in a row for the top bar */
        justify-content: space-between;
        /* Space out logo, hamburger, toggle */
        align-items: center;
        width: 100%;
        padding: 0 20px;
    }

    header nav .logo {
        flex-grow: 1;
        /* Allow logo to take available space */
        text-align: left;
    }

    /* Theme toggle adjustments for mobile header */
    #theme-toggle {
        position: static;
        /* Remove fixed positioning */
        margin-left: 1rem;
        /* Space from hamburger */
        box-shadow: none;
        /* Remove shadow for a cleaner header look */
        background: none;
        /* Match header background */
        color: var(--header-text);
        font-size: 1.5rem;
        /* Adjust size to fit better in line */
        border: none;
        /* Ensure no border */
    }


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

    .skill-category {
        flex: 1 1 90%;
        /* Take more width */
        max-width: 400px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        /* Single column on small screens */
    }

    .experience-timeline::before,
    .education-timeline::before {
        left: 18px;
        /* Move timeline line to the left */
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        /* Adjust padding */
        padding-right: 10px;
        /* Reset right padding */
        left: 0 !important;
        /* Override inline style (if any) or existing rule */
        text-align: left !important;
        /* Override inline style (if any) or existing rule */
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 9px;
        /* Align dots to the left line */
        right: auto;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Contact Section adjustments for smaller screens */
    .contact-content {
        flex-direction: column;
        /* Stack contact cards */
        align-items: center;
        padding: 1rem;
    }

    .contact-card {
        width: 100%;
        max-width: 450px;
        /* Limit width even when stacked */
    }
}

/* Ensure hamburger is hidden on larger screens */
@media (min-width: 993px) {
    .hamburger-menu {
        display: none;
    }

    .nav-links {
        display: flex !important;
        /* Force display flex for desktop nav links */
        position: static;
        /* Reset positioning */
        box-shadow: none;
        background-color: transparent;
        padding: 0;
        /* Ensure these reset if they were changed in mobile */
        transform: none;
        opacity: 1;
    }

    #theme-toggle {
        /* Reset theme toggle to fixed for desktop */
        position: fixed;
        top: 1rem;
        right: 1rem;
        background: var(--card-bg);
        /* Use card background */
        color: var(--text-primary);
        /* Use primary text color */
        box-shadow: 0 0 10px var(--shadow-color);
        font-size: 1.2rem;
        /* Original size */
        margin-left: 0;
        /* No margin-left from hamburger */
    }
}


@media (max-width: 768px) {
    .hero-section {
        padding: 70px 15px 50px;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }

    .hero-content .tagline {
        font-size: 1.2rem;
        line-height: 1.5;
        white-space: normal;
        word-wrap: break-word;
    }

    .hero-image {
        max-width: 280px;
        margin-bottom: 25px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .section-padding {
        padding: 40px 10px;
    }

    .about-content {
        padding: 25px 20px;
        margin: 0 auto;
        font-size: 1rem;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
    }

    .contact-form {
        padding: 15px;
        /* Slightly reduce padding for smaller screens */
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 10px 40px;
    }

    .section-padding {
        padding: 30px 10px;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-content .tagline {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .hero-image {
        max-width: 220px;
        min-width: 200px;
    }

    .about-content {
        padding: 20px 15px;
        margin: 0 auto;
        font-size: 0.95rem;
        line-height: 1.6;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
    }

    .nav-links li {
        margin-left: 10px;
        /* Reduce spacing between nav links */
    }

    .social-links a {
        font-size: 1.5rem;
        margin-right: 15px;
    }

    .skill-category {
        padding: 15px;
        /* Reduce padding for smaller screens */
    }

    .project-card {
        padding: 15px;
        /* Reduce padding for smaller screens */
    }

    .timeline-content {
        padding: 12px;
        /* Reduce padding for timeline items */
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* ========================================
   Back to Top Button
======================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

#back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(0) scale(1.1);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ========================================
   Achievements Section
======================================== */
.achievements-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    position: relative;
}

body.dark-mode .achievements-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.achievements-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(255, 193, 7, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(40, 167, 69, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

.achievement-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 248, 220, 0.95) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

body.dark-mode .achievement-card {
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.95) 0%, rgba(60, 60, 50, 0.95) 100%);
    border: 1px solid rgba(255, 193, 7, 0.1);
}

.achievement-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.2);
}

.achievement-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.achievement-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.achievement-issuer {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.achievement-description {
    font-size: 0.95rem;
    color: var(--text-faded);
    line-height: 1.6;
}

/* ========================================
   Project Enhancements
======================================== */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.project-demo {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    opacity: 0.8;
}

.project-demo i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
