/* ===========================
   Minimalist Modern Portfolio
   =========================== */

:root {
    --primary: #1a1a1a;
    --secondary: #4a4a4a;
    --accent: #0066cc;
    --light: #f8f9fa;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --spacing: 2rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--primary);
    background: var(--white);
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

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

.tagline {
    font-size: 1.125rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 0.875rem 2rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light);
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--white);
    border-color: var(--accent);
}

/* Sections */
section {
    padding: 5rem 0;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 600;
}

/* About Section */
#about {
    background: var(--light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.status-badge {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin-top: 2rem;
}

.status-badge strong {
    color: var(--primary);
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

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

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 1px var(--border);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.company {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

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

/* Projects Grid */
#projects {
    background: var(--light);
}

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

.project-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px var(--shadow);
}

.project-card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
}

.project-meta {
    color: var(--secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-card p {
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.project-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat {
    background: var(--light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}

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

.skill-category {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--secondary);
    border-bottom: 1px solid var(--border);
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Contact Section */
#contact {
    background: var(--light);
}

.contact-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.contact-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-item p {
    color: var(--secondary);
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

footer p {
    color: var(--light);
}

/* ========================
   AI Chat Section
   ======================== */
#ask {
    background: var(--white);
    padding: 5rem 0;
}

#ask h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.ask-intro {
    text-align: center;
    font-size: 1rem;
    color: var(--secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.chat-area {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

/* Starter cards (ChatGPT style) */
.chat-starters {
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding-bottom: 1.5rem;
}

.chat-starters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.starter-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--primary);
    transition: all 0.2s;
    line-height: 1.4;
    min-height: 80px;
}

.starter-card:hover {
    border-color: #bbb;
    background: var(--light);
}

.starter-icon {
    font-size: 1.25rem;
}

.starter-text {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* Chat thread */
.chat-thread {
    flex: 1;
    max-height: 420px;
    min-height: 200px;
    overflow-y: auto;
    padding: 1.5rem 0;
    scroll-behavior: smooth;
}

.chat-thread::-webkit-scrollbar { width: 5px; }
.chat-thread::-webkit-scrollbar-track { background: transparent; }
.chat-thread::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.msg {
    margin-bottom: 1.5rem;
    animation: msgIn 0.3s ease;
}

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

.msg-user {
    display: flex;
    justify-content: flex-end;
}

.msg-user .msg-content {
    background: var(--light);
    color: var(--primary);
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 80%;
    font-size: 0.95rem;
    line-height: 1.5;
}

.msg-assistant {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.msg-label {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.msg-assistant .msg-content {
    color: var(--primary);
    padding: 4px 0;
    max-width: 90%;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Typing dots */
.typing-dots {
    display: flex;
    gap: 5px;
    padding: 8px 0 !important;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    opacity: 0.3;
    animation: dotPulse 1.4s infinite;
}

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

@keyframes dotPulse {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Input bar */
.chat-input-bar {
    display: flex;
    padding: 0;
    gap: 0;
    position: relative;
    margin-top: 0.5rem;
}

#chatInput {
    flex: 1;
    padding: 14px 52px 14px 20px;
    border: 1px solid var(--border);
    border-radius: 26px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--light);
}

#chatInput:focus {
    border-color: #bbb;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
    background: var(--white);
}

#chatInput:disabled { opacity: 0.5; }

#chatSend {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

#chatSend:hover { background: #333; }
#chatSend:disabled { background: var(--border); cursor: default; }

/* Responsive Design */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.25rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    section {
        padding: 3rem 0;
    }

    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

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

    .chat-starters-grid {
        grid-template-columns: 1fr;
    }

    .chat-thread {
        max-height: 300px;
    }

    .chat-area {
        min-height: 380px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    nav .container {
        padding: 1rem;
    }

    .nav-links {
        font-size: 0.875rem;
    }

    #hero h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.125rem;
    }
}
