/* ===== CSS Variables ===== */
:root {
    --color-bg: #fafafa;
    --color-bg-alt: #ffffff;
    --color-text: #2d3748;
    --color-text-muted: #64748b;
    --color-accent: #0f766e;
    --color-accent-light: #14b8a6;
    --color-border: #e2e8f0;
    
    --font-heading: 'DM Serif Display', Georgia, serif;
    --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ===== Typography ===== */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-light);
}

/* ===== Layout ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-accent);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-brand,
.nav-social {
    flex: 1;
}

.nav-social {
    justify-content: flex-end;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-accent);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.nav-brand:hover {
    color: var(--color-accent-light);
}

.nowrap {
    white-space: nowrap;
}

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

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

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

.nav-social {
    display: flex;
    gap: 1rem;
}

.nav-social a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

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

/* ===== Hero Section ===== */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f0fdfa 0%, var(--color-bg) 100%);
    padding: 6rem 2rem 3rem;
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
}

.hero-chat-box {
    background: white;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.hero-chat-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 1rem;
    text-align: center;
}

.hero-chat-input {
    display: flex;
    gap: 0.5rem;
}

.hero-chat-input input {
    flex: 1;
    padding: 0.7rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
    width: 100%;
}

.hero-chat-input input:focus {
    border-color: var(--color-accent);
}

.hero-chat-input .btn {
    padding: 0.7rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.hero-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-accent);
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.2);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.hero-title {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    border-radius: 4px;
}

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

.btn-primary:hover {
    background: var(--color-accent-light);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

/* ===== About Section ===== */
.about {
    background: var(--color-bg-alt);
}

.about-content .lead {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.about-content p {
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.career-goals {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f7f4 100%);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 8px 8px 0;
}

.career-goals h3 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.career-goals ul {
    list-style: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.career-goals li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.25rem;
}

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

.about-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent);
}

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

/* ===== Experience Section ===== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    background: var(--color-bg-alt);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.timeline-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.timeline-header {
    margin-bottom: 0.75rem;
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 500;
}

.timeline-title {
    font-size: 1.1rem;
    margin: 0.25rem 0;
    color: var(--color-text);
}

.timeline-company {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.timeline-description {
    list-style: none;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.timeline-description li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}

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

.key-projects {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.project-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
}

.project-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: #f0fdfa;
    border: 1px solid var(--color-accent);
    border-radius: 20px;
    color: var(--color-accent);
}

/* ===== Skills Section ===== */
.skills {
    background: var(--color-bg-alt);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-category {
    padding: 1rem 1.25rem;
    background: var(--color-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.skill-category-title {
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body);
}

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

.skill-tag {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.skill-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ===== Education Section ===== */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.education-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-alt);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.education-year {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 500;
    white-space: nowrap;
    min-width: 100px;
}

.education-details h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.education-degree {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.education-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--color-bg-alt);
}

.contact-intro {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

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

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    transition: all var(--transition);
    color: var(--color-text);
}

.contact-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.contact-value {
    font-size: 0.9rem;
    color: var(--color-text);
}

a.contact-card:hover .contact-value {
    color: var(--color-accent);
}

/* ===== Highlights Section ===== */
.highlights {
    background: var(--color-bg-alt);
}

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

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.highlight-icon {
    font-size: 1.5rem;
}

.highlight-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ===== Footer ===== */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

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

/* ===== Chatbot Modal ===== */
.chatbot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.chatbot-overlay.active {
    display: flex;
}

.chatbot-modal {
    width: 100%;
    max-width: 550px;
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

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

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0 0.5rem;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-header {
    padding: 16px;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: var(--font-body);
}

.chatbot-status {
    font-size: 0.85rem;
    opacity: 0.9;
}


.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message p {
    margin: 0;
}

.chat-message.bot {
    background: white;
    border: 1px solid var(--color-border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: var(--color-accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.loading {
    background: white;
    border: 1px solid var(--color-border);
    align-self: flex-start;
}

/* Typing cursor animation */
.typing-cursor {
    display: inline-block;
    animation: blink 0.7s infinite;
    color: var(--color-accent);
    font-weight: bold;
}

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

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.chatbot-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 8px;
}

#chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: var(--color-accent);
}

#chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#chatbot-send:hover {
    background: var(--color-accent-light);
}

#chatbot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Chatbot Modal */
@media (max-width: 600px) {
    .chatbot-modal {
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }
    
    .navbar {
        padding: 0.75rem 1rem;
        width: 100%;
    }
    
    .logo {
        font-size: 1rem;
        white-space: nowrap;
    }
    
    .nav-links {
        display: none;
    }
    
    .social-icons {
        flex-shrink: 0;
    }
    
    .social-icons a {
        font-size: 1rem;
        padding: 0.35rem;
    }
    
    .hero {
        padding: 4.5rem 1rem 2rem;
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content .subtitle {
        font-size: 1rem;
    }
    
    .hero-photo {
        width: 120px;
        height: 120px;
    }
    
    .hero-chat-box {
        padding: 1rem;
        max-width: 100%;
    }
    
    .hero-chat-title {
        font-size: 0.9rem;
    }
    
    .hero-chat-input {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-chat-input input {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .hero-chat-input .btn {
        width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .section {
        padding: 2rem 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .about-text {
        font-size: 0.95rem;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .experience-item {
        padding: 1.25rem;
    }
    
    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .experience-title {
        font-size: 1.1rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .education-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .education-year {
        min-width: auto;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Chatbot modal mobile */
    .chatbot-overlay {
        padding: 0;
        align-items: stretch;
    }
    
    .chatbot-overlay.active {
        padding: 0;
    }
    
    .chatbot-modal {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .chatbot-header {
        padding: 12px;
    }
    
    .chatbot-header h4 {
        font-size: 1rem;
    }
    
    .chatbot-avatar {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .chatbot-close {
        font-size: 28px;
    }
    
    .chatbot-input-container {
        padding: 0.75rem;
        gap: 8px;
    }
    
    #chatbot-input {
        padding: 0.75rem 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
        min-width: 0;
    }
    
    #chatbot-send {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .chatbot-messages {
        padding: 0.75rem;
    }
    
    .chat-message {
        max-width: 85%;
        font-size: 0.9rem;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-photo {
        width: 100px;
        height: 100px;
    }
    
    .logo {
        font-size: 0.95rem;
    }
    
    .experience-title {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

/* ===== Selection ===== */
::selection {
    background: var(--color-accent);
    color: white;
}

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

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

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

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

