/* ===========================
   Modern Dark Theme — Resume
   =========================== */

:root {
    --bg: #0b0f14;
    --bg-elev: #121821;
    --bg-elev-2: #18202b;
    --border: #1f2937;
    --border-soft: #243043;
    --text: #e6edf3;
    --muted: #9aa7b4;
    --accent: #4dd0c1;      /* teal */
    --accent-2: #7c9cff;    /* indigo */
    --accent-3: #f6c177;    /* warm */
    --danger: #ff6b6b;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.page {
    max-width: 60%;
    margin: 0 auto;
    padding: 56px 24px 120px;
    position: relative;
    z-index: 1;
    transition: margin-left 0.3s ease, max-width 0.3s ease;
}
body.chat-open .page {
    margin-left: 24px;
    margin-right: auto;
    max-width: calc(100vw - 720px);
}
body.chat-open .chat-panel {
    left: calc(100vw - 680px);
    right: 16px;
    top: 16px;
    bottom: 16px;
    width: auto;
    height: auto;
}

/* Background ambient orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}
.orb-1 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, #1e7c7c, transparent 60%);
    top: -120px; left: -120px;
}
.orb-2 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #2b3a8a, transparent 60%);
    bottom: -200px; right: -160px;
}

/* HERO */
.hero {
    padding: 32px 0 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 10px;
}
h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #9fd9d0 60%, #7c9cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tagline {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 800px;
    margin: 0 0 18px;
}
.contact {
    font-size: 0.95rem;
    color: var(--muted);
}
.contact a { font-weight: 500; }
.contact .sep { margin: 0 10px; opacity: 0.5; }

/* SECTION HEADINGS */
h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
h3 { font-size: 1.1rem; font-weight: 600; margin: 0; }
h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 0 0 8px;
}

.section-head { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 6px; }
.section-head .muted { margin: 0; max-width: 680px; }

/* CARD */
.card,
.profile-card,
.profiles {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.two-col .card { margin-bottom: 0; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

/* PROFILE CHIPS */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.chip {
    background: var(--bg-elev-2);
    border: 1px solid var(--border-soft);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}
.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.chip[aria-selected="true"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0a0f14;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(77, 208, 193, 0.25);
}

.profile-card {
    padding: 0;
    overflow: hidden;
    background: var(--bg-elev-2);
    border-color: var(--border-soft);
}
.profile-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(77,208,193,0.08), rgba(124,156,255,0.06));
    border-bottom: 1px solid var(--border);
}
.profile-card-head h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 4px 0 6px;
}
.profile-actions { display: flex; gap: 10px; flex-shrink: 0; }
.profile-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 1fr;
    gap: 28px;
    padding: 24px 28px;
}
@media (max-width: 820px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-card-head { flex-direction: column; }
}
.profile-grid ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}
.profile-grid li { margin-bottom: 6px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    background: rgba(124,156,255,0.1);
    border: 1px solid rgba(124,156,255,0.3);
    color: #c9d6ff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
}

/* BUTTONS */
.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border-soft);
    background: var(--bg-elev);
    color: var(--text);
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}
.button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0a0f14;
    border-color: transparent;
}
.button.primary:hover {
    color: #0a0f14;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(77,208,193,0.3);
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 18px;
}
.skills-grid p { margin: 0; color: var(--muted); }

/* EXPERIENCE */
.job {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.job:last-child { border-bottom: none; padding-bottom: 0; }
.job:first-of-type { padding-top: 6px; }

.job-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.jobtitle { color: var(--accent); font-weight: 600; }
.company { color: var(--accent-3); font-weight: 600; }
.dates {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted);
}
.job ul { margin: 8px 0 0; padding-left: 20px; color: var(--text); }
.job li { margin-bottom: 6px; }

/* APPS */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.app-tile {
    display: block;
    padding: 16px 18px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: all 0.18s ease;
}
.app-tile:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    color: var(--text);
}
.app-tile h4 { color: var(--accent); margin-bottom: 4px; text-transform: none; letter-spacing: 0; font-size: 1rem; }
.app-tile p { margin: 0; color: var(--muted); font-size: 0.88rem; }

