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

html {
  scroll-behavior: smooth;
}

body {
  background: #0a0a0f;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e1e2a;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #d4d4f7, #9b9bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: #999;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #7c7cff;
  transition: width 0.2s;
}

.nav-links a:hover {
  color: #e0e0ff;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 4rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff, #b0b0ff, #8080e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.hero-content .tagline {
  font-size: 1.4rem;
  color: #8888aa;
  margin-bottom: 0.6rem;
  font-weight: 350;
}

.hero-content .sub {
  font-size: 1rem;
  color: #666;
}

.hero-content .sub span {
  color: #9999cc;
}

.scroll-hint {
  margin-top: 3rem;
  animation: bounce 2s infinite;
}

.scroll-hint a {
  color: #555;
  font-size: 1.8rem;
  text-decoration: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #f0f0ff;
}

.section-subtitle {
  color: #6666aa;
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

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

.hero-photo {
  margin-bottom: 1.5rem;
}

.hero-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2a2a44;
  box-shadow: 0 0 30px rgba(124, 124, 255, 0.15);
}

.about-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2a2a44;
  margin: 0 auto 1rem;
  display: block;
}

.about-text p {
  color: #b0b0c8;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.skill-tag {
  background: #14141f;
  padding: 0.3rem 1rem;
  border-radius: 40px;
  font-size: 0.8rem;
  color: #9090cc;
  border: 1px solid #252540;
  transition: all 0.2s;
}

.skill-tag:hover {
  border-color: #5c5caa;
  background: #1a1a30;
  color: #c0c0ff;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.project-card {
  background: #11111a;
  border: 1px solid #1e1e30;
  border-radius: 1.5rem;
  padding: 1.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #5c5caa, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: #33335a;
  background: #151525;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card h3 {
  font-size: 1.3rem;
  font-weight: 500;
  color: #e8e8ff;
  margin-bottom: 0.4rem;
}

.project-card .project-type {
  font-size: 0.75rem;
  color: #7777bb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.project-card .desc {
  font-size: 0.95rem;
  color: #9999b8;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

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

.project-tags span {
  font-size: 0.7rem;
  background: #1a1a2a;
  padding: 0.2rem 0.7rem;
  border-radius: 40px;
  color: #8080bb;
  border: 1px solid #252542;
}

/* Documents section */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #11111a;
  border: 1px solid #1e1e30;
  border-radius: 1rem;
  padding: 1.2rem 1.5rem;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.doc-item:hover {
  border-color: #33335a;
  background: #151525;
  transform: translateY(-2px);
}

.doc-icon {
  font-size: 1.8rem;
  color: #7c7cff;
  flex-shrink: 0;
}

.doc-info h4 {
  font-size: 0.95rem;
  font-weight: 500;
  color: #d0d0e8;
  margin-bottom: 0.2rem;
}

.doc-info .doc-meta {
  font-size: 0.75rem;
  color: #666;
}

/* Footer */
footer {
  border-top: 1px solid #1a1a2a;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #444;
  font-size: 0.85rem;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

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

.modal {
  background: #14141f;
  border: 1px solid #252540;
  border-radius: 2rem;
  padding: 2.5rem;
  max-width: 600px;
  width: 100%;
  position: relative;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal h2 {
  font-size: 1.6rem;
  color: #e8e8ff;
  margin-bottom: 0.3rem;
}

.modal .modal-type {
  font-size: 0.8rem;
  color: #7777bb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.modal p {
  color: #b0b0c8;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.modal .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal .modal-tags span {
  font-size: 0.75rem;
  background: #1a1a2a;
  padding: 0.25rem 0.8rem;
  border-radius: 40px;
  color: #9090cc;
  border: 1px solid #252542;
}

.modal a {
  display: inline-block;
  color: #7c7cff;
  text-decoration: none;
  border-bottom: 1px solid #3a3a66;
  padding-bottom: 2px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.modal a:hover {
  color: #b0b0ff;
  border-bottom-color: #7c7cff;
}

/* ---- Burger ---- */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #999;
  border-radius: 2px;
  transition: all 0.3s;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.nav-overlay.show {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .burger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    background: #0e0e18;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 1px solid #1e1e30;
    z-index: 100;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .hero-content h1 { font-size: 2.2rem; }
  .hero-content .tagline { font-size: 1rem; }
  .hero-content .sub { font-size: 0.9rem; }
  .about-content { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .skills { justify-content: center; }
  .projects-grid { grid-template-columns: 1fr; gap: 1rem; }
  .docs-grid { grid-template-columns: 1fr; gap: 0.8rem; }
  nav { padding: 0.7rem 1rem; }
  section { padding: 3rem 0; }
  .container { padding: 0 1.2rem; }
  .project-card { padding: 1.4rem; }
  .doc-item { padding: 1rem 1.2rem; }
  .about-photo { width: 110px; height: 110px; }
  .hero-img { width: 120px; height: 120px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.6rem; }
  .hero-content .tagline { font-size: 0.9rem; }
  .section-title { font-size: 1.5rem; }
  .modal { padding: 1.5rem; border-radius: 1.2rem; margin: 0.5rem; max-width: 100%; }
  .modal h2 { font-size: 1.2rem; }
  .modal p { font-size: 0.9rem; }
  .hero-img { width: 100px; height: 100px; }
  .hero-photo { margin-bottom: 1rem; }
  .hero { padding-top: 3rem; min-height: 92vh; }
  .about-photo { width: 100px; height: 100px; }
  section { padding: 2.5rem 0; }
  .skill-tag { font-size: 0.72rem; padding: 0.2rem 0.8rem; }
  .project-card h3 { font-size: 1.1rem; }
  .doc-info h4 { font-size: 0.85rem; }
  .doc-icon { font-size: 1.5rem; }
  .scroll-hint { margin-top: 2rem; }
  .scroll-hint a { font-size: 1.4rem; }
  .nav-links { width: 80%; padding: 4rem 1.5rem 1.5rem; }
  footer { font-size: 0.75rem; padding: 1.2rem 1rem; }
  .modal-overlay { padding: 0.5rem; align-items: flex-end; }
  .modal-overlay.active { align-items: center; }
  .section-subtitle { margin-bottom: 1.5rem; font-size: 0.9rem; }
}
