/* --- Global Reset & Variables --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --bg-color: #0b1120; 
    --card-bg-color: rgba(30, 41, 59, 0.7);
    --primary-color: #38bdf8;
    --text-color: #f1f5f9;
    --text-color-darker: #94a3b8;
    --text-highlight: #ffffff; 
    --border-color: #334155;
    --footer-bg: rgba(11, 17, 32, 0.8);
    --header-height: 4.5rem;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body.light-mode {
    --bg-color: #f8fafc;
    --card-bg-color: rgba(255, 255, 255, 0.8);
    --primary-color: #0ea5e9;
    --text-color: #0f172a;
    --text-color-darker: #64748b;
    --text-highlight: #000000; 
    --border-color: #e2e8f0;
    --footer-bg: #f1f5f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* --- Animated Background Blobs --- */
.bg-blobs {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.15;
    pointer-events: none;
}
.blob {
    position: absolute;
    width: 500px; height: 500px;
    background: var(--primary-color);
    filter: blur(100px);
    border-radius: 50%;
    animation: float 25s infinite alternate;
}
.blob-1 { top: -100px; right: -100px; background: #38bdf8; }
.blob-2 { bottom: -100px; left: -100px; background: #818cf8; animation-delay: -5s; }
.blob-3 { top: 40%; left: 50%; background: #c084fc; width: 300px; height: 300px; animation-duration: 15s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 150px) scale(1.3); }
}

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

section { padding: 8rem 0 4rem; }

/* --- Header & Nav --- */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    transition: 0.3s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.light-mode .header { 
    background: rgba(248, 250, 252, 0.85);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header.scrolled {
    box-shadow: 0 4px 20px var(--shadow-color);
    background: var(--bg-color);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo { 
    font-size: 1.6rem; 
    font-weight: 700; 
    color: var(--text-color); 
    transition: color 0.3s ease;
    text-decoration: none;
}
.nav-logo:hover { color: var(--primary-color); }
.nav-logo span { color: var(--primary-color); }

.nav-list ul { 
    display: flex; 
    gap: 2.5rem; 
    align-items: center; 
    list-style: none;
}

.nav-link {
    font-size: 1.05rem; 
    font-weight: 500;
    color: var(--text-color-darker);
    transition: 0.3s;
    position: relative;
    text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 100%; height: 2.5px;
    background: var(--primary-color);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-color);
}

.nav-menu-right { display: flex; align-items: center; gap: 1.2rem; }
.theme-toggle { font-size: 1.4rem; cursor: pointer; color: var(--text-color); transition: 0.3s; }
.theme-toggle:hover { transform: rotate(15deg); color: var(--primary-color); }

/* --- Hero Section --- */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
}
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}
.hero-text h1 { 
    font-size: 4.5rem; 
    font-weight: 800; 
    margin-bottom: 0.5rem; 
    background: linear-gradient(to right, var(--text-highlight), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-text .subtitle { font-size: 1.8rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--text-highlight); }
.hero-text p { font-size: 1.1rem; color: var(--text-color-darker); max-width: 550px; margin-bottom: 2rem; }

.social-links { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; }
.social-links a { font-size: 1.8rem; color: var(--text-color-darker); transition: 0.3s; text-decoration: none; }
.social-links a:hover { color: var(--primary-color); transform: translateY(-8px); filter: drop-shadow(0 0 8px var(--primary-color)); }

.btn {
    background: var(--primary-color);
    color: #0b1120;
    padding: 1rem 2.5rem;
    border-radius: 0.8rem;
    font-weight: 700;
    display: inline-block;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(56, 189, 248, 0.4); }

.hero-image {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
    object-fit: cover;
    transition: 0.5s ease;
}
.hero-image:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 60px rgba(56, 189, 248, 0.7);
}

/* --- Section Typography & Universal Alignment --- */
.section-title { 
    font-size: 3rem; 
    font-weight: 700; 
    text-align: center; /* Force center */
    width: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--text-highlight));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem; 
}
.section-subtitle { 
    font-size: 1.1rem; 
    color: var(--text-color-darker); 
    text-align: center; /* Force center */
    width: 100%;
    margin-bottom: 4rem; 
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: default;
}

/* --- About Me High Contrast Hover Effect --- */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#about p, #about .section-subtitle {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    color: var(--text-color-darker);
}

