:root {
    --bg-color: #050505;
    --surface-color: #111111;
    --surface-hover: #1a1a1a;
    --primary-accent: #FF5500;
    --secondary-accent: #FF8800;
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --border-color: #222222;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

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

ul {
    list-style: none;
}

/* Typography */
h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 3vw, 3.5rem);
    margin-bottom: 1rem;
}

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

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

/* Header / Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.nav-logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-accent);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 85, 0, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    filter: blur(50px);
    animation: pulseGlow 8s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.hero-title .text-accent {
    background: linear-gradient(to right, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

/* Typing Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--primary-accent);
    animation: blink 1s step-end infinite;
    margin-left: 3px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary-accent);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 85, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 85, 0, 0.5);
    background: var(--secondary-accent);
}

.btn-outline {
    border-color: var(--border-color);
    background: transparent;
    color: var(--text-primary);
    margin-left: 1rem;
}

.btn-outline:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform var(--transition-speed);
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.project-card {
    background: var(--surface-color);
    border-radius: 20px;
    /* overflow: hidden; Removed to allow gradient border */
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
    group: project-card;
}

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

.project-media {
    height: 250px;
    overflow: hidden;
    position: relative;
    border-radius: 20px 20px 0 0;
    /* Added to maintain rounded corners */
}

.project-media img,
.project-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-media img,
.project-card:hover .project-media video {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.skill-category {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    color: var(--primary-accent);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: rgba(255, 85, 0, 0.1);
    color: var(--primary-accent);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Experience Section */
/* Experience Section - Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary-accent), transparent);
    box-shadow: 0 0 10px var(--primary-accent);
}

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

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 25px;
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border: 2px solid var(--primary-accent);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px var(--primary-accent);
}

.circuit-connector {
    position: absolute;
    left: 20px;
    top: 35px;
    width: 40px;
    height: 2px;
    background: var(--primary-accent);
    z-index: 1;
}

.data-block {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-accent);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 85, 0, 0.1);
}

/* Tech corners for data block */
.data-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--primary-accent);
    border-left: 2px solid var(--primary-accent);
}

.data-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary-accent);
    border-right: 2px solid var(--primary-accent);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.job-title {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.company {
    color: var(--primary-accent);
    font-weight: 600;
}

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

.achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.achievements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-accent);
}

/* Contact Section */
#warp-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    border-radius: 20px;
    opacity: 0.6;
}

.contact-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-visual {
    position: relative;
    padding: 4rem;
    overflow: hidden;
    z-index: 1;
}

.contact-content {
    position: relative;
    z-index: 2;
}

.holographic-interface {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-accent);
    box-shadow: 0 0 20px rgba(255, 85, 0, 0.2), inset 0 0 20px rgba(255, 85, 0, 0.1);
    border-radius: 16px;
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255, 85, 0, 0.3);
    opacity: 0.5;
    animation: scan 3s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

.terminal-input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-bottom: 1px solid var(--primary-accent);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.terminal-input:focus {
    outline: none;
    background: rgba(255, 85, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 85, 0, 0.2);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.contact-link:hover {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    transform: translateY(-5px);
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Responsive Design */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {

    /* Mobile Menu */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(17, 17, 17, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    p {
        font-size: 1rem;
    }

    /* Layout */
    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 4rem 0;
    }

    /* Hero Section */
    .hero {
        min-height: 90vh;
        padding: 6rem 0 2rem;
        /* Increased top padding to account for fixed navbar */
        padding-top: 100px;
        /* Extra space for navbar + profile image */
    }

    .hero-content {
        padding: 0 1rem;
        margin-top: 2rem;
        /* Additional top margin for safety */
    }

    .profile-image-container {
        margin-top: 1rem;
        /* Extra spacing from top */
    }

    .profile-image-container img {
        width: 120px !important;
        height: 120px !important;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

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

    .btn-outline {
        margin-left: 0;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    /* Timeline */
    .timeline {
        padding: 1rem 0;
    }

    .timeline-line {
        left: 10px;
    }

    .timeline-dot {
        left: 1px;
        width: 18px;
        height: 18px;
    }

    .circuit-connector {
        left: 10px;
        width: 30px;
    }

    .timeline-item {
        padding-left: 50px;
        margin-bottom: 3rem;
    }

    .data-block {
        padding: 1.5rem;
    }

    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .job-title {
        font-size: 1.25rem;
    }

    .achievements li {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-media {
        height: 200px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.25rem;
    }

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    /* Contact Section */
    .contact-visual {
        padding: 2rem 1rem;
    }

    .holographic-interface {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    .terminal-input {
        font-size: 0.9rem;
    }

    .contact-links {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .contact-link {
        width: 45px;
        height: 45px;
    }

    /* Footer */
    footer {
        padding: 2rem 0;
        margin-top: 3rem;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-item {
        padding-left: 70px;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }
}

/* AI Chat Widget Responsive */
@media (max-width: 768px) {
    .ai-chat-widget {
        bottom: 20px;
        left: 50%;
        /* Center horizontally */
        right: auto;
        /* Remove right positioning */
        transform: translateX(-50%);
        /* Center the widget */
    }

    .ai-spin-ball-container {
        width: 80px;
        height: 80px;
    }

    .unicorn-embed-wrapper {
        width: 320px !important;
        height: 320px !important;
    }

    .ai-spin-ball-container::before {
        width: 100px;
        height: 100px;
    }

    .ai-spin-ball-container::after {
        width: 110px;
        height: 110px;
    }

    .ai-tooltip {
        top: -50px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .ai-chat-window {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 70vh;
        max-height: 500px;
        border-radius: 16px 16px 0 0;
    }

    .ai-chat-window.active {
        bottom: 0;
    }
}

/* Large Desktop Optimization */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    h1 {
        font-size: 5.5rem;
    }

    h2 {
        font-size: 4rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Utility Classes */
.text-accent {
    color: var(--primary-accent);
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Scroll Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Interactive Grid Pattern */
.hero-background-container {
    position: fixed;
    /* Changed to fixed for full site coverage */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.interactive-grid {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            black,
            transparent);
    -webkit-mask-image: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            black,
            transparent);
    opacity: 0.7;
}

/* Project Card Background Gradient Animation */
.project-card {
    position: relative;
    z-index: 1;
    background: transparent;
    /* Use ::after for background */
    border-radius: 20px;
    /* Border removed, gradient acts as border */
    transition: transform var(--transition-speed) ease;

}

/* Gradient Border/Glow */
.project-card::before {
    content: "";
    position: absolute;
    inset: -4px;
    /* Increased from -2px to make border bigger */
    z-index: -2;
    background: linear-gradient(45deg,
            #FF5500,
            /* Primary Orange */
            #000000,
            /* Black */
            #FFFFFF,
            /* White */
            #FF8800,
            /* Secondary Orange */
            #000000
            /* Black */
        );
    background-size: 300% 300%;
    border-radius: 24px;
    /* Increased radius to match bigger border */
    animation: gradient-rotate 4s ease infinite;
    opacity: 0.6;
    /* Subtle by default */
    transition: opacity 0.3s ease;
}

/* Card Background */
.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--surface-color);
    border-radius: 20px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-card:hover::before {
    opacity: 1;
    /* Brighter on hover */
}

@keyframes gradient-rotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}