* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background-color: #0a0a0a;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;  /* Changed from hidden to auto */
    scrollbar-width: thin;
    scrollbar-color: #111 #0a0a0a;
}

header {
    position: fixed;
    width: 100%;
    top: 20px;
    z-index: 20;  /* Increased to be higher than chat container */
}

.nav-container {
    background-color: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    width: 600px;
    margin: 0 auto;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #333;
    height: 48px;
    z-index: 20;  /* Increased to be higher than chat container */
}

.logo-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo {
    font-size: 1rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title {
    font-size: 0.8rem;
    color: #888;
    font-weight: 300;
}

.location {
    font-size: 0.8rem;
    color: #666;
    font-weight: 300;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 24px;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: #888;
}

.nav-links a.active {
    color: #007AFF;  /* Apple blue */
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;  /* Add smooth transition */
}

.center-text h1 {
    font-size: 2.5rem;
    font-weight: 300 !important;  /* Force light weight */
    color: #444;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    letter-spacing: -0.5px;
}

footer {
    padding: 20px;
    margin-bottom: 20px;  /* Back to original */
    background: none;
}

.chat-container {
    width: 600px;
    margin: 0 auto;
    position: relative;
    background: none;  /* Remove any background */
    z-index: 10;  /* Higher than header to be in front */
}

.chat-messages {
    position: fixed;
    bottom: 108px;    /* Back to original */
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-height: calc(100vh - 108px);  /* Back to original */
    overflow-y: auto;
    padding-top: 0;
    padding-right: 0;
    padding-left: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
    transition: bottom 0.2s;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.chat-messages::-webkit-scrollbar {
    display: none;
}

/* Remove the old scrollbar styles */
.chat-messages::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-thumb {
    display: none;
}

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

.message {
    padding: 12px 24px;
    margin: 8px 0;
    border: 1px solid #333;
    background-color: #0a0a0a;
    z-index: 1;
    display: inline-block;
    max-width: 80%;
    min-width: 60px;
    border-radius: 24px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    animation: messageAppear 0.3s ease forwards;
}

/* Add extra margin only to the last message */
.message:last-child {
    margin-bottom: 40px;  /* Increased space between last message and input bar */
}

/* Apply different border radius for messages that wrap to multiple lines */
.message:not(:empty) {
    border-radius: 18px; /* Slightly smaller radius for multi-line messages */
}

/* Specific styles for single-line messages (approximately 24px height) */
.message:not(:empty):not(:has(*)):not([style*="height:"]):not([style*="min-height:"]) {
    border-radius: 24px; /* Keep full round for single line */
}

.user-message {
    float: right;
    clear: both;
    margin-right: 0;
}

.ai-message {
    float: left;
    clear: both;
    margin-left: 0;
    background-color: #111;
}

#chat-input {
    width: 100%;
    padding: 12px 50px 12px 24px;
    border: 1px solid #333;
    background-color: #0a0a0a;
    color: white;
    font-size: 0.9rem;
    height: auto;
    min-height: 48px !important;
    max-height: 120px;
    resize: none;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: height 0.2s ease !important;
    border-radius: 24px;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 40px rgba(0, 122, 255, 0.3);  /* Increased size and opacity further */
}

/* Change border radius when content is more than one line */
#chat-input[style*="height"] {
    border-radius: 18px;
}

#chat-input:focus {
    outline: none;
    border-color: #007AFF;  /* Apple blue */
    box-shadow: 0 0 50px rgba(0, 122, 255, 0.4),  /* Increased outer glow further */
                0 0 25px rgba(0, 122, 255, 0.3);   /* Increased inner glow further */
}

#send-button {
    position: absolute;
    right: 8px;  /* Move 4px left */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    z-index: 11;  /* Higher than input to be clickable */
}

#send-button:hover {
    color: #888;
}

/* Clear floats */
.chat-messages::after {
    content: "";
    display: table;
    clear: both;
}

/* Add padding to first message to prevent it from hiding behind the nav */
.message:first-child {
    margin-top: 80px;
}

.dynamic-text {
    color: #444;
    font-weight: 300 !important;  /* Force light weight */
}

