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

html {
  font-size: 18px;
  line-height: 1.6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #222;
  background: #fafafa;
}

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

/* Header */
header {
  margin-bottom: 3rem;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #111;
}

.tagline {
  color: #555;
}

.theme-toggle {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #888;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}

.theme-toggle:hover {
  color: #555;
  border-color: #888;
}

/* Sections */
section {
  margin-bottom: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

h2 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 1.25rem;
}

/* Projects */
.projects {
  list-style: none;
}

.project {
  margin-bottom: 1.5rem;
}

.project:last-child {
  margin-bottom: 0;
}

.project h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.project h3 a {
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}

.project h3 a:hover {
  color: #444;
  border-color: #888;
}

.project p {
  color: #555;
  font-size: 0.95rem;
}

/* About */
#about p {
  max-width: 100%;
}

#about a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}

#about a:hover {
  color: #444;
  border-color: #888;
}

/* Contact */
#contact a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}

#contact a:hover {
  color: #444;
  border-color: #888;
}

.social {
  margin-top: 1rem;
}

.social a {
  margin-right: 1rem;
}

/* Footer */
footer {
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
  color: #888;
  font-size: 0.875rem;
}

/* PDF Modal */
#pdf-modal {
  border: none;
  padding: 0;
  width: 90vw;
  height: 90vh;
  max-width: 900px;
  max-height: 90vh;
  background: #fff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

#pdf-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

#pdf-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#pdf-modal .modal-close {
  position: absolute;
  top: -2rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

#pdf-modal .modal-close:hover {
  color: #ccc;
}

/* Video Modal */
#video-modal {
  border: none;
  padding: 0;
  background: transparent;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

#video-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

#video-modal video {
  max-width: 90vw;
  max-height: 80vh;
}

#video-modal .modal-close {
  position: absolute;
  top: -2rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

#video-modal .modal-close:hover {
  color: #ccc;
}

/* Dark Mode */
body.dark {
  background: #111;
  color: #ddd;
}

body.dark h1 {
  color: #eee;
}

body.dark .tagline {
  color: #999;
}

body.dark .theme-toggle {
  color: #777;
  border-color: #555;
}

body.dark .theme-toggle:hover {
  color: #aaa;
  border-color: #777;
}

body.dark section {
  border-color: #333;
}

body.dark h2 {
  color: #888;
}

body.dark .project h3 a,
body.dark #about a,
body.dark #contact a {
  color: #ddd;
  border-color: #555;
}

body.dark .project h3 a:hover,
body.dark #about a:hover,
body.dark #contact a:hover {
  color: #fff;
  border-color: #888;
}

body.dark .project p {
  color: #999;
}

body.dark footer {
  border-color: #333;
  color: #666;
}

/* Responsive */
@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .container {
    padding: 2rem 1rem;
  }

  header {
    margin-bottom: 2rem;
  }

  section {
    margin-bottom: 2rem;
  }
}
