@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: #0d0d0d;
  color: #f3f4f6;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  line-height: 1.6;
  overflow-x: clip;
}

/* Boot overlay */
#boot-overlay {
  position: fixed;
  inset: 0;
  background: #0d0d0d;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2rem 1rem;
  transition: opacity 0.4s ease;
}

#boot-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#boot-log {
  font-size: 0.75rem;
  color: #d1d5db;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 896px;
  width: 100%;
}

@media (min-width: 768px) {
  #boot-overlay {
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
  }

  #boot-log {
    font-size: 0.875rem;
  }
}

.boot-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  opacity: 0;
  animation: bootFadeIn 0.15s ease forwards;
}

.boot-status {
  color: #22c55e;
  flex-shrink: 0;
}

.boot-msg {
  flex-shrink: 0;
}

@keyframes bootFadeIn {
  to {
    opacity: 1;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  list-style: none;
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  background: #111111;
  border-bottom: 1px solid #1f2937;
  z-index: 50;
}

.nav-inner {
  max-width: 896px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #9ca3af;
}

.nav-links a {
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-mobile-controls {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.hamburger {
  padding: 0.5rem;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.hamburger:hover {
  color: #fff;
}

.hamburger svg {
  display: block;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid #1f2937;
  padding: 1rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #9ca3af;
}

.mobile-menu-links a {
  display: block;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: #fff;
}

/* Sections */
section {
  max-width: 896px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

@media (min-width: 768px) {
  section {
    padding: 3rem 1.5rem;
  }
}

.border-top {
  border-top: 1px solid #1f2937;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }
}

/* About */
.about-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .about-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }
}

.about-image {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #374151;
}

@media (min-width: 768px) {
  .about-image {
    width: 8rem;
    height: 8rem;
  }
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-text {
  text-align: center;
}

@media (min-width: 768px) {
  .about-text {
    text-align: left;
  }
}

.about-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

@media (min-width: 768px) {
  .about-text h1 {
    font-size: 1.875rem;
  }
}

.about-text p {
  color: #d1d5db;
  line-height: 1.625;
}

.about-text p + p {
  margin-top: 0.75rem;
}

/* Experience */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.exp-card {
  display: flex;
  gap: 1rem;
}

.exp-logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  background: #1f2937;
  flex-shrink: 0;
  overflow: hidden;
}

.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.375rem;
}

.exp-content {
  flex: 1;
  min-width: 0;
}

.exp-title {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

@media (min-width: 768px) {
  .exp-title {
    font-size: 1.125rem;
  }
}

.exp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}

.exp-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.exp-meta svg {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.exp-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.exp-tech span {
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
  background: #1f2937;
  color: #9ca3af;
  border-radius: 0.25rem;
}

.exp-desc {
  margin-top: 0.75rem;
}

.exp-desc li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #d1d5db;
}

.exp-desc li + li {
  margin-top: 0.125rem;
}

@media (min-width: 768px) {
  .exp-desc li {
    font-size: 1rem;
  }
}

.exp-bullet {
  color: #4b5563;
  flex-shrink: 0;
}

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

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.project-card {
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}

.project-card:hover {
  border-color: #4b5563;
  background: rgba(17, 17, 17, 0.5);
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.project-card:hover .project-thumb img {
  transform: scale(1.03);
}

.project-body {
  padding: 1rem;
}

@media (min-width: 768px) {
  .project-body {
    padding: 1.25rem;
  }
}

.project-title {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.375rem;
}

@media (min-width: 768px) {
  .project-title {
    font-size: 1.125rem;
  }
}

.project-desc {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.project-tech span {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: #1f2937;
  color: #d1d5db;
  border-radius: 0.25rem;
}

.project-details-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  background: #1f2937;
  color: #d1d5db;
  border: 1px solid #374151;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.project-details-btn:hover {
  background: #374151;
  color: #fff;
  border-color: #6b7280;
}

.project-details-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

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

@media (min-width: 768px) {
  .edu-list {
    gap: 1.5rem;
  }
}

.edu-card {
  display: flex;
  gap: 1rem;
}

.edu-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: #1f2937;
  flex-shrink: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .edu-logo {
    width: 3.5rem;
    height: 3.5rem;
  }
}

.edu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}

.edu-name {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

@media (min-width: 768px) {
  .edu-name {
    font-size: 1.125rem;
  }
}

.edu-degree {
  color: #9ca3af;
  font-size: 0.875rem;
}

.edu-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.cert-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #fff;
}

@media (min-width: 768px) {
  .cert-title {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem;
  }
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #d1d5db;
}

@media (min-width: 768px) {
  .cert-item {
    font-size: 1rem;
  }
}

.cert-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: #1f2937;
  flex-shrink: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .cert-logo {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.cert-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}

.cert-org {
  color: #6b7280;
}

.cert-date {
  color: #4b5563;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.skill-category h3 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #fff;
}

.skill-category li {
  color: #d1d5db;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category li + li {
  margin-top: 0.25rem;
}

.skill-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #4b5563;
  flex-shrink: 0;
}

.skill-icon {
  width: 1rem;
  height: 1rem;
  filter: brightness(0) invert(0.85);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: #d1d5db;
  stroke-width: 2;
  fill: none;
}

/* Contact */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (min-width: 768px) {
  .contact-links {
    gap: 1.5rem;
  }
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #9ca3af;
  transition: color 0.2s;
}

.contact-links a:hover {
  color: #fff;
}

.contact-links svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Footer */
footer {
  border-top: 1px solid #1f2937;
  padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
  footer {
    padding: 2rem 1.5rem;
  }
}

.footer-inner {
  max-width: 896px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Languages */
.languages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .languages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lang-card {
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s;
}

.lang-card:hover {
  border-color: #4b5563;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.lang-name {
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
}

.lang-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.625rem;
  background: linear-gradient(135deg, #333, #666);
  color: #fff;
  border-radius: 999px;
}

.lang-chart-wrap {
  position: relative;
  width: 100%;
  height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-chart-wrap svg {
  width: 9rem;
  height: 9rem;
}

@media (min-width: 768px) {
  .lang-chart-wrap svg {
    width: 10rem;
    height: 10rem;
  }
}

.lang-label {
  position: absolute;
  font-size: 0.625rem;
  font-weight: 500;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lang-level {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #d1d5db;
  font-weight: 500;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: #111;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  max-width: 640px;
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  position: relative;
}

@media (min-width: 768px) {
  .modal-content {
    max-width: 800px;
    padding: 2rem;
    margin-top: 3rem;
  }
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 50%;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #374151;
  color: #fff;
  border-color: #6b7280;
}

.modal-close svg {
  width: 1rem;
  height: 1rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-desc {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.625;
  margin-bottom: 1.25rem;
}

.modal-screenshots {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .modal-screenshots {
    grid-template-columns: repeat(2, 1fr);
  }
}

.modal-screenshots img {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #1f2937;
}

.modal-subtitle {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
}

.modal-features {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.modal-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #d1d5db;
}

.modal-features .dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #6b7280;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.modal-tech span {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: #1f2937;
  color: #d1d5db;
  border-radius: 0.25rem;
}

.modal-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: #1f2937;
  color: #d1d5db;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.modal-github-btn:hover {
  background: #374151;
  color: #fff;
  border-color: #6b7280;
}

.modal-github-btn svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 767px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile-controls {
    display: flex;
  }
}