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

:root {
  --bg:         #0d0a0a;
  --surface:    #1f2937;
  --border:     #374151;
  --text:       #f1f5f9;
  --muted:      #94a3b8;
  --accent:     #C0392B;
  --accent-dim: rgba(192, 57, 43, 0.08);

  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:      60px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

/* Mobile nav (hidden on desktop)*/
.mobile-nav {
  display: none;
}

/* Mesh canvas */
#meshCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Two-column layout */
.layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  gap: 20rem;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Left panel */
.left-panel {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5rem 0;
}

.left-name {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.left-title {
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.left-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.75rem;
  line-height: 1.65;
  max-width: 280px;
}

/* Left nav */
.left-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.left-nav-item {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0;
  transition: color 0.2s, font-size 0.2s;
  width: fit-content;
}

.left-nav-item:hover {
  color: var(--text);
}

.left-nav-item.active {
  color: var(--accent);
  font-size: 1.15rem;
}

/* Left bottom */
.left-bottom {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.left-socials {
  display: flex;
  gap: 1.25rem;
}

.left-socials a {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.left-socials a:hover {
  color: var(--text);
}

.left-socials svg {
  width: 20px;
  height: 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
  width: fit-content;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

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

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

.btn-outline:hover {
  border-color: var(--muted);
}

/* Right panel */
.right-panel {
  flex: 1;
  padding: 5rem 0;
  min-width: 0;
}

/* Sections */
.r-section {
  padding: 0 0 3rem 0;
}

.section-label {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
}

/* About */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-content p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.975rem;
}

/* Projects */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.projects-grid:hover .project-card {
  opacity: 0.4;
}

.projects-grid:hover .project-card:hover {
  opacity: 1;
}

.project-card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 1.5rem 0.5rem;
  margin: 0 -1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  cursor: pointer;
  color: inherit;
}

.project-card:hover {
  background: rgba(10, 15, 30, 0.65);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.project-card:hover .project-card-header h3 {
  color: var(--accent);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.project-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s;
}

.project-link {
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
  transition: opacity 0.2s;
}

.project-link:hover { opacity: 0.75; }

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.project-bullets {
  list-style: disc;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-bullets li {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.tech-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
}

/* Section footer link */
.section-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text);
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--accent);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.skill-group h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

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

.skill-tags span {
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-dim);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
}

/* Education */
.edu-card {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 0 1.5rem;
  margin: 0 -1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.5rem
}

.edu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.edu-card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.edu-degree {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.edu-location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.edu-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

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

.edu-gpa {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.courses-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Contact */
.contact-desc {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  font-size: 0.975rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s;
  width: fit-content;
}

.contact-item:hover { color: var(--accent); }

/* Footer */
footer {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}


/* Mobile */
@media (max-width: 768px) {
  .layout {
    display: block;
    padding: 0;
  }

  .left-panel {
    display: none;
  }

  .mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: var(--nav-h);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }

  .mobile-nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13, 10, 10, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    list-style: none;
  }

  .mobile-nav-links.open {
    display: flex;
  }

  .mobile-nav-links a {
    font-size: 0.9rem;
    color: var(--muted);
  }

  .mobile-nav.open {
    background: rgba(13, 10, 10, 0.35);
  }

  .right-panel {
    padding: 3rem 1.5rem;
  }

  .r-section {
    padding-bottom: 4rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .edu-card-header {
    flex-direction: column;
  }

  .edu-right {
    align-items: flex-start;
  }
}
