 /* outfit-100 - latin */
@font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 100;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-200 - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 200;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-200.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-200.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-300 - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 300;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-regular - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 400;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-500 - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 500;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-600 - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 600;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-600.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-600.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-700 - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 700;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-800 - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 800;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-800.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-800.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }
 
 /* outfit-900 - latin */
 @font-face {
   font-family: 'Outfit';
   font-style: normal;
   font-weight: 900;
   font-display: swap;
   src: local(''),
        url('../fonts/outfit-v6-latin-900.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/outfit-v6-latin-900.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
 }

/* ========================================================================== 
   hikari — main stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  --font-main: Outfit, sans-serif;

  --color-bg: rgb(251, 248, 243);
  --color-text: hsl(39, 43%, 14%);
  --color-muted: rgb(90, 90, 90);
  --color-black: rgb(0, 0, 0);
  --color-link-highlight: yellow;
  --color-card-overlay: rgba(255, 250, 185, 0.85);

  --wrapper-max: 1920px;
  --wrapper-padding: clamp(1rem, 3vw, 3rem);

  --space-xs: 0.25rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-page-top: 100px;
  --header-min-height: 3.2rem;

  --radius-card: 0;
  --transition-fast: 250ms ease-in-out;

  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: rgb(10, 10, 10);
  --color-text: rgb(235, 232, 226);
  --color-muted: rgb(150, 146, 138);
  --color-black: rgb(255, 255, 255);
  --color-link-highlight: rgb(95, 95, 20);
  --color-card-overlay: rgba(248, 235, 211, 0.8);
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
}

*:not(dialog) {
  margin: 0;
}

html {
  min-height: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  line-height: 1.5;
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   3. Page shell
   -------------------------------------------------------------------------- */

.wrapper {
  width: 100%;
  max-width: var(--wrapper-max);
  margin-inline: auto;
  padding-inline: var(--wrapper-padding);
  padding-bottom: clamp(var(--space-sm), 4vw, var(--space-xl));
}

.outlay {
  width: 100%;
  margin-top: var(--space-page-top);
}

.footer {
  margin-top: var(--space-xl);
}

/* --------------------------------------------------------------------------
   4. Header / navigation
   -------------------------------------------------------------------------- */

.header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand nav";
  align-items: start;
  gap: var(--space-lg);
  min-height: var(--header-min-height);
  margin-top: 40px;
  font-size: 1.3rem;
  line-height: 1;
}

.header-brand {
  grid-area: brand;
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.logo {
  font-weight: 700;
  white-space: nowrap;
}

.rightMarg {
  margin-left: var(--space-md);
  margin-right: var(--space-md);
}

.header-tagline {
  max-width: 29ch;
  line-height: 1.1;
}

.site-nav {
  grid-area: nav;
  display: flex;
  justify-content: flex-end;
  gap: var(--space-lg);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-muted);
}

.menu-toggle {
  display: none;
}

body.menu-is-open {
  overflow: hidden;
}

/* Kept for older markup; safe to remove once all pages use .header-brand. */
.flexy {
  display: flex;
}

.ch_lim_small {
  max-width: 29ch;
}

.header h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* --------------------------------------------------------------------------
   5. Text blocks
   -------------------------------------------------------------------------- */

.about {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-xl);
  max-width: 65ch;
  color: var(--color-text);
  font-size: 24px;
  text-wrap: balance;
}

.about-item {
  display: flex;
  justify-content: space-between;
  margin-top: 1.8rem;
}

.about-item h2 {
  margin-bottom: var(--space-lg);
  font-size: 2rem;
}

.descript {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
  text-wrap: balance;
}

.descript p {
  max-width: 55ch;
  margin-bottom: var(--space-sm);
  font-size: 1.3rem;
}

.project-meta {
  position: relative;
  margin-top: var(--space-2xl);
  font-size: 1.3rem;
}

.project-meta::before {
  content: "";
  position: absolute;
  top: -30px;
  width: 40px;
  height: 1.5px;
  background-color: var(--color-black);
}

