:root {
    --bg-color: #0b0b0b;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #ff4d4d;
    /* Reddish accent from sample */
    --accent-glow: rgba(255, 77, 77, 0.4);
    --green-matrix: #0f0;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--card-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Matrix Background */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    /* Subtle background */
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(11, 11, 11, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.nav-links li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links li a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--accent-glow);
}

.btn-contact {
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.btn-contact:hover {
    background: var(--accent-color);
    color: #fff !important;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    padding-top: 80px;
    /* Offset fixed header */
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    position: relative;
}

.hero h1.glitch {
    position: relative;
}

.terminal-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.prompt {
    margin-right: 10px;
    color: #666;
}

.cursor {
    display: inline-block;
    width: 10px;
    background: var(--accent-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 450px;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-icon {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 0.8rem;
    font-size: 1.2rem;
}

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

/* Profile Card Profile Pic */
.hero-visual {
    position: relative;
}

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 20px;
    width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s ease;
}

.profile-card:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

.card-image-wrapper {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s;
}

.profile-card:hover .profile-img {
    filter: grayscale(0%);
}

.card-info h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.card-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.status-badge {
    background: rgba(0, 255, 0, 0.1);
    color: #4dff4d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #4dff4d;
    border-radius: 50%;
    box-shadow: 0 0 5px #4dff4d;
}

/* Sections */
.section {
    padding: 5rem 10%;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .accent {
    color: var(--accent-color);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    max-width: 200px;
}

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

.skill-category {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    transition: 0.3s;
}

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

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

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

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

.tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tags span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 77, 77, 0.2), rgba(255, 77, 77, 0.5));
    transition: width 0.5s ease-out;
    z-index: -1;
    border-radius: 4px;
}

.tags span.active {
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.2);
}

.tags span.active::before {
    width: var(--range-width, 0%);
}

.tags span::after {
    content: attr(data-range);
    margin-left: 8px;
    font-size: 0.8em;
    opacity: 0;
    display: inline-block;
    width: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tags span.active::after {
    opacity: 1;
    width: auto;
    color: var(--accent-color);
}

.tags span:hover {
    border-color: var(--accent-color);
    color: white;
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

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

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

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

.project-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: 0.2s;
}

.project-links a:hover {
    color: white;
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-color);
}

/* Education Timeline */
.timeline {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px;
    padding-left: 30px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

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

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

/* Contact / Footer */
footer {
    text-align: center;
    padding: 5rem 2rem;
    background: radial-gradient(circle at center, rgba(30, 30, 30, 1) 0%, rgba(11, 11, 11, 1) 70%);
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.footer-content>p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.contact-item:hover {
    color: var(--accent-color);
}

.copyright {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #555;
    margin-top: 2rem;
}

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

/* Contact Form Section */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    /* Dark card background */
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border */
    /* Add subtle shadow/glow if needed, but keeping it clean for now */
}

.contact-form-header {
    margin-bottom: 2rem;
}

.contact-form-header h2 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.contact-form-header h2 .accent {
    color: var(--accent-color);
}

.contact-form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
}

.user-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter than card bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

.user-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.user-input::placeholder {
    color: #666;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    /* Or white/grey? Image shows colored icon or white icon inside green box? hard to tell details, keeping simple accent color */
    pointer-events: none;
}

textarea.user-input {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
    font-family: var(--font-heading);
}

.btn-submit:hover {
    background: #ff3333;
    /* Slightly brighter on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

/* Media Queries */
@media (max-width: 968px) {
    .hero {
        flex-direction: column-reverse;
        /* Profile on top on mobile? Or bottom. Column-reverse puts profile on top in HTML order if it was second, wait. flex-direction: column aligns top-to-bottom. If visually I want text then image, and HTML is text then image... on mobile usually image first is nice, or text first. Let's stick to text then image. */
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
        gap: 4rem;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .terminal-text {
        justify-content: center;
    }

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

    .nav-links {
        display: none;
        /* simple hide for now, would need JS toggle */
    }

    .hamburger {
        display: block;
    }
}

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

    .profile-card {
        width: 100%;
        max-width: 300px;
    }
}