/* =========================================
   Kazuya Otsuka — Portfolio SP Design
   iPhone 15 (393px) faithful reproduction
   ========================================= */

/* ---------- Web Font ---------- */
@font-face {
  font-family: 'GenInterfaceJP';
  src: url('GenInterfaceJP-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

html {
  /* Lock to 393px design base */
  font-size: 16px;
  --theme-bg: #FFF564;
  --theme-fg: #545454;
}

body {
  background-color: var(--theme-bg);
  font-family: 'GenInterfaceJP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans',
               'Yu Gothic', 'Meiryo', sans-serif;
  font-weight: 300;
  color: var(--theme-fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

/* ---------- Layout Container ---------- */
.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
}

/* ---------- Icon ---------- */
.icon-wrap {
  margin-top: 52px;
  margin-bottom: 0;
}

.logo-icon {
  width: 116.523px;
  height: 138.303px;
  margin-left: 5px;
  display: block;
  border: 0;
}

/* Used when theme-rotation.js is enabled (white foreground themes) */
.logo-icon--light {
  filter: brightness(0) invert(1);
}

/* ---------- Name Block ---------- */
.name-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 46px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 26px;
  color: var(--theme-fg);
}

.name-ja {
  font-size: 15px;
  letter-spacing: 0.5px;
}

.divider {
  font-size: 15px;
  letter-spacing: 0;
  color: var(--theme-fg);
  opacity: 0.7;
}

.name-en {
  font-size: 15px;
  letter-spacing: 0.5px;
}

/* ---------- Bio Text ---------- */
.bio {
  font-size: 15.5px;
  line-height: 1.92;
  color: var(--theme-fg);
}

.bio-en {
  margin-top: 30px;
  font-size: 14px;
  line-height: 23px;
  letter-spacing: 0.2px;
  border-radius: 28px;
}

.bio-ja {
  margin-top: 26px;
  font-size: 14px;
  line-height: 26px;
  letter-spacing: 0.2px;
}

/* ---------- Links / Nav ---------- */
.links {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.link {
  display: inline-block;
  font-size: 15.5px;
  letter-spacing: 0;
  color: var(--theme-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  line-height: 1.4;
  width: fit-content;
  transition: opacity 0.2s ease;
}

.link:hover {
  opacity: 0.55;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 64px;
  padding-top: 0;
  padding-bottom: 36px;
}

.copyright {
  font-size: 9px;
  letter-spacing: 0.03em;
  color: var(--theme-fg);
  line-height: 1.4;
}

/* SP */
@media (max-width: 599px) {
  .text-column {
    padding-bottom: 72px;
  }

  .footer {
    position: static;
    left: auto;
    bottom: auto;
    z-index: auto;
    /* PORTFOLIO → © の余白を 72px 固定 */
    margin-top: 72px;
    padding-bottom: 36px;
  }
}

/* ---------- Responsive ----------
   Tablet SP: full-width column with fixed side padding (40px in base .container) */
@media (min-width: 394px) and (max-width: 599px) {
  .container {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
  }
}

/* Desktop: two-column layout from 600px
   Grid: text max 540px | gap min 80px (grows when wide) | icon 155.364px.
   When narrow, the middle track stays ≥80px and the text column shrinks below 520px. */
@media (min-width: 600px) {
  .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 58px 70px 64px 60px;
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(80px, 1fr) 155.364px;
    align-items: start;
    align-content: start;
  }

  .logo-icon {
    width: 155.364px;
    height: 184.404px;
    margin-left: 0;
  }

  .icon-wrap {
    margin-top: 0;
    grid-column: 3;
    grid-row: 1;
  }

  .text-column {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    width: auto;
    max-width: none;
    padding-bottom: 72px;
  }

  .name-block {
    margin-top: 0;
  }

  .links {
    margin-top: 50px;
  }

  .footer {
    position: fixed;
    left: 60px;
    bottom: 60px;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    z-index: 1;
  }

  /* JS removes fixed when CONTACT→© gap would fall below 75px */
  .footer.footer--in-flow {
    position: static;
    left: auto;
    bottom: auto;
    margin-top: 75px;
    z-index: auto;
  }
}

/* Tablet / iPad: logo 0.9× (desktop grid still applies from 600px) */
@media (min-width: 600px) and (max-width: 1024px) {
  .container {
    grid-template-columns: minmax(0, 520px) minmax(80px, 1fr) 139.828px;
  }

  .logo-icon {
    width: 139.828px;
    height: 165.964px;
  }
}
