/* 
   ------------------------------------------------------------
   GLOBAL VARIABLES & RESET
   ------------------------------------------------------------ 
*/
:root {
    /* Color Palette - Dark Theme (Default) */
    --bg-body: #050505;
    --bg-surface: #0a0a0a;
    --bg-surface-hover: #121212;
    --primary: #3da87f;
    /* Cyber Green */
    --primary-dim: rgba(0, 255, 157, 0.1);
    --secondary: #6e00ff;
    /* Electric Purple */
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --border: #1f1f1f;
    --glass: rgba(255, 255, 255, 0.03);

    /* Spacing & Layout */
    --section-padding: 80px 0;
    --container-width: 1100px;
    --radius: 12px;

    /* Fonts */
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="light"] {
    --bg-body: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f3f5;
    --primary: #008f58;
    --primary-dim: rgba(0, 143, 88, 0.1);
    --secondary: #5a00d1;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --border: #e9ecef;
    --glass: rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* 
   ------------------------------------------------------------
   UTILITIES & TYPOGRAPHY
   ------------------------------------------------------------ 
*/
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding);
}

.alt-bg {
    background-color: var(--bg-surface);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    z-index: 1;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.accent {
    color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    /* Contrast for neon green */
    border: 2px solid var(--primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    box-shadow: 0 0 15px var(--primary-dim);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: var(--glass);
}

/* 
   ------------------------------------------------------------
   HEADER & NAVIGATION
   ------------------------------------------------------------ 
*/
header.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
}

nav#nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

#theme-toggle,
#menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

#menu-toggle {
    display: none;
}

#theme-toggle:hover {
    transform: rotate(15deg);
    color: var(--primary);
}

/* 
   ------------------------------------------------------------
   HERO SECTION
   ------------------------------------------------------------ 
*/
.hero-section {
    padding: 180px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(0, 255, 157, 0.05) 0%, transparent 40%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    width: 100%;
}

.text-content {
    flex: 1;
}

.subtitle {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-section h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.buttons {
    display: flex;
    gap: 15px;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(40px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 30px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 20px, 0);
    }

    40% {
        clip: rect(30px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    80% {
        clip: rect(50px, 9999px, 30px, 0);
    }

    100% {
        clip: rect(90px, 9999px, 40px, 0);
    }
}

/* Scanner UI (Abstract visual) */
.visual-content {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.scanner-ui {
    width: 300px;
    height: 300px;
    border: 1px solid var(--border);
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 20%,
            /* var(--glass) */
            rgba(255, 255, 255, 0.01) 80%);
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.05);
}

.scanner-line {
    width: 100%;
    height: 2px;
    background: var(--primary);
    position: absolute;
    top: 50%;
    left: 0;
    box-shadow: 0 0 10px var(--primary);
    animation: scan 4s infinite linear;
    opacity: 0.6;
}

@keyframes scan {
    0% {
        transform: translateY(-150px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(150px);
        opacity: 0;
    }
}

.data-point {
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px var(--secondary);
}

.p1 {
    top: 30%;
    left: 40%;
    animation: pulse 3s infinite;
}

.p2 {
    top: 70%;
    left: 70%;
    animation: pulse 2s infinite;
}

.p3 {
    top: 50%;
    left: 20%;
    animation: pulse 4s infinite;
}

.circle {
    position: absolute;
    border: 1px dashed var(--border);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.c1 {
    width: 200px;
    height: 200px;
    animation: spin 20s linear infinite;
}

.c2 {
    width: 100px;
    height: 100px;
    border-color: var(--primary);
    opacity: 0.1;
    animation: spin-rev 10s linear infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes spin-rev {
    0% {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

/* 
   ------------------------------------------------------------
   ABOUT SECTION
   ------------------------------------------------------------ 
*/
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 250px;
    height: 250px;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03));
}

.profile-photo {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.profile-photo:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--primary-dim);
}

/* 
   ------------------------------------------------------------
   SKILLS SECTION
   ------------------------------------------------------------ 
*/
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--bg-body);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.skill-category h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.skill-category h3 i {
    color: var(--primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    background: var(--bg-surface);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-category:hover .tags span {
    border-color: var(--glass);
    background: var(--bg-surface-hover);
    color: var(--text-main);
}

/* 
   ------------------------------------------------------------
   PROJECTS SECTION
   ------------------------------------------------------------ 
*/
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    padding: 35px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.tech-stack {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.project-link:hover {
    color: var(--primary);
    gap: 15px;
}

/* 
   ------------------------------------------------------------
   EXPERIENCE SECTION (TIMELINE)
   ------------------------------------------------------------ 
*/
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 50px;
}

.timeline-marker {
    position: absolute;
    left: -5px;
    top: 10px;
    width: 12px;
    height: 12px;
    background: var(--bg-body);
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-surface);
}

.timeline-content .date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 5px;
    display: block;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.timeline-content ul {
    color: var(--text-muted);
    list-style: disc;
    padding-left: 20px;
}

.timeline-content li {
    margin-bottom: 5px;
}

/* 
   ------------------------------------------------------------
   SERVICES SECTION
   ------------------------------------------------------------ 
*/
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover {
    background: var(--bg-surface-hover);
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 
   ------------------------------------------------------------
   OBJECTIVE SECTION
   ------------------------------------------------------------ 
*/
.objective-section {
    padding-bottom: 40px;
}

.objective-box {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-body) 100%);
    border: 1px solid var(--border);
    padding: 60px;
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.objective-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.icon-large {
    font-size: 3rem;
    color: var(--bg-surface-hover);
    margin-bottom: 20px;
    display: block;
}

.objective-box h2 {
    margin-bottom: 20px;
    color: var(--text-main);
}

.objective-box p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* 
   ------------------------------------------------------------
   CONTACT & FOOTER
   ------------------------------------------------------------ 
*/
.contact-container {
    text-align: center;
}

.contact-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    background: var(--bg-body);
    padding: 40px;
    min-width: 250px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-card:hover {
    border-color: var(--primary);
    background: var(--bg-surface);
}

.contact-card i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-to-top {
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.back-to-top:hover {
    background: var(--primary);
    color: #000;
}

/* 
   ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ 
*/
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .description {
        margin: 0 auto 2rem;
    }

    .buttons {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    #menu-toggle {
        display: block;
    }

    nav#nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        padding: 20px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    nav#nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav#nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .scanner-ui {
        width: 250px;
        height: 250px;
        margin-bottom: 40px;
    }
}

/* Animation Classes */
.fade-in,
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}