
:root {
  /* --- Colors --- */
  --color-text: #FFFFFF;
  --color-text-alt: rgba(255, 255, 255, 0.7);
  --color-border: rgba(255, 255, 255, 0.5); 
  --color-bg: #000000;
  --color-surface: #FFFFFF;
  --color-primary: rgba(160, 40, 40, 1);
  --color-secondary: #503B31;

  /* --- font family --- */
  --ff-display: 'Playfair Display', sans-serif;
  --ff-body: 'Noto Serif Japanese', sans-serif;

  /* --- Spacing (8px System) --- */

  --space-8:   clamp(6px, 0.5vw + 4px, 8px);
  --space-16:  clamp(12px, 1vw + 8px, 16px);
  --space-24:  clamp(18px, 1.5vw + 12px, 24px);
  --space-32:  clamp(24px, 2vw + 16px, 32px);
  --space-40:  clamp(30px, 2.5vw + 20px, 40px);
  --space-48:  clamp(36px, 3vw + 24px, 48px);
  --space-64:  clamp(48px, 4vw + 32px, 64px);
  --space-80:  clamp(60px, 5vw + 40px, 80px);
  --space-96:  clamp(72px, 6vw + 48px, 96px);

  /* --- Section Spacing --- */

  --section-space-sm: clamp(80px, 10vw + 40px, 160px);  /* Scales to 160px */
  --section-space-md: clamp(120px, 15vw + 60px, 200px); /* Scales to 200px */
  --section-space-lg: clamp(160px, 20vw + 80px, 256px); /* Scales to 256px (32*8) */

  /* --- Typography --- */

  --fs-xs: clamp(0.8rem, 0.78rem + 0.1vw, 0.95rem);

  --fs-16: 1rem;

  --fs-20: clamp(1rem, 0.98rem + 0.2vw, 1.25rem);

  --fs-25: clamp(1.1rem, 1.05rem + 0.3vw, 1.56rem);

  --fs-31: clamp(1.25rem, 1.15rem + 0.5vw, 1.94rem);

  --fs-39: clamp(1.4rem, 1.25rem + 0.8vw, 2.44rem);

  --fs-49: clamp(1.6rem, 1.4rem + 1.2vw, 3.06rem);

  --fs-61: clamp(1.9rem, 1.6rem + 1.6vw, 3.81rem);

  --fs-76: clamp(2.2rem, 1.8rem + 2.2vw, 4.75rem);

  --fs-91: clamp(2.6rem, 2rem + 3vw, 5.69rem);

  /* --- Border Radius --- */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* --- Shadows --- */
  --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-big: 0 12px 24px rgba(0, 0, 0, 0.12);

  /* --- Layout Widths --- */
  
  /* 1. Full Screen */
  --width-full: 100%;

  /* 2. Contained */
  --width-contained: calc(100% - 128px);
  
  /* 3. Standard Max-Width */ 
  --max-site-width: 1440px; 

  /* Responsive Margin (Mobile safety) */
  --inline-margin: calc(100% - 64px);

  /* -- Glass texture --*/

  --glass: 
    linear-gradient(
      135deg,
      rgba(255,255,255,0.25),
      rgba(255,255,255,0.05)
    )
    padding-box,
    rgba(255,255,255,0.15);

  --glass-border: 1px solid rgba(255,255,255,0.3);
  --glass-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  --glass-blur: blur(10px);
}

.glass {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);

  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-sm);
}

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

html, body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

text {
  word-break: normal;
  overflow-wrap: break-word;
}

body {
  font-family: var(--ff-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-16);
  line-height: 1.5;
}

ul {
  list-style: none;
}

a, button {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.cell-wide {
  grid-column: 1 / -1;
}

/* -- portfolio -- */

#portfolio {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  flex-direction: column;
  position: relative;
}

.btn-exit {
  position: absolute;
  width: 2rem;
  height: 2rem;
  top: .1%;
  right: 5%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--fs-31);
}

.portfolio-container {
  max-width: var(--width-contained);
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--color-border);
}

.cell {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  background-color: var(--color-bg);
  position: relative;
}

.sticky-wrapper {
  max-width: clamp(300px, 90vw, 450px);
  width: 100%;
  align-self: start;
  position: sticky;
  top: 0;
}

.sticky-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-16);
}

.artist-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-name {
  font-size: var(--fs-91);
  line-height: 1.2;
  font-weight: 200;
  font-family: var(--ff-display);
}

.artist-img img {
  width: 100%;
  height: 550px;
  object-fit: cover;
}

.social-links {
  display: flex;
  gap: var(--space-32);
  font-size: var(--fs-25);
}

.cell a {
  font-weight: 600;
  font-size: var(--fs-20);
  position: relative;
}

.cell a:after {
  position: absolute;
  content: "";
  width: 100%;
  height: 2px;
  background-color: var(--color-border);
  bottom: -4px;
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.cell a:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-var1 {
  margin-top: var(--space-24);
  padding: 1rem 2rem;
  border: 2px solid var(--color-primary);
  background-color: var(--color-primary);
  color: var(--color-text);
  font-size: var(--fs-25);
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  letter-spacing: 0.1rem;
  box-shadow: 0 0 20px rgba(200, 55, 55, 0.2);
  transition: 0.3s ease;
  border-radius: var(--radius-sm);
}

.btn-var1:hover {
  box-shadow: 0 0 30px rgba(200, 55, 55, 0.6);
  border: 2px solid rgba(200, 55, 55, 0.15);
}

.content {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
  height: 100%;
}

.about {
  width: 100%;
  justify-content: start;
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}

.about-title {
  border-bottom: 2px solid var(--color-border);
  padding-left: var(--space-24);
  font-size: var(--fs-25);
  font-family: var(--ff-display);
  font-weight: 200;
}

.styles {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  padding: 0 var(--space-16);
}

.styles h4 {
  font-size: var(--fs-20);
  color: var(--color-border);
  font-family: var(--ff-display);
  font-weight: 600;
}

.styles p {
  font-weight: 400;
  font-size: var(--fs-25);
}

.styles p,
.styles ul {
  padding: 0 var(--space-16);
}

.styles ul {
  color: var(--color-text-alt);
  display: flex;
  gap: var(--space-24);
  font-size: var(--fs-20);
}

.about-text {
  font-size: var(--fs-31);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
  font-weight: 200;
}

.home-btn {
  font-size: var(--fs-31) !important;
  font-family: var(--ff-display);
  font-weight: 200;
  padding: var(--space-32) 0;
}

.work {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.work-title {
  width: 100%;
  border-bottom: 2px solid var(--color-border);
  padding-left: var(--space-24);
  font-size: var(--fs-25);
  font-family: var(--ff-display);
  font-weight: 200;
}

.img-container {
  display: grid;
  max-width: var(--inline-margin);
  width: 100%;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  grid-auto-rows: auto;
  row-gap: var(--space-32);
  column-gap: var(--space-24);
  padding: var(--space-24);
  align-items: start;
}

.work img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.big-img {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 900px) { 
  .portfolio-container {
    grid-template-columns: 1fr;
    max-width: var(--inline-margin);
    background-color: var(--color-bg);
    gap: var(--space-64);
  }

  .img-container {
    min-height: auto;
    height: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    grid-auto-rows: auto;
  }
}