* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0a192f;
    color: #ccd6f6;
    line-height: 1.6;
    overflow-x: hidden;
}
#particles-js {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
}
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    z-index: 1000;
    transition: background 0.3s;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}
.navbar li {
    margin: 0 25px;
}
.navbar a {
    color: #64ffda;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
}
.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #64ffda;
    transition: width 0.3s;
}
.navbar a:hover::after {
    width: 100%;
}
.navbar a:hover {
    color: #fff;
}
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 30px;
}
.bar {
    width: 30px;
    height: 4px;
    background-color: #64ffda;
    margin: 4px 0;
    transition: 0.4s;
    border-radius: 2px;
}
.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
    background-color: #ccd6f6;
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-8px, -8px);
    background-color: #ccd6f6;
}
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-content {
    max-width: 800px;
    padding: 20px;
    z-index: 1;
}
.hero h1 {
    font-size: 4em;
    color: #64ffda;
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}
.hero .typed {
    font-size: 1.8em;
    color: #ccd6f6;
    min-height: 50px;
    display: inline-block;
    vertical-align: baseline;
    line-height: 1.2;
}
.hero .typed-cursor {
    display: inline-block;
    vertical-align: baseline;
    line-height: 1.2;
}
@keyframes glow {
    from { text-shadow: 0 0 10px #64ffda; }
    to { text-shadow: 0 0 20px #64ffda, 0 0 30px #64ffda; }
}
section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
h2 {
    font-size: 3em;
    color: #64ffda;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}
h2::before {
    content: '<';
    font-size: 1.2em;
    color: #8892b0;
    position: absolute;
    left: -40px;
}
h2::after {
    content: '/>';
    font-size: 1.2em;
    color: #8892b0;
    position: absolute;
    right: -40px;
}
/* Timeline */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #8892b0;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}
.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background-color: #64ffda;
    border: 4px solid #0a192f;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.left {
    left: 0;
}
.right {
    left: 50%;
}
.right::after {
    left: -13px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: #112240;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}
.timeline-content:hover {
    transform: scale(1.05);
}
.timeline-content h3 {
    color: #64ffda;
    margin-bottom: 10px;
}
.timeline-content p {
    color: #8892b0;
}
/* Skills Structured */
.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 50px;
}
.skills-category {
    background: #112240;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}
.skills-category:hover {
    transform: translateY(-10px);
}
.skills-category h3 {
    font-size: 1.8em;
    color: #64ffda;
    margin-bottom: 20px;
    text-align: center;
}
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.skill-item {
    background: #0a192f;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    width: 120px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 3px 10px rgba(100, 255, 218, 0.1);
}
.skill-item:hover {
    transform: rotateY(10deg) translateY(-5px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}
.skill-item i {
    font-size: 2.5em;
    margin-bottom: 10px;
}
.skill-item p {
    font-size: 0.9em;
}
/* Languages */
.languages-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.language-item {
    text-align: center;
}
.language-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 10px;
    transition: transform 0.5s, box-shadow 0.3s, filter 0.3s;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.1);
    position: relative;
    overflow: hidden;
}
.language-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(17, 34, 64, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}
.language-circle .language-text {
    position: relative;
    color: #ccd6f6;
    font-size: 1em;
    padding: 5px 10px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}
.language-item:hover .language-circle {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.3);
    filter: brightness(1.1);
}
.language-item:hover .language-circle::before {
    opacity: 1;
}
.language-item:hover .language-circle .language-text {
    opacity: 1;
}
.language-level {
    font-size: 1em;
    color: #64ffda;
}
/* Projects Grid with Search */
.projects-search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}
#project-search {
    width: 100%;
    padding: 15px;
    background: #112240;
    border: 1px solid #8892b0;
    color: #ccd6f6;
    border-radius: 50px;
    font-size: 1em;
    transition: box-shadow 0.3s, border-color 0.3s;
}
#project-search:focus {
    border-color: #64ffda;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
    outline: none;
}
#project-search::placeholder {
    color: #8892b0;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.project-card {
    background: #112240;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}