.cursor {
    color: #444;
    animation: blink 1s infinite;
    font-weight: 300;
}

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

.center-text {
    transition: opacity 0.3s ease;
}

.fade-out {
    opacity: 0;
}

.tech-stack {
    position: fixed;
    bottom: 15px;  /* Increased from 10px to move it higher */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-evenly;
    width: 350px;
    z-index: 12;  /* Added z-index higher than input bar (10) and send button (11) */
}

.tech-item {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 4px;
    width: 16px;
    position: relative;  /* Added to contain hover area */
}

.tech-item img {
    width: 16px;
    height: 16px;
    filter: grayscale(100%) brightness(0.7);
    transition: filter 0.2s ease;
    object-fit: contain;
}

/* Add specific size for Docker icon */
.tech-item img[alt="Docker"] {
    width: 20px;  /* Slightly larger */
    height: 20px;
}

.tech-item:hover img {
    filter: grayscale(0%) brightness(1);
}

.tech-name {
    color: #fff;
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.2s ease;
    position: absolute;
    bottom: 30px;
    left: 50%;  /* Added for centering */
    transform: translateX(-50%);  /* Added for centering */
    background-color: #0a0a0a;
    padding: 4px 8px;
    border-radius: 12px;
    white-space: nowrap;
    border: 1px solid #333;
    pointer-events: none;  /* Added to prevent hover on label */
}

.tech-item:hover .tech-name {
    opacity: 1;
    transform: translate(-50%, -2px);  /* Keep X centering while moving up */
}

/* Page-specific styles */
.projects-content, .cv-content, .contact-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px;
    color: #fff;
}

.projects-content h1, .cv-content h1, .contact-content h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 40px;
    color: #444;
}

/* Projects page */
.projects-content {
    width: 600px;  /* Match nav width */
    margin: 0 auto;
    padding: 100px 24px;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.project-card {
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid #333;
    padding: 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: #007AFF;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
}

.project-card h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 12px;
}

.project-description {
    color: #444;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 16px;
    line-height: 1.4;
}

