/* ========================================
   CSS Variables & Design System
   ======================================== */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 30, 0.6);
    --bg-card-hover: rgba(25, 25, 42, 0.8);

    --text-primary: #e8e8ed;
    --text-secondary: #9898a6;
    --text-muted: #5a5a6e;

    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #a855f7 100%);
    --accent-gradient-text: linear-gradient(135deg, #00d4ff, #7c3aed);

    --border-color: rgba(124, 58, 237, 0.15);
    --border-color-hover: rgba(124, 58, 237, 0.4);

    --glow-primary: rgba(0, 212, 255, 0.15);
    --glow-secondary: rgba(124, 58, 237, 0.15);

    /* Spacing */
    --section-padding: 120px 0;
    --container-width: 1200px;
    --container-padding: 0 24px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

::selection {
    background: rgba(124, 58, 237, 0.3);
    color: #fff;
}

/* ========================================
   Animated Background
   ======================================== */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--glow-secondary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--glow-primary);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.bg-glow-3 {
    width: 400px;
    height: 400px;
    background: rgba(168, 85, 247, 0.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(10px, -10px) scale(1.02); }
}

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
    position: relative;
    z-index: 1;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
}

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 100px;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.1);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-slow);
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.mobile-nav-link {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-tertiary);
    margin-bottom: 32px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 600;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--accent-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 36px;
}

.hero-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Buttons */
.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 56px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

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

.btn-outline:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

/* Tech Stack */
.tech-stack {
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}

.tech-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    cursor: default;
}

.tech-tag:hover {
    color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.06);
    border-color: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.tech-icon {
    width: 16px;
    height: 16px;
}

/* Hero Visual - Code Window */
.hero-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    width: 100%;
    max-width: 480px;
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(124, 58, 237, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
}

.code-window::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), transparent, rgba(0, 212, 255, 0.1));
    z-index: -1;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.code-dots {
    display: flex;
    gap: 8px;
}

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

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.code-filename {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-body {
    padding: 24px;
    overflow-x: auto;
}

.code-body code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.code-keyword { color: #c678dd; }
.code-type { color: #e5c07b; }
.code-prop { color: #e06c75; }
.code-string { color: #98c379; }
.code-number { color: #d19a66; }
.code-var { color: #61afef; }

/* ========================================
   Section Common
   ======================================== */
.section-header {
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.section-subheader {
    margin-top: 80px;
    margin-bottom: 40px;
}

.section-subtag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-tertiary);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-tertiary);
}

/* ========================================
   Experience Section
   ======================================== */
.experience {
    padding: var(--section-padding);
    position: relative;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-secondary), rgba(124, 58, 237, 0.1));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
}

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

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-secondary);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
    position: relative;
    z-index: 2;
    transition: var(--transition-base);
}

.timeline-dot-intern {
    width: 14px;
    height: 14px;
    background: var(--accent-tertiary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.3), 0 0 20px rgba(124, 58, 237, 0.3);
}

/* Experience Card */
.exp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.exp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-base);
}

.exp-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
}

.exp-card:hover::before {
    opacity: 1;
}

.exp-card-intern {
    border-color: rgba(168, 85, 247, 0.1);
}

.exp-card-intern:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.exp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.exp-company {
    font-size: 1.25rem;
    font-weight: 700;
}

.exp-badge {
    padding: 3px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
}

.exp-badge-current {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.exp-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.exp-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

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

.exp-tags span {
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-tertiary);
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 100px;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: var(--section-padding);
    position: relative;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(124, 58, 237, 0.06), transparent 60%);
    opacity: 0;
    transition: var(--transition-base);
}

.contact-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.1);
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.contact-icon-phone {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.contact-icon-linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
}

.contact-icon-email {
    background: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

.contact-icon-medium {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.contact-card:hover .contact-icon {
    transform: scale(1.1);
}

.contact-info {
    flex: 1;
}

.contact-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.contact-arrow {
    color: var(--text-muted);
    transition: var(--transition-base);
    flex-shrink: 0;
}

.contact-card:hover .contact-arrow {
    color: var(--accent-primary);
    transform: translate(4px, -4px);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

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

.footer-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-code {
    color: var(--accent-secondary);
    font-family: var(--font-mono);
}

.footer-year {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Animations
   ======================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0, 0);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-visual {
        order: -1;
    }

    .code-window {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        justify-content: center;
    }

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

    .timeline {
        padding-left: 32px;
    }

    .timeline-marker {
        left: -32px;
    }

    .exp-card {
        padding: 24px;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .tech-tags {
        gap: 6px;
    }

    .tech-tag {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .code-body code {
        font-size: 0.72rem;
    }
}
