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

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

html,
body {
  min-height: 100%;
  background: #0a0a0a;
  color: #f2f2f2;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: #0a0a0a;
  border-bottom: 1px solid #202020;
  transition: transform 220ms ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.navbar {
  width: min(1100px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Navigation layout */
.navbar {
  position: relative;
  width: min(1100px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar a {
  color: #b8b8b8;
  text-decoration: none;
  transition: color 180ms ease;
}

.navbar a:hover,
.navbar a:focus-visible {
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 40px);
}

.nav-links a {
  padding: 12px 0;
  font-size: 0.95rem;
}

/* Hamburger button: hidden on desktop */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* Tablet and mobile dropdown */
@media (max-width: 999px) {
  .navbar {
    flex-wrap: wrap;
    padding: 0 24px;
  }

  .hamburger {
    display: flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    padding: 8px 24px 16px;

    background: #0a0a0a;
    border-bottom: 1px solid #303030;
    z-index: 20;
  }

  .navbar.menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    border-top: 1px solid #202020;
    font-size: 0.95rem;
  }

  /* Animate hamburger into an X */
  .navbar.menu-open .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .navbar.menu-open .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .navbar.menu-open .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Small screens */
@media (max-width: 560px) {
  .navbar {
    min-height: 64px;
    padding: 0 18px;
  }

  .nav-brand {
    font-size: 0.8rem;
  }

  .nav-links {
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* Accessibility */
.hamburger:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .hamburger span {
    transition: none;
  }
}

.section {
  width: 100%;
  min-height: 100vh;
  scroll-margin-top: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Hero / particle section */
#hero {
  padding: 0;
  overflow: hidden;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Placeholder sections — replace with real content later */
#about {
  background: #0a0a0a;
  padding: 96px 24px;
}

.about-content {
  width: min(100%, 720px);
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content p {
  color: #b8b8b8;
  line-height: 1.8;
}

.about-content p + p {
  margin-top: 18px;
}

#projects {
  background: #111111;
}

#contact {
  background: #0a0a0a;
  padding: 96px 24px;
}

.section h2 {
  font-size: 2rem;
  font-weight: 500;
  color: #666;
}

.contact-container {
  width: min(100%, 960px);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(48px, 8vw, 100px);
  align-items: start;
}

.contact-heading .section-label {
  margin-bottom: 14px;
  color: #8c8c8c;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-heading h2 {
  margin-bottom: 18px;
  color: #f2f2f2;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 650;
  line-height: 1.05;
}

.contact-heading > p:last-child {
  max-width: 38ch;
  color: #929292;
  line-height: 1.7;
}

.contact-form,
.form-field {
  display: flex;
  flex-direction: column;
}

.contact-form {
  gap: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  gap: 8px;
}

.form-field label {
  color: #c6c6c6;
  font-size: 0.88rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid #303030;
  border-radius: 8px;
  outline: none;
  background: #121212;
  color: #f2f2f2;
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-field input {
  height: 48px;
  padding: 0 14px;
}

.form-field textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #8b8b8b;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 8%);
}

.submit-button {
  align-self: flex-start;
  min-width: 150px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid #f2f2f2;
  border-radius: 999px;
  background: #f2f2f2;
  color: #0a0a0a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.submit-button:hover:not(:disabled) {
  background: transparent;
  color: #f2f2f2;
  transform: translateY(-2px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-status {
  min-height: 1.4em;
  color: #a8a8a8;
  font-size: 0.9rem;
}

.form-status.is-success {
  color: #78d99a;
}

.form-status.is-error {
  color: #ff8b8b;
}

@media (max-width: 560px) {
  .section {
    scroll-margin-top: 64px;
  }

  .navbar {
    min-height: 64px;
    padding: 0 18px;
  }

  .nav-brand {
    font-size: 0.8rem;
  }

  .nav-links {
    gap: 14px;
  }

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

  #contact {
    padding: 72px 18px;
  }

  .contact-container,
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-container {
    gap: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