.grayish {
  display: block;
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   6. Inline links
   -------------------------------------------------------------------------- */

.linky {
  position: relative;
  color: var(--color-text);
}

.linky::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  z-index: -1;
  width: 101%;
  height: 5px;
  background-color: var(--color-link-highlight);
  transition: height 400ms ease-in-out;
}

.linky:hover::after,
.linky:focus-visible::after {
  height: 14px;
}

/* --------------------------------------------------------------------------
   7. Masonry grids
   -------------------------------------------------------------------------- */

/* New grids stay hidden until JS has measured and positioned every item. */
[data-masonry-grid] {
  visibility: hidden;
}

[data-masonry-grid].is-masonry-ready {
  visibility: visible;
}

[data-masonry-item] {
  opacity: 0;
  transition: opacity 420ms ease;
  transition-delay: var(--masonry-delay, 0ms);
}

[data-masonry-grid].is-masonry-ready [data-masonry-item] {
  opacity: 1;
}

.port-grid,
.fragments-grid {
  position: relative;
  width: 100%;
}

.port-grid__item,
.fragments-grid__item {
  position: absolute;
  overflow: hidden;
  will-change: transform;
}

.port-grid__item img,
.fragments-grid__item img {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. Front page portfolio cards
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.grid > * {
  min-width: 0;
}

.grid > :first-child {
  /* Enable if you want the first card to span both columns. */
  /* grid-column: 1 / -1; */
}

.portfolio-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-black);
  color: inherit;
  text-decoration: none;
}

/* Decorative preview videos should not trigger browser-native video UI. */
.portfolio-card video {
  pointer-events: none;
}

.portfolio-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--color-card-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.portfolio-card__media {
  width: 100%;
  height: clamp(280px, 36vw, 460px);
  overflow: hidden;
}

.portfolio-card__media img,
.portfolio-card__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-card__media img.object-top,
.portfolio-card__media video.object-top {
  object-position: top center;
}