.project-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 10px 20px rgba(100, 255, 218, 0.2);
}
.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}
.project-card:hover .project-image {
    transform: scale(1.1);
}
.project-info {
    padding: 20px;
}
.project-title {
    font-size: 1.5em;
    color: #64ffda;
    margin-bottom: 10px;
}
.project-desc {
    font-size: 1em;
    color: #8892b0;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tech-tag {
    background: #0a192f;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    color: #64ffda;
    border: 1px solid #64ffda;
    transition: background 0.3s;
}
.tech-tag:hover {
    background: #64ffda;
    color: #0a192f;
}
.project-card.hidden {
    display: none;
}
.projects-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.projects-page-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.projects-page-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.projects-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.projects-page-info {
    color: var(--muted);
    font-weight: 600;
}
.projects-empty {
    text-align: center;
    color: var(--muted);
    padding: 30px 0;
}
/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.9);
    overflow: auto;
}
.modal-content {
    background: #112240;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
    animation: modalPop 0.5s;
}
@keyframes modalPop {
    from { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}
.close {
    color: #64ffda;
    float: right;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
}
.close:hover {
    color: #ccd6f6;
}
.modal h3 {
    color: #64ffda;
    margin-bottom: 15px;
}
.modal p {
    color: #ccd6f6;
    margin-bottom: 20px;
}
.modal a {
    background: #64ffda;
    color: #0a192f;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-right: 10px;
    transition: background 0.3s, transform 0.3s;
}
.modal a:hover {
    background: #ccd6f6;
    transform: scale(1.05);
}
/* Contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #112240;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: #0a192f;
    border: 1px solid #8892b0;
    color: #ccd6f6;
    border-radius: 5px;
    transition: border 0.3s, box-shadow 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.2);
}
.contact-form button {
    width: 100%;
    padding: 15px;
    background: #64ffda;
    color: #0a192f;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.contact-form button:hover {
    background: #ccd6f6;
    transform: scale(1.02);
}
.contact-form .status-message {
    text-align: center;
    margin-top: 10px;
    display: none;
}
.contact-form .success {
    color: #64ffda;
}
.contact-form .error {
    color: #ff4444;
}
footer {
    text-align: center;
    padding: 30px;
    background: #112240;
    color: #8892b0;
}
.success-message {
    text-align: center;
    margin-top: 20px;
    padding: 15px 25px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 10px;
    color: #64ffda;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.success-message.show {
    opacity: 1;
    transform: translateY(0);
}
.success-message.hide {
    opacity: 0;
    transform: translateY(20px);
}
/* Additional styles for navbar changes */
.navbar ul {
    align-items: center;
}
.nav-links-group {
    display: flex;
    gap: 0;
}
.external-links {
    margin-left: 40px;
    border-left: 2px solid #233554;
    padding-left: 30px;
}
/* Responsive Styles */
@media (max-width: 768px) {
    .nav-container {
        justify-content: flex-start;
        padding: 0 20px;
    }
    .hamburger {
        display: flex;
    }
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(10, 25, 47, 0.95);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
    }
    .navbar ul.active {
        display: flex;
        max-height: 600px;
        opacity: 1;
        transform: translateY(0);
        animation: slideIn 0.5s forwards;
    }
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    .navbar li {
        margin: 15px 0;
        text-align: center;
    }
    .nav-links-group {
        flex-direction: column;
    }
    .external-links {
        margin-left: 0;
        border-left: none;
        padding-left: 0;
        border-top: 2px solid #233554;
        padding-top: 15px;
        margin-top: 15px;
    }
    .hero h1 {
        font-size: 2.5em;
    }
    .hero .typed {
        font-size: 1.2em;
    }
    h2 {
        font-size: 2em;
    }
    h2::before {
        left: -20px;
    }
    h2::after {
        right: -20px;
    }
    section {
        padding: 80px 15px;
    }
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item::after {
        left: 15px;
    }
    .right {
        left: 0;
    }
    .right::after {
        left: 15px;
    }
    .skills-category {
        padding: 20px;
    }
    .skill-item {
        width: 100px;
    }
    .languages-container {
        gap: 20px;
    }
    .language-circle {
        width: 100px;
        height: 100px;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    .project-image {
        height: 150px;
    }
    .modal-content {
        width: 90%;
        padding: 20px;
    }
    .contact-form {
        padding: 20px;
    }
}
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2em;
    }
    .hero .typed {
        font-size: 1em;
    }
    h2 {
        font-size: 1.8em;
    }
    .projects-search-container {
        max-width: 100%;
    }
    .language-circle {
        width: 80px;
        height: 80px;
    }
    .language-text {
        font-size: 0.8em;
    }
}
/* ---------------- Chat widget styles (paste at end of style.css) ---------------- */
#chat-button{
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #64ffda;
  color: #0a192f;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 18px;
  z-index: 2000;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
#chat-box{
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 360px;
  max-height: 520px;
  background: #071022;
  color: #ccd6f6;
  border: 1px solid rgba(100,255,218,0.08);
  border-radius: 12px;
  overflow: hidden;
  z-index: 2000;
  box-shadow: 0 14px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}
