/* ========================================
   Martin C.S. Weiss - Static Site Styles
   Pixel-perfect replica of Squarespace site
   ======================================== */

/* Google Fonts - matching Squarespace typekit fonts */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Montserrat:wght@400;500;600;700&family=PT+Sans:wght@400;700&display=swap');

/* ----------------------------------------
   CSS Reset & Base
   ---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'EB Garamond', 'adobe-garamond-pro', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.7);
  background-color: #fff;
}

a {
  color: rgb(61, 153, 145);
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

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

h1, h2, h3, h4 {
  margin: 0;
  padding: 0;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ----------------------------------------
   Header / Navigation Bar (subpages)
   ---------------------------------------- */
.site-header {
  background-color: rgb(33, 33, 33);
  padding: 0 20px;
  height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

.site-header .site-title {
  font-family: 'Montserrat', 'proxima-nova', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  line-height: 20px;
}

.site-header .site-title:hover {
  opacity: 0.8;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-header nav a {
  font-family: 'Montserrat', 'proxima-nova', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 9.75px 13px;
  display: block;
  line-height: 13px;
}

.site-header nav a:hover {
  color: #fff;
}

.site-header nav .dropdown {
  position: relative;
}

.site-header nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgb(33, 33, 33);
  min-width: 180px;
  padding: 8px 0;
  z-index: 200;
}

.site-header nav .dropdown:hover .dropdown-menu {
  display: block;
}

.site-header nav .dropdown-menu a {
  padding: 8px 20px;
  font-size: 12px;
  white-space: nowrap;
}

/* Mobile hamburger menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* ----------------------------------------
   Homepage-specific styles
   ---------------------------------------- */
.homepage {
  text-align: center;
}

.homepage .hero-image {
  width: 100%;
  height: 55vw;
  max-height: 550px;
  overflow: hidden;
}

.homepage .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 0%;
  display: block;
}

.homepage .content-block {
  width: 500px;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 0;
  text-align: left;
}

.homepage .name-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 45px;
  font-weight: 700;
  line-height: 45px;
  letter-spacing: 3.6px;
  text-transform: uppercase;
  color: rgb(51, 51, 51);
  margin: 36px 0 0;
  display: inline-block;
}

.homepage .subtitle {
  font-family: 'Times New Roman', Times, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 5.04px;
  text-transform: uppercase;
  color: rgb(51, 51, 51);
  margin: 12px 0 0;
}

.homepage .bio {
  margin-top: 36px;
}

.homepage .bio p {
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.4px;
  letter-spacing: 0.16px;
  color: rgba(51, 51, 51, 0.6);
  margin-bottom: 16px;
}

.homepage .bio a {
  color: rgba(51, 51, 51, 0.6);
  text-decoration: underline;
}

.homepage .bio a:hover {
  color: rgb(51, 51, 51);
}

/* Homepage bottom nav */
.homepage .bottom-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 36px 0 24px;
  gap: 0;
}

.homepage .bottom-nav a {
  font-family: 'PT Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 12px;
  letter-spacing: 3.36px;
  text-transform: uppercase;
  color: rgb(51, 51, 51);
  text-decoration: none;
  padding: 9.6px 7.2px;
}

.homepage .bottom-nav a:hover {
  opacity: 0.7;
}

/* Homepage social icons */
.homepage .social-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.homepage .social-icons a {
  color: rgb(51, 51, 51);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.homepage .social-icons a:hover {
  opacity: 0.7;
}

.homepage .social-icons svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ----------------------------------------
   Subpage Common Layout
   ---------------------------------------- */
.page-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

/* ----------------------------------------
   Banner / Hero Image (Startups, Software, Mixing)
   ---------------------------------------- */
.banner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: rgb(31, 31, 31);
}

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

.banner .banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.banner .banner-title {
  font-family: 'Montserrat', 'proxima-nova', sans-serif;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
}

/* Software banner with quote overlay */
.banner .banner-quote {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 1px;
  color: #fff;
  text-align: center;
  max-width: 700px;
  padding: 0 40px;
}

.banner .banner-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 20px;
  font-weight: 400;
}

.banner .banner-quote cite em {
  font-style: italic;
}

/* ----------------------------------------
   Research Page
   ---------------------------------------- */
.research-intro {
  text-align: center;
  margin-bottom: 60px;
}

.research-intro h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  color: rgba(26, 26, 26, 0.9);
  margin-bottom: 24px;
}

.research-intro p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.7);
  max-width: 800px;
  margin: 0 auto;
}

.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.research-section {
  margin-bottom: 60px;
}

.research-section h2 {
  font-family: 'Montserrat', 'proxima-nova', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgb(51, 51, 51);
  margin-bottom: 16px;
}

.research-section p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.7);
  margin-bottom: 16px;
}

.research-section .publications {
  list-style: disc;
  padding-left: 20px;
}

.research-section .publications li {
  margin-bottom: 8px;
  list-style: disc;
}

.research-section .publications a {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  color: rgb(61, 153, 145);
}

.research-section img {
  width: 100%;
  margin-bottom: 24px;
}

/* Full-width image between research sections */
.research-full-image {
  width: 100%;
  margin: 40px 0;
}

.research-full-image img {
  width: 100%;
}

/* ----------------------------------------
   Startups Page - Blog/Card Style
   ---------------------------------------- */
