/* css/styles.css */
/* 1. Basic reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: #000;
  text-decoration: none;
}

a:visited,
a:hover,
a:active {
  color: #000;
  text-decoration: none;
}

/* 2. Root tokens (you can adjust these later) */
:root {
  /* spacing scale: 4px base */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-128: 128px;

  /* layout */
  --page-horizontal-margin-desktop: 128px;
  --page-horizontal-margin-mobile: 16px;
  --header-height: 64px;
  --logo-width: 200px;
  --logo-max-height: 50px;
}

/* 3. Body baseline */
body {
  min-height: 100vh;
}

/* 4. Page shell */
.page {
  min-height: 100vh;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.page__inner {
  width: 100%;
  margin: 0 auto;
  padding-left: var(--page-horizontal-margin-desktop);
  padding-right: var(--page-horizontal-margin-desktop);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* 5. Header & nav */
.site-header {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  text-align: left;
  position: relative;
  z-index: 1000;
  background: #ffffff;
}

.site-header__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-12);
}

.index-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 24px;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  z-index: 2;
  pointer-events: auto;
  opacity: 1;
}

.index-header .site-nav-list {
  gap: 20px;
}

.index-header .site-logo img {
  width: 160px;
  max-width: 100%;
  height: auto;
}

.site-logo a {
  text-decoration: none;
}
.site-logo img {
  display: block;
  width: var(--logo-width);
  max-height: var(--logo-max-height);
  height: auto;
  padding: 0;
}

.site-nav-list {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
}
.site-nav-list a {
  display: inline-block;
  padding: 0;
  color: #444;
}
.site-nav-list a:visited,
.site-nav-list a:hover,
.site-nav-list a:active {
  color: #444;
  text-decoration: none;
}

.portfolio-gallery .grid-12 {
  row-gap: var(--space-64);
  grid-auto-flow: row dense;
  z-index: 1;
  position: relative;
}

.portfolio-tile {
  width: 100%;
  z-index: 1;
  position: relative;
}

/* new: vertical offsets for more dynamic rhythm */
.portfolio-tile--offset-small {
  margin-top: var(--space-32);
}

.portfolio-tile--offset-medium {
  margin-top: var(--space-64);
}


.parallax-layer {
  will-change: transform;
  transition: transform 0.12s linear;
  z-index: 1;
  position: relative;
}

.parallax-tile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  border-radius: 10px;
  transition:
    box-shadow 0.12s ease-out,
    transform 0.12s ease-out;
  z-index: 1;
  position: relative;
}

.parallax-tile__image {
  display: block;
  width: 80%;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  margin: 0;
  object-fit: contain;
}

.parallax-tile.interactive:hover {
  box-shadow: 1px 1px 0 0 #000;
}

.parallax-tile.interactive:active {
  box-shadow: -1px -1px 0 0 #000;
  transform: translateY(1px);
}

/* 6. Main layout */
main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--space-96);
  scrollbar-width: none; /* Firefox */
}

main::-webkit-scrollbar {
  display: none; /* WebKit */
}

/* 7. Simple 12-column grid helper */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--space-24);
}

/* A generic section spacing helper */
.section {
  margin-top: var(--space-96);
}

/* 8. Footer */
.site-footer {
  margin-top: auto;
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

/* -------------------------------------------------- */
/* Button system: flat → hover shadow → active flip   */
/* -------------------------------------------------- */

.button,
.portfolio-tile__button,
.hero__link,
.article-list-item__link,
.home-article-preview__link,
.home-portfolio__link,
.home-diary__link {
  appearance: none;
  border: none;
  background: #fff;
  color: #000;
  padding: var(--space-12) var(--space-24);
  cursor: pointer;
  font: inherit;
  text-align: left;
  display: inline-block;
  border-radius: 10px;
  overflow: hidden; /* clip inner content to the radius for cleaner corners */

  /* No shadow at rest. Flat plane. */
  box-shadow: none;

  /* Smooth interaction rhythm (can tune later). */
  transition:
    box-shadow 0.12s ease-out,
    transform 0.12s ease-out;
}

/* Hover: shadow bottom + right */
.button:hover,
.portfolio-tile__button:hover,
.hero__link:hover,
.article-list-item__link:hover,
.home-article-preview__link:hover,
.home-portfolio__link:hover,
.home-diary__link:hover {
  box-shadow: 1px 1px 0 0 #000;
}

/* Active/Pressed: shadow flips to top + left */
.button:active,
.portfolio-tile__button:active,
.hero__link:active,
.article-list-item__link:active,
.home-article-preview__link:active,
.home-portfolio__link:active,
.home-diary__link:active {
  box-shadow: -1px -1px 0 0 #000;
  transform: translateY(1px);
}


/* 9. Basic responsive behaviour */
@media (max-width: 768px) {
  .page__inner {
    padding-left: var(--page-horizontal-margin-mobile);
    padding-right: var(--page-horizontal-margin-mobile);
  }

  .grid-12 {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-header__row {
    align-items: flex-start;
  }

  .portfolio-gallery .grid-12 {
    grid-template-columns: 1fr;
    row-gap: var(--space-48);
    max-width: 100%;
  }

  .parallax-layer {
    transform: none !important;
  }

  /* new: remove stagger on small screens */
  .portfolio-tile--offset-small,
  .portfolio-tile--offset-medium {
    margin-top: 0;
  }

}
