* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #6c63ff;
    --bg-main: #0a0a0a;
    --bg-alt: #111;
    --bg-card: #1a1a2e;
    --text-main: #e0e0e0;
    --text-muted: #888;
    --bg-nav: rgba(10, 10, 10, 0.95);
    --border-color: #222;
    --border-card: #2a2a4a;
}
:root.light-mode {
    --bg-main: #f8f9fa;
    --bg-alt: #e9ecef;
    --bg-card: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --bg-nav: rgba(255, 255, 255, 0.95);
    --border-color: #dee2e6;
    --border-card: #e5e7eb;
}
body { font-family: 'Segoe UI', sans-serif; background: var(--bg-main); color: var(--text-main); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 5%; position: sticky; top: 0; background: var(--bg-nav); backdrop-filter: blur(10px); z-index: 100; border-bottom: 1px solid var(--border-color); }
.nav-logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.nav-links a { color: var(--text-main); text-decoration: none; margin-left: 2rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }
.hero { min-height: 90vh; display: flex; align-items: center; padding: 5% 10%; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 0.5rem; }
.highlight { color: var(--primary); }
.subtitle { font-size: 1.4rem; color: var(--text-muted); margin-bottom: 1rem; }
.bio { max-width: 600px; line-height: 1.7; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { padding: 0.75rem 1.8rem; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #5a52d5; transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.section { padding: 5rem 10%; }
.bg-alt { background: var(--bg-alt); }
.section-title { font-size: 2rem; margin-bottom: 2.5rem; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background: var(--primary); margin-top: 0.5rem; border-radius: 2px; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.project-card { background: var(--bg-card); border-radius: 12px; padding: 1.5rem; border: 1px solid var(--border-card); transition: transform 0.3s, border-color 0.3s; }
.project-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.8rem; flex-wrap: wrap; gap: 0.5rem; }
.project-header h3 { font-size: 1.1rem; }
.project-card img {
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 1.2rem -1.5rem;
    height: 200px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2); /* Subtle dark background for non-matching aspect ratios */
    border-radius: 12px 12px 0 0;
    transition: transform 0.5s ease;
}
.project-card:hover img {
    transform: scale(1.05);
}
.project-tag { background: rgba(108,99,255,0.2); color: var(--primary); padding: 0.2rem 0.7rem; border-radius: 20px; font-size: 0.8rem; }
.project-links { display: flex; gap: 1rem; margin-top: 1rem; }
.project-links a { color: var(--primary); text-decoration: none; font-size: 0.9rem; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.skill-badge { background: var(--bg-card); border: 1px solid var(--border-card); padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.9rem; cursor: default; user-select: none; color: var(--text-main); }
.contact-content { text-align: center; }
.contact-content p { margin-bottom: 1.5rem; font-size: 1.1rem; color: var(--text-muted); }
.social-links { margin-top: 1.5rem; display: flex; justify-content: center; gap: 1.5rem; font-size: 1.8rem; }
.social-links a { color: var(--text-muted); transition: color 0.3s; }
.social-links a:hover { color: var(--primary); }
footer { text-align: center; padding: 2rem; color: var(--text-muted); border-top: 1px solid var(--border-color); }

/* Mobile Navigation */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 2rem;
    transition: color 0.3s;
}
.theme-toggle:hover { color: var(--primary); }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-nav);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        margin: 1rem 0;
        text-align: center;
        width: 100%;
        display: block;
    }
    .theme-toggle {
        margin: 1rem auto;
        display: block;
    }
}

/* Toast Notifications */
:root {
  --success: #0ABF30;
  --error: #E24D4C;
  --warning: #E9BD0C;
  --info: #3498DB;
}

.notifications {
  position: fixed;
  top: 30px;
  right: 20px;
  z-index: 1000;
  list-style: none;
}
.notifications .toast {
  width: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 16px 17px;
  margin-bottom: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  animation: show_toast 0.3s ease forwards;
}
@keyframes show_toast {
  0% { transform: translateX(100%); }
  40% { transform: translateX(-5%); }
  80% { transform: translateX(0%); }
  100% { transform: translateX(-10px); }
}
.notifications .toast.hide {
  animation: hide_toast 0.3s ease forwards;
}
@keyframes hide_toast {
  0% { transform: translateX(-10px); }
  40% { transform: translateX(0%); }
  80% { transform: translateX(-5%); }
  100% { transform: translateX(calc(100% + 20px)); }
}
.toast::before {
  position: absolute;
  content: "";
  height: 3px;
  width: 100%;
  bottom: 0px;
  left: 0px;
  animation: progress 5s linear forwards;
}
@keyframes progress {
  100% { width: 0%; }
}
.toast.success::before { background: var(--success); }
.toast.error::before { background: var(--error); }
.toast.warning::before { background: var(--warning); }
.toast.info::before { background: var(--info); }

.toast .column { display: flex; align-items: center; }
.toast .column i { font-size: 1.5rem; }
.toast.success .column i { color: var(--success); }
.toast.error .column i { color: var(--error); }
.toast.warning .column i { color: var(--warning); }
.toast.info .column i { color: var(--info); }

.toast .column span { font-size: 1rem; margin-left: 12px; }
.toast i:last-child { color: var(--text-muted); cursor: pointer; transition: color 0.3s; padding: 5px; }
.toast i:last-child:hover { color: var(--text-main); }

@media screen and (max-width: 530px) {
  .notifications { width: 95%; right: 2.5%; top: 20px; }
  .notifications .toast { width: 100%; margin-left: 0; }
}