/* ==========================================================================
   Global Variables & Base Styles
   ========================================================================== */
   :root {
    /* Color Palette - Premium Tech Dark Mode */
    --bg-main: #0a0a0a;
    --bg-secondary: #121212;
    --panel-bg: rgba(30, 30, 30, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    
    /* Accents */
    --primary: #00f0ff; /* Neon Cyan */
    --primary-glow: rgba(0, 240, 255, 0.2);
    --secondary: #0066ff; /* Electric Blue */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    /* Terminal Colors */
    --term-red: #ff5f56;
    --term-yellow: #ffbd2e;
    --term-green: #27c93f;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Background Effects
   ========================================================================== */
.glow-bg {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}

.glow-bg.top-right {
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
}

.glow-bg.bottom-left {
    bottom: -200px;
    left: -200px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

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

a:hover {
    color: var(--secondary);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.tab-button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2);
}

.accent {
    color: var(--primary);
}

.highlight {
    color: var(--text-main);
    font-weight: 600;
}

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

.box-glass {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    transition: var(--transition);
}

.box-glass:hover {
    border-color: var(--primary-glow);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
}

.section-header::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--panel-border);
    flex-grow: 1;
    margin-left: 20px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-glow);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--panel-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

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

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

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

.nav-socials {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
}

.nav-socials a {
    color: var(--text-muted);
}

.nav-socials a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: transparent;
    color: var(--text-main);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px;
    line-height: 1;
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for navbar */
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 5%;
}

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

.greeting {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.title {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    min-height: 40px; /* Prevent jitter during typing */
}

/* Typing effect cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.summary {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 620px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   Hero Visual / Avatar
   ========================================================================== */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Soft glowing backdrop */
    background: radial-gradient(circle at center, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.avatar-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    top: 0; left: 0;
    z-index: 0;
}

.hero-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    /* Clean cut mask */
    mask-image: radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   Premium Section Dividers
   ========================================================================== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 40px auto;
    opacity: 0.6;
}

.section-divider .line {
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, transparent, var(--panel-border) 50%, transparent);
}

.section-divider .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    margin: 0 20px;
}

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

.skill-category {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--primary-glow);
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--primary);
}

.skill-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 2.5rem;
    color: #888;
}

.skill-icons i, .skill-icons .text-icon {
    transition: var(--transition);
}

.skill-icons i:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* Devicon Color Overrides for Dark Mode */
.skill-icons .devicon-ansible-plain.colored,
.skill-icons .devicon-bash-plain.colored,
.skill-icons .devicon-nvidia-original.colored,
.skill-icons .devicon-linux-plain.colored { 
    filter: drop-shadow(1px 1px 0 #fff) drop-shadow(-1px -1px 0 #fff) drop-shadow(1px -1px 0 #fff) drop-shadow(-1px 1px 0 #fff);
}
.skill-icons .devicon-rust-plain.colored {
    filter: drop-shadow(0 1px 0 #fff) drop-shadow(1px 0 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(1.5px 1.5px 0 #fff) drop-shadow(-1.5px -1.5px 0 #fff) drop-shadow(1.5px -1.5px 0 #fff) drop-shadow(-1.5px 1.5px 0 #fff) !important;
}
.skill-icons .devicon-ansible-plain.colored { color: #EE0000 !important; }
.skill-icons .devicon-bash-plain.colored { color: #4EAA25 !important; }
.skill-icons .devicon-nvidia-original.colored { color: #76B900 !important; }
/* Note: Linux penguin and Rust crab are natively multi-colored/black, we only need the border drop-shadow above */

.border-white {
    filter: drop-shadow(0 1px 0 #fff) drop-shadow(1px 0 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(1.5px 1.5px 0 #fff) drop-shadow(-1.5px -1.5px 0 #fff) drop-shadow(1.5px -1.5px 0 #fff) drop-shadow(-1.5px 1.5px 0 #fff) !important;
}

.custom-icon {
    height: 40px; /* Adjust to match the 2.5rem font-size of Devicons */
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.1));
}

.custom-icon:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5)) brightness(1.2);
}

/* ==========================================================================
   Experience Section
   ========================================================================== */
.experience-content {
    width: 100%;
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.tab-button.active {
    background: var(--primary);
    color: var(--bg-main);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3); /* Fallback to cyan glow */
}

.tab-pane {
    display: none;
    animation: fadeInTab 0.4s ease forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--panel-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--primary);
}

.timeline-date {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-content {
    padding: 2rem;
}

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

.edu-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: white;
    padding: 5px;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-titles {
    flex-grow: 1;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

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

.timeline-content p {
    font-size: 0.95rem;
    color: #b0b0b0;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Certifications Grid
   ========================================================================== */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding-top: 1rem;
}

.cert-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 242, 254, 0.3);
}

.cert-icon-wrapper {
    height: 48px;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
}

.cert-icon-wrapper img, .cert-icon-wrapper i {
    max-height: 100%;
    width: auto;
}

.cert-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--text-main);
}

.cert-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.cert-date {
    font-size: 0.8rem;
    font-family: var(--font-code);
    color: var(--primary);
    padding: 4px 12px;
    background: rgba(0, 242, 254, 0.1);
    border-radius: 20px;
    display: inline-block;
}

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

.project-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

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

.folder-icon {
    font-size: 2.5rem;
    color: var(--primary);
}

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

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

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

.project-card p {
    font-size: 0.95rem;
    color: #a0a0a0;
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.tech-tags li {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--primary);
    background: rgba(0, 240, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    text-align: center;
    padding: 3rem 5%;
    border-top: 1px solid var(--panel-border);
    margin-top: 5rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.motto {
    color: var(--primary);
    font-family: var(--font-code);
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .summary {
        margin-inline: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .experience-content {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .name { font-size: 3rem; }
    .title { font-size: 1.5rem; }

    .summary {
        font-size: 1rem;
        max-width: 100%;
        margin-bottom: 1.75rem;
    }
    
    .nav-links, .nav-socials {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 20px;
        background: rgba(10, 10, 10, 0.95);
        border-bottom: 1px solid var(--panel-border);
        z-index: 1001;
    }
}

@media screen and (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .edu-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Reveal Animations */
.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.hidden-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