.project-tech {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.project-tech span {
    color: #666;
    font-size: 0.9rem;
    padding: 4px 8px;
    border: 1px solid #333;
    border-radius: 12px;
    background: #0a0a0a;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.project-links a:hover {
    color: #007AFF;
}

/* CV Page Styles */
.cv-content {
    width: 600px;
    margin: 0 auto;
    padding: 100px 24px 100px;  /* Added more bottom padding */
    position: relative;
}

.download-cv {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;  /* Center the icon */
    padding: 12px;  /* Equal padding for circular shape */
    border: 1px solid #333;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    height: 48px;
    width: 48px;  /* Make it square */
    z-index: 20;
}

.download-cv:hover {
    border-color: #007AFF;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
}

.cv-header {
    margin-bottom: 60px;
    text-align: left;
}

.cv-header h1, .cv-section h3 {
    font-size: 1.5rem;
    font-weight: 300;
    color: #fff;  /* Changed to white */
    margin-bottom: 8px;
}

.cv-header h2, .cv-section p {
    font-size: 1.5rem;
    font-weight: 300;
    color: #444;  /* Keep grey */
    margin-bottom: 24px;
}

.cv-section {
    margin-bottom: 40px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
}

.cv-section h3 {
    font-size: 1.5rem;
    font-weight: 300;
    color: #fff;  /* Changed to white */
    margin-bottom: 16px;
}

.cv-section p {
    font-size: 1.5rem;
    font-weight: 300;
    color: #444;  /* Keep grey */
    margin-bottom: 24px;
}

.cv-social-links {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.cv-social-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cv-social-links a:hover {
    color: #fff;
}

/* Contact page */
.contact-info {
    background: #111;
    border: 1px solid #333;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.contact-content {
    text-align: center;
}

.contact-content h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: #444;
}

.contact-content h3 {
    color: #666;          /* Match CV page grey color */
    font-size: 1.5rem;   /* Match CV page font size */
    font-weight: 300;     /* Match CV page font weight */
    margin-bottom: 24px;  /* Match CV page spacing */
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.social-links img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

/* Make GitHub icon white */
.social-links img[alt="GitHub"] {
    filter: invert(1);
}

/* Hover effects with glows */
.social-links a:hover img {
    opacity: 1;
}

.social-links a:hover img[alt="LinkedIn"] {
    filter: drop-shadow(0 0 8px #0077b5);  /* LinkedIn blue glow */
}

.social-links a:hover img[alt="GitHub"] {
    filter: invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));  /* White glow */
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
}

.contact-type {
    color: #444;  /* Changed from white to grey */
    font-size: 1.5rem;
    font-weight: 300;
    width: 120px;
}

.contact-item a {
    color: #fff;  /* Changed from grey to white */
    font-size: 1.5rem;
    font-weight: 300;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-item a:hover {
    color: #007AFF;  /* Changed to blue on hover instead of white */
}

.timeline-item {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
}

.timeline-date {
    color: #444;
    font-size: 1.5rem;
    font-weight: 300;
    min-width: 120px;  /* Fixed width for alignment */
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 8px;
}

.timeline-content p {
    color: #444;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0;  /* Override previous margin */
    line-height: 1.4;
}

/* Scrollbar styling */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-left: 1px solid #333;
}

body::-webkit-scrollbar-thumb {
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #222;
}

/* Firefox scrollbar */
body {
    scrollbar-width: thin;
    scrollbar-color: #111 #0a0a0a;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Navigation adjustments */
    header {
        top: 10px;  /* Moved closer to top on mobile */
    }

    .nav-container {
        width: 90%;
        padding: 12px 20px;
        height: 56px;  /* Increased from 40px */
        border-radius: 28px;  /* Adjusted for taller height */
    }

    .nav-links {
        gap: 12px;  /* Reduced gap between links */
    }

    .nav-links a {
        font-size: 0.8rem;
        margin-left: 0;  /* Remove left margin */
    }

    .logo {
        font-size: 1.2rem;  /* Increased name size */
    }

    .title {
        font-size: 0.9rem;  /* Increased description size */
        display: block !important;  /* Force visibility */
        color: #666;  /* Better contrast */
    }

    /* Chat Container */
    .chat-container {
        width: 100%;
        padding: 0 16px;
    }

    .chat-messages {
        width: 100%;
        left: 0;
        transform: none;
        padding: 0 16px 0 20px;  /* Add left padding to match input */
        bottom: calc(100px + env(safe-area-inset-bottom));
        padding-bottom: 80px;  /* Add space for input */
    }

    .message {
        max-width: calc(100% - 40px);  /* Never wider than input bar */
        min-width: fit-content;        /* Shrink to content */
        width: auto;                   /* Natural width */
        padding: 12px 20px;
        margin-left: 20px;
        margin-right: 20px;
        display: inline-block;
    }

    .user-message {
        margin-right: 20px;  /* Match input bar padding */
        margin-left: auto;  /* Keep right-aligned */
        max-width: calc(100% - 40px);  /* Same as AI messages */
    }

    .ai-message {
        margin-left: 20px;  /* Consistent left margin */
        margin-right: 20px;  /* Add matching right margin */
        max-width: calc(100% - 40px);  /* Account for both margins */
    }

    /* Ensure messages never exceed input bar width */
    .message {
        max-width: calc(100% - 40px);  /* Match input bar width */
    }

    #chat-input {
        position: fixed;
        bottom: max(45px, env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        margin: 0;
        font-size: 16px;  /* Prevent iOS zoom */
        padding: 12px 40px 12px 20px;
        border-radius: 24px !important;
        padding-right: 50px;  /* Maintain space for button */
    }

    /* First message spacing */
    .message:first-child {
        margin-top: 100px;  /* Original spacing */
        margin-top: calc(100px + env(safe-area-inset-top));  /* Add safe area */
    }

    /* Tech Stack */
    .tech-stack {
        width: 90%;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 16px;
        bottom: 0px;  /* Original position */
        bottom: env(safe-area-inset-bottom);  /* Account for iPhone home indicator */
    }

    /* Projects Grid */
    .projects-content {
        width: 90%;
        padding: 80px 16px;
    }

    /* CV Content */
    .cv-content {
        width: 90%;
        padding: 80px 16px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 8px;
    }

    .timeline-date {
        min-width: auto;
    }

    /* Contact Page */
    .contact-content {
        width: 90%;
        padding: 80px 16px;
    }

    /* Center Text */
    .center-text h1 {
        font-size: 2rem;
    }

    .download-cv {
        position: fixed;
        top: auto !important;  /* Override desktop positioning */
        bottom: 20px;
        right: 20px;
        z-index: 20;
        background: rgba(10, 10, 10, 0.6);
        padding: 12px;
        border-radius: 50%;
        backdrop-filter: blur(10px);
        border: 1px solid #333;
    }

    .nav-links-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.95);  /* Match site background with 95% opacity */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 20;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #send-button {
        position: fixed;
        right: calc(16px + env(safe-area-inset-right));  /* Align with input padding */
        bottom: max(28px, calc(20px + env(safe-area-inset-bottom)));  /* Match input position */
        transform: translateY(40%);
        z-index: 13;  /* Higher than input bar */
    }
}