#chat-header{
  padding: 12px;
  font-weight:700;
  color:#64ffda;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background: linear-gradient(0deg, rgba(255,255,255,0.01), transparent);
}
#chat-messages{
  padding: 12px;
  overflow-y:auto;
  flex:1;
  font-size:14px;
  gap:8px;
  display:flex;
  flex-direction:column;
}
.chat-msg{ margin:6px 0; padding:10px 12px; border-radius:10px; max-width:88%; word-break:break-word; box-shadow: 0 4px 14px rgba(0,0,0,0.3);}
.chat-msg.user{ align-self:flex-end; background: linear-gradient(90deg, rgba(100,255,218,0.08), rgba(100,255,218,0.04)); color:#aef;}
.chat-msg.bot{ align-self:flex-start; background: rgba(255,255,255,0.02); color:#dbeef0;}
#chat-input-wrap{ display:flex; gap:8px; padding:10px; border-top:1px solid rgba(255,255,255,0.02); }
#chat-input{ flex:1; padding:10px; border-radius:8px; background:#021022; border:1px solid rgba(100,255,218,0.04); color:#ccd6f6; }
#chat-send{ padding:10px 14px; border-radius:8px; background:#64ffda; border:none; cursor:pointer; color:#062022; font-weight:700;}
#chat-loading{ font-size:12px; opacity:0.85; display:none; align-self:center; padding-left:6px; color:#89f;}
@media (max-width:480px){
  #chat-box{ right:12px; left:12px; width:auto; bottom:70px; max-height:60vh; }
  #chat-messages { font-size:13px; }
}

/* ===== 2026 editorial refresh ===== */
html[data-theme="dark"] {
    --bg: #0b1020;
    --bg-2: #111827;
    --bg-soft: #0f172a;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --accent: #22d3ee;
    --accent-2: #f97316;
    --accent-soft: rgba(34, 211, 238, 0.12);
    --accent-border: rgba(34, 211, 238, 0.3);
    --accent-glow: rgba(34, 211, 238, 0.18);
    --accent-2-glow: rgba(249, 115, 22, 0.18);
    --card: rgba(15, 23, 42, 0.85);
    --border: rgba(148, 163, 184, 0.18);
    --shadow: rgba(2, 6, 23, 0.65);
    --surface: #0f172a;
    --surface-2: #111827;
    --surface-3: #0b1220;
    --nav-bg: rgba(9, 14, 26, 0.86);
    --nav-bg-mobile: rgba(8, 12, 22, 0.96);
    --overlay: rgba(3, 7, 18, 0.7);
    --grid: rgba(148, 163, 184, 0.08);
    --grid-soft: rgba(148, 163, 184, 0.05);
    --tag-bg: rgba(249, 115, 22, 0.2);
    --tag-ink: #fdba74;
    --pill-bg: rgba(34, 211, 238, 0.16);
    --footer-bg: #0b1020;
}
html[data-theme="light"] {
    --bg: #f6f1e8;
    --bg-2: #eef2ff;
    --bg-soft: #f8fafc;
    --ink: #1b2338;
    --muted: #5a6479;
    --accent: #0ea5a4;
    --accent-2: #f97316;
    --accent-soft: rgba(14, 165, 164, 0.12);
    --accent-border: rgba(14, 165, 164, 0.3);
    --accent-glow: rgba(14, 165, 164, 0.18);
    --accent-2-glow: rgba(249, 115, 22, 0.18);
    --card: rgba(255, 255, 255, 0.88);
    --border: rgba(27, 35, 56, 0.12);
    --shadow: rgba(15, 23, 42, 0.12);
    --surface: #ffffff;
    --surface-2: #f1f5ff;
    --surface-3: #f5f7fb;
    --nav-bg: rgba(248, 245, 237, 0.86);
    --nav-bg-mobile: rgba(248, 245, 237, 0.96);
    --overlay: rgba(15, 23, 42, 0.65);
    --grid: rgba(27, 35, 56, 0.04);
    --grid-soft: rgba(27, 35, 56, 0.03);
    --tag-bg: rgba(249, 115, 22, 0.14);
    --tag-ink: #b45309;
    --pill-bg: rgba(14, 165, 164, 0.12);
    --footer-bg: var(--surface-2);
}
body {
    font-family: 'Space Grotesk', sans-serif;
    background:
        radial-gradient(900px 600px at 8% -10%, var(--accent-2-glow), transparent 60%),
        radial-gradient(900px 600px at 100% 10%, var(--accent-glow), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 60%, var(--bg-2) 100%);
    color: var(--ink);
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(120deg, var(--grid) 1px, transparent 1px),
        linear-gradient(60deg, var(--grid-soft) 1px, transparent 1px);
    background-size: 120px 120px, 160px 160px;
    pointer-events: none;
    z-index: -2;
}
#particles-js {
    position: fixed;
    height: 100%;
    opacity: 0.35;
    z-index: -1;
}
.navbar {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.navbar a {
    color: var(--ink);
}
.navbar a:hover {
    color: var(--accent);
}
.navbar a::after {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.hamburger .bar {
    background-color: var(--ink);
}
.hamburger.active .bar:nth-child(1),
.hamburger.active .bar:nth-child(3) {
    background-color: var(--accent);
}
.hero {
    background: transparent;
}
.hero-content {
    animation: heroRise 1.2s ease both;
}
@keyframes heroRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero h1 {
    font-family: 'Fraunces', serif;
    color: var(--ink);
    text-shadow: 0 18px 40px var(--accent-glow);
}
.hero .typed {
    color: var(--muted);
}
section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 90px 35px;
    box-shadow: 0 25px 70px var(--shadow);
    margin: 80px auto;
    backdrop-filter: blur(6px);
}
section#home {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0 auto;
    padding: 0;
}
h2 {
    font-family: 'Fraunces', serif;
    color: var(--ink);
    text-align: left;
    margin-bottom: 40px;
}
h2::before {
    content: none;
}
h2::after {
    content: '';
    display: block;
    width: 90px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    margin-top: 14px;
    border-radius: 999px;
}
section a {
    color: var(--accent);
}
section a:hover {
    color: var(--accent-2);
}
.timeline::after {
    background-color: var(--border);
}
.timeline-item::after {
    background-color: var(--accent);
    border-color: var(--card);
}
.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px var(--shadow);
}
.timeline-content h3 {
    color: var(--ink);
}
.timeline-content p,
.timeline-content li {
    color: var(--muted);
}
.skills-category {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px var(--shadow);
}
.skills-category h3 {
    color: var(--ink);
}
.skill-item {
    background: var(--surface-2);
    color: var(--ink);
    box-shadow: 0 6px 16px var(--accent-soft);
}
.skill-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px var(--accent-glow);
}
.language-circle {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.language-level {
    color: var(--accent);
}
#project-search {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
}
#project-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
}
.project-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 40px var(--accent-glow);
}
.project-title {
    color: var(--ink);
}
.project-desc {
    color: var(--muted);
}
.tech-tag {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}
.tech-tag:hover {
    background: var(--accent);
    color: #ffffff;
}
.modal {
    background-color: var(--overlay);
}
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px var(--shadow);
}
.modal h3 {
    color: var(--ink);
}
.modal p {
    color: var(--muted);
}
.modal a {
    background: var(--accent);
    color: #ffffff;
}
.modal a:hover {
    background: var(--accent-2);
}
.close {
    color: var(--accent);
}
.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px var(--shadow);
}
.contact-form input,
.contact-form textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.contact-form button {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #ffffff;
}
.success-message {
    background: var(--pill-bg);
    color: var(--accent);
    box-shadow: 0 12px 30px var(--accent-glow);
}
footer {
    background: var(--footer-bg);
    color: var(--muted);
}
.external-links {
    border-left: 2px solid var(--border);
}
.theme-toggle-item {
    margin-left: 10px;
}
.theme-toggle {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s, transform 0.3s;
}
.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.theme-toggle:active {
    transform: translateY(0);
}