/* Hover: Sharp Contrast Transition */
#about .about-para:hover,
#about .section-subtitle:hover {
    color: var(--text-highlight); /* Pure White in Dark / Deep Black in Light */
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Light mode specific adjustment for sharp deep black */
body.light-mode #about .about-para:hover,
body.light-mode #about .section-subtitle:hover {
    color: #000000;
    text-shadow: none;
}

/* --- Skills Grid --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.5rem;
}
.skill-card {
    background: var(--card-bg-color);
    backdrop-filter: blur(10px);
    padding: 2.2rem 1rem;
    border-radius: 1.2rem;
    text-align: center;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.skill-card:hover { transform: translateY(-12px) scale(1.05); }
.skill-card i { font-size: 3rem; margin-bottom: 5px; transition: 0.3s; }
.skill-card h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-highlight); }

/* Skill Branding Colors */
.skill-card[data-color="html"] i { color: #E34F26; }
.skill-card[data-color="html"]:hover { border-color: #E34F26; box-shadow: 0 0 30px rgba(227, 79, 38, 0.4); }
.skill-card[data-color="css"] i { color: #1572B6; }
.skill-card[data-color="css"]:hover { border-color: #1572B6; box-shadow: 0 0 30px rgba(21, 114, 182, 0.4); }
.skill-card[data-color="tailwind"] i { color: #06B6D4; }
.skill-card[data-color="tailwind"]:hover { border-color: #06B6D4; box-shadow: 0 0 30px rgba(6, 182, 212, 0.4); }
.skill-card[data-color="js"] i { color: #F7DF1E; }
.skill-card[data-color="js"]:hover { border-color: #F7DF1E; box-shadow: 0 0 30px rgba(247, 223, 30, 0.4); }
.skill-card[data-color="ts"] i { color: #3178C6; }
.skill-card[data-color="ts"]:hover { border-color: #3178C6; box-shadow: 0 0 30px rgba(49, 120, 198, 0.4); }
.skill-card[data-color="react"] i { color: #61DAFB; }
.skill-card[data-color="react"]:hover { border-color: #61DAFB; box-shadow: 0 0 30px rgba(97, 218, 251, 0.4); }
.skill-card[data-color="next"] i { color: #555555; }
body.light-mode .skill-card[data-color="next"] i { color: #000000; }
.skill-card[data-color="node"] i { color: #339933; }
.skill-card[data-color="node"]:hover { border-color: #339933; box-shadow: 0 0 30px rgba(51, 153, 51, 0.4); }
.skill-card[data-color="mongo"] i { color: #47A248; }
.skill-card[data-color="mongo"]:hover { border-color: #47A248; box-shadow: 0 0 30px rgba(71, 162, 72, 0.4); }
.skill-card[data-color="mysql"] i { color: #4479A1; }
.skill-card[data-color="mysql"]:hover { border-color: #4479A1; box-shadow: 0 0 30px rgba(68, 121, 161, 0.4); }
.skill-card[data-color="java"] i { color: #007396; }
.skill-card[data-color="java"]:hover { border-color: #007396; box-shadow: 0 0 30px rgba(0, 115, 150, 0.4); }
.skill-card[data-color="python"] i { color: #3776AB; }
.skill-card[data-color="python"]:hover { border-color: #3776AB; box-shadow: 0 0 30px rgba(55, 118, 171, 0.4); }
.skill-card[data-color="spring"] i { color: #6DB33F; }
.skill-card[data-color="spring"]:hover { border-color: #6DB33F; box-shadow: 0 0 30px rgba(109, 179, 63, 0.4); }
.skill-card[data-color="vite"] i { color: #646CFF; }
.skill-card[data-color="vite"]:hover { border-color: #646CFF; box-shadow: 0 0 30px rgba(100, 108, 255, 0.4); }
.skill-card[data-color="gcloud"] i { color: #4285F4; }
.skill-card[data-color="gcloud"]:hover { border-color: #4285F4; box-shadow: 0 0 30px rgba(66, 133, 244, 0.4); }
.skill-card[data-color="aws"] i { color: #FF9900; }
.skill-card[data-color="aws"]:hover { border-color: #FF9900; box-shadow: 0 0 30px rgba(255, 153, 0, 0.4); }
.skill-card[data-color="vercel"] i { color: var(--text-highlight); }
.skill-card[data-color="vercel"]:hover { border-color: var(--text-highlight); box-shadow: 0 0 30px rgba(255, 255, 255, 0.3); }
.skill-card[data-color="git"] i { color: #F05032; }
.skill-card[data-color="git"]:hover { border-color: #F05032; box-shadow: 0 0 30px rgba(240, 80, 50, 0.4); }
.skill-card[data-color="figma"] i { color: #F24E1E; }
.skill-card[data-color="figma"]:hover { border-color: #F24E1E; box-shadow: 0 0 30px rgba(242, 78, 30, 0.4); }
.skill-card[data-color="canva"] i { color: #00C4CC; }
.skill-card[data-color="canva"]:hover { border-color: #00C4CC; box-shadow: 0 0 30px rgba(0, 196, 204, 0.4); }
.skill-card[data-color="photoshop"] i { color: #31A8FF; }
.skill-card[data-color="photoshop"]:hover { border-color: #31A8FF; box-shadow: 0 0 30px rgba(49, 168, 255, 0.4); }
.skill-card[data-color="blender"] i { color: #E87D0D; }
.skill-card[data-color="blender"]:hover { border-color: #E87D0D; box-shadow: 0 0 30px rgba(232, 125, 13, 0.4); }
.skill-card[data-color="c"] i { color: #A8B9CC; }
.skill-card[data-color="c"]:hover { border-color: #A8B9CC; box-shadow: 0 0 30px rgba(168, 185, 204, 0.4); }
.skill-card[data-color="cpp"] i { color: #00599C; }
.skill-card[data-color="cpp"]:hover { border-color: #00599C; box-shadow: 0 0 30px rgba(0, 89, 156, 0.4); }

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}
.project-card {
    background: var(--card-bg-color);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.4s;
    border: 1px solid rgba(255,255,255,0.05);
}
.project-card:hover { 
    transform: translateY(-15px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(56, 189, 248, 0.3);
}
.project-image img { width: 100%; height: 230px; object-fit: cover; transition: 0.5s; }
.project-card:hover .project-image img { transform: scale(1.1); }
.project-content { padding: 2rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-content h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-highlight); }
.project-content p { font-size: 1rem; color: var(--text-color-darker); margin-bottom: 1.5rem; flex-grow: 1; }
.project-links { display: flex; gap: 1.5rem; }
.project-links a { font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--primary-color); transition: 0.3s; }
.project-links a:hover { color: var(--text-highlight); }

/* --- Premium Read More Interaction --- */
.btn-read-more {
    color: var(--primary-color); 
    cursor: pointer; 
    font-weight: 600; 
    margin-top: 1rem;
    display: inline-block;
    transition: all 0.3s ease;
}
.btn-read-more:hover {
    color: var(--text-highlight);
    transform: translateX(8px);
}

/* --- Contact Form --- */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
body.light-mode .contact-form-container { 
    background: rgba(255, 255, 255, 0.9); 
    border: 1px solid rgba(0,0,0,0.05);
}
.form-group { margin-bottom: 1.5rem; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 1rem;
    color: var(--text-highlight);
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}
body.light-mode .form-group input, body.light-mode .form-group textarea { 
    background: rgba(241, 245, 249, 0.8); 
    border-color: #cbd5e1; 
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary-color); }

.submit-btn {
    width: 100%;
    background: linear-gradient(to right, var(--primary-color), #818cf8);
    color: #000;
    padding: 1.2rem;
    border-radius: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.1rem;
}
.submit-btn:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(56, 189, 248, 0.4); }

/* --- Footer Dynamic Fix --- */
.footer { 
    text-align: center; 
    padding: 4rem 0; 
    background-color: var(--footer-bg);
    color: var(--text-color-darker); 
    font-size: 0.95rem; 
    margin-top: 6rem;
    transition: all 0.3s ease;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; visibility: hidden;
    transition: 0.3s;
    backdrop-filter: blur(15px);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { 
    background: var(--card-bg-color); width: 90%; max-width: 700px; padding: 3rem; 
    border-radius: 2rem; position: relative; border: 1px solid rgba(255,255,255,0.1); 
    color: var(--text-highlight); overflow-y: auto; max-height: 90vh; 
}
.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; font-size: 2.2rem; cursor: pointer; color: var(--text-highlight); }

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-content { flex-direction: column-reverse; text-align: center; gap: 3rem; }
    .hero-text h1 { font-size: 3.5rem; }
    .hero-image { width: 300px; height: 300px; }
}
@media (max-width: 768px) {
    .nav-list { display: none; } /* Mobile menu toggle logic should be handled in JS */
}