@media (max-width: 480px) {
    /* Even smaller screens */
    .nav-container {
        padding: 8px 12px;
    }

    .nav-links {
        gap: 8px;  /* Even smaller gap */
    }

    .nav-links a {
        font-size: 0.7rem;  /* Smaller text */
    }

    .logo {
        font-size: 1rem;  /* Maintain readable size */
    }

    .title {
        font-size: 0.8rem;  /* Maintain readable size */
        display: block !important;  /* Ensure visibility */
    }

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

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 30;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Mobile styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    /* Mobile menu container */
    .nav-links-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.95);  /* Match site background with 95% opacity */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 20;
        display: flex;
        justify-content: center;  /* Center horizontally */
        align-items: center;  /* Center vertically */
    }

    /* Show menu when active */
    .nav-links-container.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile menu links */
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;  /* Center items */
        gap: 40px;  /* Space between items */
    }

    .nav-links a {
        font-size: 2rem;  /* Larger font */
        color: #fff;
        text-decoration: none;
        transition: color 0.3s ease;
        opacity: 0;  /* Start invisible */
        transform: translateY(20px);  /* Slide in effect */
    }

    .nav-links a:hover {
        color: #007AFF;  /* Hover color */
    }

    .nav-links a.active {
        color: #007AFF;  /* Active link color */
    }

    /* Staggered animation for menu items */
    .nav-links a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links a:nth-child(2) { transition-delay: 0.2s; }
    .nav-links a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links a:nth-child(4) { transition-delay: 0.4s; }

    .nav-links-container.active .nav-links a {
        opacity: 1;  /* Fade in */
        transform: translateY(0);  /* Slide in */
    }

    /* Hamburger animation */
    .hamburger.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

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

    .hamburger.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Prevent scrolling when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Contact page email styling */
.contact-content h3 {
    color: #666;
    font-size: 1.5rem;  /* Match CV page font size */
    font-weight: 300;  /* Match CV page font weight */
    margin-bottom: 24px;  /* Match CV page spacing */
}

input, textarea {
    font-size: 16px;  /* Prevent iOS zoom */
}

/* Add typing animation */
@keyframes dot-pulse {
    0%, 20% { opacity: 0.2; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0.2; }
}

.ai-typing {
    display: inline-block;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    opacity: 1 !important;
    animation: messageAppear 0.3s ease forwards;
    padding: 16px 32px;  /* Increased from 12px 24px */
    min-width: 80px;      /* Increased from 60px */
}

.ai-typing span {
    animation: dot-pulse 1.4s infinite;
    margin: 0 4px;
    font-size: 1.2rem;
}

.ai-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Link styling */
.chat-link {
    color: #007AFF !important;  /* Theme blue */
    text-decoration: none;
    border-bottom: 1px solid #007AFF;
    transition: all 0.2s ease;
}

.chat-link:hover {
    color: #0051a3 !important;
    border-bottom-color: #0051a3;
}

/* For AI messages */
.ai-message .chat-link {
    color: #007AFF !important;
    border-bottom-color: #007AFF;
}

.ai-message .chat-link:hover {
    color: #0051a3 !important;
    border-bottom-color: #0051a3;
} 
