/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
    /* DARK MODE (Default) */
    --bg-color: #0a192f;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent-color: #64ffda;
    --card-bg: #112240;
    --nav-bg: rgba(10, 25, 47, 0.85);
    --shadow: rgba(2, 12, 27, 0.7);
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

/* LIGHT MODE */
[data-theme="light"] {
    --bg-color: #f0f2f5;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --accent-color: #0056b3; /* Deep Blue for contrast */
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- 2. TYPOGRAPHY --- */
h1, h2, h3 {
    color: var(--text-primary);
    font-weight: 700;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.section-title::after {
    content: "";
    display: block;
    width: 300px;
    height: 1px;
    background: var(--text-secondary);
    margin-left: 20px;
    opacity: 0.3;
}

.highlight { color: var(--accent-color); }
.mono { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent-color); }

/* --- 3. NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 10px 30px -10px var(--shadow);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: bold;
    border: 2px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-right-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}
.nav-links a:hover { color: var(--accent-color); }

.btn-resume {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    white-space: nowrap;
}
.btn-resume:hover { background: rgba(100, 255, 218, 0.1); }

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
    padding: 5px;
}
.theme-toggle:hover {
    color: var(--accent-color);
    transform: rotate(15deg);
}

/* --- 4. HERO SECTION (Redesigned for Image) --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Puts Text Left, Image Right */
    padding: 0 10%;
    max-width: 1400px;
    margin: 0 auto;
    /* Added padding-top to prevent nav overlap */
    padding-top: 120px; 
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

/* Adjustments for the Image Wrapper */
.hero-image-wrapper {
    position: centre;
    width: 260px;
    height: 300px;
    margin-left: 50px;
	margin-bottom: 50px;
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Circle Mode */
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    transition: transform 0.3s;
}

.profile-img:hover {
    transform: scale(1.05);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 3.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero p {
    max-width: 540px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.hero-intro {
    font-family: var(--font-mono);
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.typewriter-text {
    color: var(--accent-color);
    border-right: 2px solid var(--accent-color);
    animation: blink 0.7s infinite;
}

@keyframes blink { 50% { border-color: transparent; } }

/* --- 5. SECTIONS COMMON --- */
section {
    padding: 6rem 10%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- 6. SKILLS GRID --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s;
    box-shadow: 0 10px 30px -15px var(--shadow);
}

.skill-card:hover { transform: translateY(-5px); }

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(100, 255, 218, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    color: var(--accent-color);
}

/* --- 7. EXPERIENCE TIMELINE --- */
.timeline {
    border-left: 2px solid var(--text-secondary);
    margin-left: 1rem;
    padding-left: 2rem;
}

.job-card {
    position: relative;
    margin-bottom: 3rem;
}

.job-card::before {
    content: "";
    position: absolute;
    left: -2.6rem;
    top: 5px;
    width: 15px;
    height: 15px;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
}

.job-title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.company { color: var(--accent-color); font-family: var(--font-mono); }
.duration { font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 1rem; display: block;}

.job-details li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}
.job-details li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* --- 8. PROJECTS --- */
.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 30px -15px var(--shadow);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.folder-icon { font-size: 2.5rem; color: var(--accent-color); }
.project-links a { font-size: 1.3rem; color: var(--text-secondary); margin-left: 15px; }
.project-links a:hover { color: var(--accent-color); }

.project-tech-list {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- 9. CONTACT --- */
.contact-section { text-align: center; padding-bottom: 10rem; }
.contact-section h2 { font-size: 3rem; margin-bottom: 1.5rem; }
.btn-main {
    display: inline-block;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1.25rem 3rem;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-top: 2rem;
}
.btn-main:hover { background: rgba(100, 255, 218, 0.1); }

/* --- 10. CERTIFICATIONS --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-shadow: 0 10px 30px -15px var(--shadow);
}

.cert-card:hover {
    transform: translateY(-7px);
    border-color: var(--accent-color);
}

.cert-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cert-icon {
    color: var(--accent-color);
    font-size: 2rem;
}

.cert-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.cert-issuer {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    display: block;
}

.cert-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cert-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cert-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- New Class for Multiple Link Stack --- */
.cert-links-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto; 
}

/* --- 11. BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--card-bg);
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--accent-color);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 99;
    box-shadow: 0 10px 30px -10px var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    bottom: 40px;
}
.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
    color: var(--bg-color);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse; /* Stack image above text on mobile? or reverse */
        text-align: center;
        justify-content: center;
        padding-top: 100px;
    }
    
    .hero-content {
        margin-top: 2rem;
    }
    
    .hero-image-wrapper {
        margin: 0 auto;
        width: 200px;
        height: 200px;
    }

    .nav-links { display: none; }
    .section-title { justify-content: center; }
    .section-title::after { display: none; }
}