:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-main: #0f172a; /* Slate 900 */
    --bg-alt: #1e293b; /* Slate 800 */
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --accent: #38bdf8; /* Light Blue 400 */
    --accent-hover: #0ea5e9; /* Light Blue 500 */
    --border: #334155; /* Slate 700 */
    --card-bg: #1e293b;
    --card-hover: #334155;
    
    /* Spacing & Layout */
    --max-width: 1200px;
    --section-padding: 5rem 0;
    --border-radius: 0.75rem;
    --transition: 0.3s ease;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
}

[data-theme="light"] {
    /* Color Palette - Light Mode */
    --bg-main: #f8fafc; /* Slate 50 */
    --bg-alt: #f1f5f9; /* Slate 100 */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --accent: #0284c7; /* Light Blue 600 */
    --accent-hover: #0369a1; /* Light Blue 700 */
    --border: #e2e8f0; /* Slate 200 */
    --card-bg: #ffffff;
    --card-hover: #f1f5f9;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.bg-alt {
    background-color: var(--bg-alt);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
}

.section-title.text-left {
    text-align: left;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--accent);
    color: var(--accent) !important;
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: #fff !important;
    transform: translateY(-2px);
}

.btn-icon {
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.btn-icon:not(.disabled):hover {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.w-full {
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.8);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition);
}

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

.nav-link:hover {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-toggle:hover {
    background-color: var(--bg-alt);
    color: var(--accent);
}

/* Mobile Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--bg-main);
    overflow: hidden;
    transition: height 0.4s ease;
    z-index: 999;
    border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
    height: calc(100vh - 70px);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
}

.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 600;
}

.mobile-nav-link:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.greeting {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.name {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Code Window */
.code-window {
    background-color: #1e1e1e; /* Darker than bg for contrast even in light mode */
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
}

.window-header {
    background-color: #2d2d2d;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.window-body {
    padding: 1.5rem;
    overflow-x: auto;
}

.window-body pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e6e6e6; /* Ensure readability */
}

.keyword { color: #569cd6; }
.variable { color: #9cdcfe; }
.property { color: #9cdcfe; }
.string { color: #ce9178; }
.function { color: #dcdcaa; }
.boolean { color: #569cd6; }

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.about-focus {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.about-focus h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background-color: var(--bg-main);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    transition: transform var(--transition);
    text-align: center;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.skill-list li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.project-tags span {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

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

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: var(--accent);
    border-radius: 50%;
    border: 4px solid var(--bg-alt);
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    transition: transform var(--transition);
}

.timeline-content:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

.timeline-date {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-list {
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.timeline-list li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-tags span {
    font-size: 0.8rem;
    background-color: var(--bg-main);
    color: var(--text-main);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Certifications Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cert-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform var(--transition);
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.cert-icon {
    font-size: 2rem;
    color: var(--accent);
}

.cert-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cert-issuer {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cert-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* Education & Activities */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.edu-grade {
    color: var(--text-main);
    font-weight: 600;
    margin-top: 0.5rem;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.activity-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    transition: transform var(--transition);
}

.activity-card:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.activity-icon {
    font-size: 1.5rem;
    color: var(--accent);
    width: 40px;
    text-align: center;
}

.activity-header h3 {
    font-size: 1.1rem;
}

.activity-role {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.activity-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding-left: 3.5rem;
}

/* Contact Section */
.contact-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--text-muted);
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.contact-form {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.form-status.success { color: #27c93f; }
.form-status.error { color: #ff5f56; }

/* Footer */
.footer {
    background-color: var(--bg-alt);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.back-to-top {
    position: absolute;
    top: -20px;
    right: 5%;
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.back-to-top:hover {
    transform: translateY(-5px);
    color: #fff;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-right {
    transform: translateX(30px);
}

.fade-right.active {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .intro {
        margin: 0 auto 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

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

    .hero-visual {
        display: none; /* Hide visual on smaller mobile screens for cleaner look or make it smaller */
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 3rem;
    }
    
    .role {
        font-size: 1.2rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
}