footer {
    text-align: center;
    margin-top: 40px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ===========================
   CHATBOT
   =========================== */
.chat-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0a0f14;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(77,208,193,0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(77,208,193,0.45); }
.chat-toggle svg { display: block; }

.chat-panel[hidden] { display: none !important; }
.chat-panel {
    position: fixed;
    right: 24px;
    bottom: 400px;
    z-index: 1;
    width: min(500px, calc(100vw - 32px));
    height: min(55vh, calc(100vh - 32px));
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatIn 0.22s ease-out;
}
@keyframes chatIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-resize-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    z-index: 10;
}
.chat-resize-handle.nw { top: 0;    left: 0;   cursor: nw-resize; }
.chat-resize-handle.ne { top: 0;    right: 0;  cursor: ne-resize; }
.chat-resize-handle.sw { bottom: 0; left: 0;   cursor: sw-resize; }
.chat-resize-handle.se { bottom: 0; right: 0;  cursor: se-resize; }
.chat-resize-handle::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    opacity: 0.35;
    transition: opacity 0.15s;
}
.chat-resize-handle.nw::after { top: 4px;    left: 4px;   border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.chat-resize-handle.ne::after { top: 4px;    right: 4px;  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.chat-resize-handle.sw::after { bottom: 4px; left: 4px;   border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.chat-resize-handle.se::after { bottom: 4px; right: 4px;  border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.chat-resize-handle:hover::after { opacity: 1; }

.chat-header {
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(77,208,193,0.12), rgba(124,156,255,0.08));
    border-bottom: 1px solid var(--border);
}
.chat-header h3 { font-size: 1rem; margin: 0; }
.chat-header p { margin: 2px 0 0; }
.icon-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
}
.icon-btn:hover { color: var(--text); }

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.92rem;
}
.chat-msg {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 90%;
    word-wrap: break-word;
    line-height: 1.55;
}
.chat-msg.user { white-space: pre-wrap; }
.chat-msg.bot p { margin: 0 0 8px; }
.chat-msg.bot p:last-child { margin-bottom: 0; }
.chat-msg.bot ul, .chat-msg.bot ol { margin: 4px 0 8px 18px; padding: 0; }
.chat-msg.bot li { margin-bottom: 3px; }
.chat-msg.bot strong { color: var(--accent); font-weight: 600; }
.chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0a0f14;
    border-bottom-right-radius: 4px;
}
.chat-msg.bot {
    align-self: flex-start;
    background: var(--bg-elev-2);
    border: 1px solid var(--border-soft);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.chat-msg.bot.error { border-color: rgba(255,107,107,0.5); color: #ffd6d6; }

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 10px;
}
.chat-suggestions button {
    font-family: inherit;
    font-size: 0.78rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border-soft);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.chat-suggestions button:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.hero-upload-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px dashed rgba(77,208,193,0.55);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    white-space: nowrap;
}
.hero-upload-cta:hover {
    background: rgba(77,208,193,0.1);
    border-color: var(--accent);
}
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin: 0 12px 0;
    background: rgba(77,208,193,0.12);
    border: 1px solid rgba(77,208,193,0.35);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--accent);
}
.jd-chip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jd-chip button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; opacity: 0.7; }
.jd-chip button:hover { opacity: 1; }

.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px;
    color: var(--muted);
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.upload-btn:hover { color: var(--accent); background: rgba(77,208,193,0.08); }

.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-elev-2);
}
.chat-input input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.15s ease;
}
.chat-input input:focus { border-color: var(--accent); }
.chat-input button {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0a0f14;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.chat-input button:hover { filter: brightness(1.08); }
.chat-input button:disabled { opacity: 0.5; cursor: not-allowed; }

.typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.typing span {
    width: 6px; height: 6px;
    background: var(--muted);
    border-radius: 50%;
    animation: blink 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}