.portfolio-card__text {
  position: absolute;
  top: var(--space-xl);
  left: var(--space-xl);
  z-index: 2;
  display: inline-block;
  color: var(--color-black);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.portfolio-card:hover .portfolio-card__text,
.portfolio-card:focus-visible .portfolio-card__text,
.portfolio-card.is-revealed .portfolio-card__text {
  opacity: 1;
}

.portfolio-card:hover::after,
.portfolio-card:focus-visible::after,
.portfolio-card.is-revealed::after {
  opacity: 1;
}

.portfolio-card h2 {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* --------------------------------------------------------------------------
   9. Fragments page
   -------------------------------------------------------------------------- */

.fragments-intro {
  max-width: 58ch;
  margin-bottom: var(--space-xl);
}

.fragments-intro h2 {
  margin-bottom: var(--space-sm);
  font-size: 2rem;
}

.fragments-intro p {
  color: var(--color-text);
  font-size: 1.3rem;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   10. Project media
   -------------------------------------------------------------------------- */

.project-hero {
  margin-bottom: var(--space-xl);
}

.project-hero img {
  display: block;
  width: 100%;
  cursor: pointer;
}

/* Legacy hero image support, only used if older project markup still exists. */
.photo-port {
  height: 75vh;
  overflow: hidden;
}

.photo-port img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Blog post layout */
.blog-post {
  max-width: none;
}

.blog-hero {
  width: 100%;
  margin-bottom: var(--space-xl);
}

.blog-hero img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.blog-post__header {
  margin: 0 auto;
  margin-bottom: var(--space-xl);
  max-width: 70ch;
}

.blog-post__title {
  margin-bottom: var(--space-sm);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
  font-weight: 700;
}

.blog-post__meta {
  display: flex;
  gap: var(--space-sm);
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.2;
}

.blog-post__content {
  margin: 0 auto;
  max-width: 70ch;
}

/* Shared blog block spacing */
.blog-block {
  margin-bottom: var(--space-xl);
}

/* Paragraph blocks */
.blog-block--paragraph p {
  font-size: 1.3rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Heading blocks */
.blog-block--heading {
  max-width: 62ch;
  margin-top: var(--space-2xl);
}

.blog-block--heading h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.blog-block--heading h3 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* Full-width image block */
.blog-block--image img {
  width: 100%;
  height: auto;
  cursor: pointer;
}

/* Image captions */
.blog-caption {
  max-width: 62ch;
  margin-top: 0.65rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

/* Reusable image grid block */
.blog-block--image-grid {
  display: grid;
  grid-template-columns: repeat(var(--blog-grid-columns, 2), minmax(0, 1fr));
  gap: 8px;
}

.blog-block--image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3; /* square cells */
  height: auto;
  display: block;
  object-fit: cover;
  cursor: pointer;
}
/* Quote block */
.blog-block--quote {
  max-width: 62ch;
}

.blog-block--quote blockquote {
  font-size: clamp(1.6rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.blog-hero {
  width: 100%;
  margin-bottom: var(--space-xl);
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

.blog-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
/* Blog index / landing page */
.blog-index {
  max-width: none;
}

.blog-index__inner {
  margin: 0 auto;
  max-width: 70ch;
}

.blog-index__item {
  display: block;
  font-size: clamp(1.6rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin-bottom: 3rem;
  margin-top: .8rem;

  transition: color var(--transition-fast);
}

.blog-index__item:first-child {
  padding-top: 0;
}

.blog-index__item:hover {
  color: var(--color-muted);
}

@media (max-width: 560px) {
  .blog-index__item {
    padding-block: 0.9rem;
    font-size: clamp(1.5rem, 9vw, 2.7rem);
  }
}

/* Mobile blog styles */
@media (max-width: 560px) {
  .blog-post__header {
    margin-bottom: var(--space-lg);
  }

  .blog-block {
    margin-bottom: var(--space-lg);
  }

  .blog-block--paragraph p {
    font-size: 1.25rem;
  }

  .blog-block--image-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .blog-caption {
    font-size: 0.9rem;
  }
}

/* 

--------------------------------------------------------------------------
   11. Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 850px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-card__media {
    height: clamp(240px, 42vw, 420px);
  }
}

/* --------------------------------------------------------------------------
   12. Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
  :root {
    --space-page-top: 56px;
    --header-min-height: 4.5rem;
  }

  .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand menu"
      "nav nav";
    column-gap: 1rem;
    row-gap: 1rem;
    margin-top: 24px;
    font-size: 1.15rem;
    line-height: 1.1;
    min-height: var(--header-min-height);
  }

  .header-brand {
    grid-area: brand;
    display: flex;
    align-items: flex-start;
    min-width: 0;
  }

  .logo {
    white-space: nowrap;
  }

  .rightMarg {
    margin-left: 0.65rem;
    margin-right: 0.65rem;
  }

  .header-tagline {
    min-width: 0;
    max-width: 29ch;
    line-height: 1.1;
  }

  .menu-toggle {
    grid-area: menu;
    position: relative;
    z-index: 60;
    display: block;
    width: 2rem;
    height: 2rem;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: 1.7rem;
    height: 2px;
    border-radius: 999px;
    background: var(--color-text);
    transform-origin: center;
    transition: transform 220ms ease;
  }

  .menu-toggle span:first-child {
    transform: translate(-50%, calc(-50% - 4px));
  }

  .menu-toggle span:last-child {
    transform: translate(-50%, calc(-50% + 4px));
  }

  .menu-toggle.is-open span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .menu-toggle.is-open span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--color-bg);
    font-size: clamp(2rem, 12vw, 4.5rem);
    line-height: 0.9;
    font-weight: 500;
    letter-spacing: -0.04em;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
      opacity 220ms ease,
      visibility 220ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .outlay {
    margin-top: var(--space-page-top);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .grid > :first-child {
    grid-column: auto;
  }

  .portfolio-card__media {
    height: clamp(280px, 70vw, 420px);
  }

  .portfolio-card h2 {
    font-size: 1.4rem;
  }

  .about {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-lg);
    font-size: 20px;
  }

  .about-item {
    display: block;
  }

  .descript {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
  }

  .descript p,
  .project-meta {
    font-size: 1.1rem;
  }

  .project-meta {
    margin-top: var(--space-xl);
  }
}