.startups-intro {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e1e1e1;
}

.startups-intro p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.7);
}

.startup-entry {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e1e1e1;
}

.startup-entry:last-child {
  border-bottom: none;
}

.startup-entry .entry-image {
  flex: 0 0 300px;
  max-width: 300px;
}

.startup-entry .entry-image img {
  width: 100%;
  height: auto;
}

.startup-entry .entry-content {
  flex: 1;
}

.startup-entry .entry-title {
  font-family: 'Montserrat', 'proxima-nova', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgb(102, 102, 102);
  margin-bottom: 10px;
  line-height: 24px;
}

.startup-entry .entry-date {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 13px;
  color: rgba(26, 26, 26, 0.4);
  line-height: 1.4;
  margin-bottom: 8px;
}

.startup-entry .entry-excerpt {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.7);
  margin-bottom: 10px;
}

.startup-entry .read-more {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  color: rgb(61, 153, 145);
  text-decoration: none;
}

.startup-entry .read-more:hover {
  opacity: 0.7;
}

/* ----------------------------------------
   Software Page
   ---------------------------------------- */
.software-project {
  margin-bottom: 60px;
  text-align: center;
}

.software-project h2 {
  font-family: 'Montserrat', 'proxima-nova', sans-serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  color: rgb(74, 74, 74);
  margin-bottom: 24px;
  text-align: center;
}

.software-project .project-image {
  margin-bottom: 24px;
}

.software-project .project-image img {
  max-width: 100%;
  margin: 0 auto;
}

.software-project .project-details {
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

.software-project .project-details p {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(26, 26, 26, 0.7);
}

.software-project .project-details strong {
  font-weight: 700;
  color: rgba(26, 26, 26, 0.85);
}

.software-project .project-links {
  margin-top: 12px;
}

.software-project .project-links a {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  color: rgb(61, 153, 145);
  margin-right: 16px;
}

/* ----------------------------------------
   Music / Blog Pages (Production + Mixing)
   ---------------------------------------- */
.blog-list {
  max-width: 600px;
  margin: 0 auto;
}

.blog-entry {
  margin-bottom: 60px;
}

.blog-entry .entry-date {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 13px;
  color: rgba(26, 26, 26, 0.4);
  line-height: 1.4;
  margin-bottom: 4px;
}

.blog-entry .entry-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: rgba(26, 26, 26, 0.9);
  margin: 12px 0;
}

.blog-entry .entry-separator {
  width: 30px;
  height: 1px;
  background: rgba(26, 26, 26, 0.15);
  margin: 16px 0;
}

.blog-entry .soundcloud-embed {
  width: 100%;
  margin-top: 16px;
}

.blog-entry .soundcloud-embed iframe {
  width: 100%;
  height: 400px;
  border: none;
}

.blog-entry .audio-player {
  margin-top: 16px;
}

.blog-entry audio {
  width: 100%;
}

.blog-entry .tracklist {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(26, 26, 26, 0.6);
  margin-top: 16px;
  white-space: pre-line;
}

/* ----------------------------------------
   Photos Gallery Page
   ---------------------------------------- */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.gallery-grid .gallery-item {
  flex: 0 0 calc(33.333% - 6px);
  max-width: calc(33.333% - 6px);
  overflow: hidden;
}

.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gallery-grid .gallery-item img:hover {
  opacity: 0.85;
}

.gallery-grid .gallery-item .caption {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 14px;
  color: rgba(26, 26, 26, 0.5);
  text-align: center;
  padding: 8px 4px;
}

/* ----------------------------------------
   Footer (subpages)
   ---------------------------------------- */
.site-footer {
  background: rgb(31, 31, 31);
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.site-footer a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer .footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.site-footer .footer-social a {
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer .footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.site-footer .back-to-top {
  display: inline-block;
  margin-top: 24px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */
@media (max-width: 900px) {
  .research-grid {
    grid-template-columns: 1fr;
  }

  .startup-entry {
    flex-direction: column;
  }

  .startup-entry .entry-image {
    flex: none;
    max-width: 100%;
  }

  .gallery-grid .gallery-item {
    flex: 0 0 calc(50% - 4px);
    max-width: calc(50% - 4px);
  }
}

@media (max-width: 768px) {
  .site-header nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .site-header nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 73px;
    left: 0;
    right: 0;
    background: rgb(33, 33, 33);
    padding: 20px;
    z-index: 200;
  }

  .homepage .name-title {
    font-size: 32px;
    line-height: 32px;
    letter-spacing: 2.5px;
  }

  .homepage .subtitle {
    font-size: 14px;
    letter-spacing: 3.9px;
  }

  .homepage .content-block {
    padding: 0 24px;
  }

  .page-content {
    padding: 40px 24px 60px;
  }

  .banner {
    height: 250px;
  }

  .banner .banner-title {
    font-size: 32px;
    letter-spacing: 5px;
  }

  .banner .banner-quote {
    font-size: 22px;
  }

  .software-project h2 {
    font-size: 18px;
  }

  .blog-entry .entry-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .gallery-grid .gallery-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .homepage .bottom-nav {
    flex-direction: column;
    gap: 4px;
  }

  .homepage .social-icons {
    display: flex;
    margin: 16px 0;
  }
}
