@font-face {
  font-family: 'berkeley';
  src: url('../font/berkeley.woff2') format('woff2'),
       url('../font/berkeley.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'berkeley', system-ui, sans-serif;
  background: #01110c;
  cursor: none;
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

@media (max-aspect-ratio: 1/1) {
  html, body {
    height: 100%;
  }
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

@media (max-aspect-ratio: 1/1) {
  canvas {
    position: fixed;
    height: 100%;
  }
}

/* Hide custom cursor on mobile */
@media (max-width: 550px) {
  html, body {
    cursor: auto;
  }
  #cursor-outer,
  #cursor-inner {
    display: none !important;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: auto;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2.5rem;
  width: 90%;
  max-width: 400px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.modal-content h2 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contact-form input,
#contact-form textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'berkeley', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#contact-form input:focus,
#contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

#contact-form textarea {
  resize: none;
  min-height: 100px;
}

#contact-form button[type="submit"] {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.875rem 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'berkeley', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 0.5rem;
}

#contact-form button[type="submit"]:hover {
  background: rgba(255, 255, 255, 0.18);
}

#contact-form button[type="submit"]:active {
  transform: scale(0.98);
}

body.light-theme .modal-overlay {
  background: rgba(255, 255, 255, 0.4);
}

body.light-theme .modal-content {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .modal-close {
  color: rgba(0, 0, 0, 0.6);
}

body.light-theme .modal-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.9);
}

body.light-theme .modal-content h2 {
  color: rgba(0, 0, 0, 0.85);
}

body.light-theme #contact-form input,
body.light-theme #contact-form textarea {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.85);
}

body.light-theme #contact-form input::placeholder,
body.light-theme #contact-form textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

body.light-theme #contact-form input:focus,
body.light-theme #contact-form textarea:focus {
  border-color: rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.08);
}

body.light-theme #contact-form button[type="submit"] {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.85);
}

body.light-theme #contact-form button[type="submit"]:hover {
  background: rgba(0, 0, 0, 0.14);
}
