/* =========================================
   1. VARIABLES & THEMES
   ========================================= */
:root {
    /* --- DARK MODE (Default) --- */
    --bg-body: #000000;       /* Deep Navy/Slate */
    --bg-card: #202124;       /* Lighter Slate */
    --bg-alt: #1a1919;        /* Alternate Background */
    
    --text-main: #f1f5f9;     /* Off-white */
    --text-muted: #94a3b8;    /* Muted Blue-Grey */
    
    --accent: #38bdf8;        /* Sky Blue */
    --accent-hover: #0ea5e9;
    --border: #334155;
    
    --nav-bg: rgba(33, 34, 36, 0.85);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    
    --radius: 12px;
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    /* --- LIGHT MODE --- */
    --bg-body: #ffffff;
    --bg-card: #f8fafc;
    --bg-alt: #f1f5f9;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --accent: #0284c7;        /* Darker Blue */
    --accent-hover: #0369a1;
    --border: #e2e8f0;
    
    --nav-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

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

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Spacing */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent);
    color: #fff; /* Always white text on accent */
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.logo .dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-links a:hover {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}
.icon-btn:hover {
    color: var(--accent);
}

/* TUI Switch Button Styling */
.tui-switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.1); /* Subtle Green Tint */
    color: #10b981; /* Terminal Green */
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.tui-switch-btn:hover {
    background-color: #10b981;
    color: #fff;
    border-color: #10b981;
}

/* Mobile Menu */
.mobile-only { display: none; }
.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}
.mobile-menu.active {
    transform: translateY(0);
}
.mobile-link {
    font-size: 1.1rem;
    font-weight: 600;
}
.tui-link {
    color: #10b981;
    margin-top: 10px;
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 8px;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    padding: 160px 0 100px 0;
    text-align: center;
}

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

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Gradient text effect */
    background-clip: text;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.bio-snippet {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: var(--text-muted);
}

.current-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 40px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* =========================================
   5. SKILLS SECTION
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

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

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

.icon-box {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.skill-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.skill-list {
    text-align: left;
}

.skill-list li {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
    position: relative;
    padding-left: 15px;
}

.skill-list li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
}

/* =========================================
   6. PROJECTS SECTION
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

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

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-icon {
    font-size: 1.8rem;
    color: var(--accent);
}

.project-links a {
    font-size: 1.2rem;
    color: var(--text-muted);
}
.project-links a:hover { color: var(--text-main); }

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes tags to bottom */
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    font-size: 0.75rem;
    background-color: var(--bg-alt);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
}

/* =========================================
   7. EXPERIENCE SECTION
   ========================================= */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

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

.timeline-item {
    padding-left: 30px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid var(--bg-body);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.company {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   8. EDUCATION & CONTACT
   ========================================= */
.bg-alt {
    background-color: var(--bg-alt);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

.edu-item {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 2px solid var(--border);
}
.edu-item .year {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.edu-item h4 { margin: 5px 0 2px 0; }
.edu-item .grade {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.cert-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-muted);
}
.cert-list i { color: var(--accent); }

/* Contact */
.contact-card {
    text-align: center;
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border);
}

.email-link {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 20px 0;
    color: var(--accent);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-muted);
}
.social-links a:hover {
    color: var(--accent);
    transform: scale(1.1);
}

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

/* =========================================
   9. FOOTER
   ========================================= */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* =========================================
   10. MEDIA QUERIES
   ========================================= */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-only { display: block; }
    
    .hero h1 { font-size: 2.5rem; }
    .grid-2-col { grid-template-columns: 1fr; }
    
    .timeline::before { left: 0; }
    .timeline-item { padding-left: 25px; }
    
    .project-header {
        flex-direction: row;
        align-items: center;
    }
}

/* =========================================
   11. SCROLL ANIMATIONS (Added via JS)
   ========================================= */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

/* Staggered delay for grid items */
.skills-grid .skill-card:nth-child(2) { transition-delay: 100ms; }
.skills-grid .skill-card:nth-child(3) { transition-delay: 200ms; }
.skills-grid .skill-card:nth-child(4) { transition-delay: 300ms; }

.projects-grid .project-card:nth-child(2) { transition-delay: 100ms; }
.projects-grid .project-card:nth-child(3) { transition-delay: 200ms; }