/* Experience */
.experience-list {
    display: grid;
    gap: 24px;
}
.experience-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 28px var(--shadow);
}
.experience-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}
.experience-header h3 {
    color: var(--ink);
    font-size: 1.4em;
}
.experience-company {
    color: var(--muted);
    margin-top: 6px;
}
.experience-date {
    background: var(--pill-bg);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}
.experience-summary {
    margin-top: 14px;
    color: var(--muted);
}
.experience-highlights {
    margin-top: 14px;
    padding-left: 18px;
    color: var(--muted);
}

/* Research */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.research-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 15px 35px var(--shadow);
    position: relative;
    overflow: hidden;
}
.research-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}
.research-card h3 {
    color: var(--ink);
    margin-bottom: 10px;
}
.research-meta {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}
.research-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.research-links a {
    background: var(--pill-bg);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}
.research-links a:hover {
    background: rgba(249, 115, 22, 0.16);
    color: var(--accent-2);
}

/* Publications */
.publications-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}
.publication-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 24px 24px;
    box-shadow: 0 15px 35px var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.publication-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0.9;
}
.publication-item:hover {
    transform: translateY(-8px) rotate(0.4deg);
    box-shadow: 0 22px 45px var(--accent-glow);
}
.publication-title {
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 12px;
    font-size: 1.1em;
}
.publication-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
}
.publication-meta-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--muted);
}
.publication-summary {
    color: var(--muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line;
}
.publication-summary-wrap {
    position: relative;
    margin-bottom: 12px;
}
.publication-item.is-expanded .publication-summary {
    display: block;
    overflow: visible;
}
.publication-item.has-toggle .publication-summary-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    height: 30px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--surface));
    pointer-events: none;
}
.publication-toggle {
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.publication-toggle:hover {
    color: var(--accent-2);
    border-color: var(--accent-2);
    transform: translateY(-1px);
}
.publication-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.pub-tag {
    background: var(--tag-bg);
    color: var(--tag-ink);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
}
.publication-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.publication-links a {
    background: var(--pill-bg);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}
.publication-links a:hover {
    background: rgba(249, 115, 22, 0.16);
    color: var(--accent-2);
}

/* Chat widget refresh */
#chat-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #ffffff;
}
#chat-box {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    max-width: calc(100vw - 24px);
}
#chat-header {
    color: var(--ink);
    background: linear-gradient(90deg, var(--accent-soft), transparent);
}
.chat-msg.user {
    background: var(--accent-soft);
    color: var(--ink);
}
.chat-msg.bot {
    background: var(--surface-3);
    color: var(--ink);
}
#chat-input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
}
#chat-send {
    background: var(--accent);
    color: #ffffff;
}
#chat-loading {
    color: var(--muted);
}

/* Modal usability */
.modal {
    overflow: hidden;
}
.modal-content {
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    padding-top: 52px;
}
.close {
    position: sticky;
    top: 12px;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--surface-3);
    z-index: 2;
}

@media (max-width: 768px) {
    section {
        padding: 70px 20px;
        margin: 50px 15px;
    }
    .navbar ul {
        background: var(--nav-bg-mobile);
    }
    h2 {
        text-align: center;
    }
    h2::after {
        margin-left: auto;
        margin-right: auto;
    }
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .theme-toggle-item {
        margin-left: 0;
    }
}

/* ===== Responsive polish ===== */
html {
    scroll-padding-top: 90px;
    max-width: 100%;
    overflow-x: hidden;
}
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}
img, video {
    max-width: 100%;
    height: auto;
}
#particles-js,
#particles-js canvas {
    max-width: 100%;
}
.nav-container {
    padding: 0 24px;
}
.navbar ul {
    gap: 10px 18px;
    flex-wrap: wrap;
}
.navbar li {
    margin: 0;
}
.nav-links-group {
    flex-wrap: wrap;
    gap: 12px 18px;
}

@media (max-width: 1200px) {
    .navbar li {
        margin: 0 10px;
    }
    .navbar a {
        font-size: 0.95em;
    }
    section {
        width: min(1200px, 100% - 32px);
    }
}

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.2em;
    }
    .hero .typed {
        font-size: 1.5em;
    }
    section {
        padding: 80px 28px;
        margin: 60px auto;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    .skills-container {
        gap: 16px;
    }
    .external-links {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 12px;
        margin-top: 12px;
    }
}

@media (max-width: 900px) {
    .nav-container {
        justify-content: space-between;
    }
    .external-links {
        margin-left: 20px;
        padding-left: 20px;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }
    .nav-container {
        padding: 0 16px;
    }
    .navbar ul {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        padding: 18px 16px 30px;
        gap: 18px;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid var(--border);
    }
    .navbar ul.active {
        max-height: calc(100vh - 64px);
    }
    .nav-links-group,
    .external-links {
        width: 100%;
        align-items: center;
    }
    .nav-links-group li,
    .external-links li {
        width: 100%;
    }
    .navbar a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 14px;
        border-radius: 999px;
        background: var(--surface-3);
    }
    .external-links {
        border-top: 1px solid var(--border);
        margin-top: 18px;
        padding-top: 18px;
    }
    .theme-toggle {
        width: 100%;
        max-width: 240px;
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: 90vh;
    }
    .hero h1 {
        font-size: 2.4em;
    }
    .hero .typed {
        font-size: 1.15em;
    }
    section {
        padding: 64px 18px;
        margin: 40px 12px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .skills-container {
        justify-content: center;
    }
    .experience-header {
        flex-direction: column;
    }
    .experience-date {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .navbar ul {
        padding: 16px 12px 24px;
    }
    .navbar a {
        font-size: 0.9em;
    }
    .project-image {
        height: 160px;
    }
    .language-circle {
        width: 72px;
        height: 72px;
    }
    .skill-item {
        width: 90px;
    }
}

@media (max-height: 700px) and (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding-top: 80px;
    }
}
